Interface Attribute

All Superinterfaces:
DeepCopy, Displayable
All Known Subinterfaces:
CollectionAttribute, SortedCollectionAttribute
All Known Implementing Classes:
AbstractAttribute, AbstractCollectionAttribute, ArrowShapeAttribute, AWTImageAttribute, BooleanAttribute, ByteAttribute, ChartAttribute, ChartColorAttribute, ChartsColumnAttribute, ClusterColorAttribute, ColorAttribute, CompositeAttribute, CompoundAttribute, CompoundPositionAttribute, CoordinateAttribute, DimensionAttribute, DockingAttribute, DoubleAttribute, EdgeGraphicAttribute, EdgeLabelAttribute, EdgeLabelPositionAttribute, EdgeShapeAttribute, FloatAttribute, FontAttribute, GradientFillAttribute, GraphElementGraphicAttribute, HashMapAttribute, ImageAttribute, IndexAttribute, IntegerAttribute, KeggGroupPartAttribute, KeggIdAttribute, KeggReactionIdAttribute, KeggReactionTypeAttribute, KeggRelationSrcTgtAttribute, KeggRelationSubTypeAttribute, KeggRelationTypeAttribute, KeggTypeAttribute, LabelAlignmentAttribute, LabelAttribute, LabelColorAttribute, LabelFontAttribute, LabelStyleAttribute, LineModeAttribute, LinkedHashMapAttribute, LongAttribute, NodeGraphicAttribute, NodeLabelAttribute, NodeLabelPositionAttribute, NodePathwayLinkVisualizationAttribute, NodeShapeAttribute, ObjectAttribute, PortAttribute, PortsAttribute, PositionAttribute, ShapeDescriptionAttribute, ShortAttribute, SourceDockingAttribute, StringAttribute, TargetDockingAttribute, ThicknessAttribute, URLAttribute, XMLAttribute

public interface Attribute
extends Displayable, DeepCopy
Interfaces an object, which contains an id and a value. An Attribute may contain other Attribute instances and thereby form a complete attribute hierarchy.
Version:
$Revision: 1.5 $
See Also:
AttributeTypesManager
  • Field Details

  • Method Details

    • getAttributable

      Attributable getAttributable()
      Returns the attributable the Attribute belongs to.
      Returns:
      the Attribute's attributable.
    • setDefaultValue

      void setDefaultValue()
      The attribute's value is set so that its getValue() method will not return null.
    • getId

      String getId()
      Returns the Attribute's identifier.
      Returns:
      the Attribute's identifier.
    • setId

      void setId​(String id)
    • setParent

      void setParent​(CollectionAttribute parent) throws FieldAlreadySetException
      Sets the Attribute's parent. Implementation Note: This function should only work if the Attribute's parent is null before. Normaly only addAttribute() methods should call it.
      Parameters:
      parent - the Attribute's parent.
      Throws:
      FieldAlreadySetException - if the parent was already set before
    • getParent

      CollectionAttribute getParent()
      Returns the Attribute's parent. If this is already the root Attribute, null is returned.
      Returns:
      the Attribute's parent.
    • getPath

      String getPath()
      Returns the Attribute's path.
      Returns:
      the Attribute's path.
    • setValue

      void setValue​(Object v) throws IllegalArgumentException
      Sets the value of this Attribute to the given value. If the value is set via att.setValue(x) and then retrieved via y = att.getValue() it is only guaranteed that x.equals(y) not x==y, i.e. some particular implementations can provide x==y but this behaviour is not general, in contrast x.equals(y) must be always guaranteed.
      Specified by:
      setValue in interface Displayable
      Parameters:
      v - the new value.
      Throws:
      IllegalArgumentException - if v is not of the apropriate type.
    • getValue

      Object getValue()
      Returns the value of this Attribute. If the value is set via att.setValue(x) and then retrieved via y = att.getValue() it is only guaranteed that x.equals(y) not x==y, i.e. some particular implementations can provide x==y but this behaviour is not general, in contrast x.equals(y) must be always guaranteed. See documentation of particular implementations of this interface for exact specification of this method's behaviour!
      Specified by:
      getValue in interface Displayable
      Returns:
      the value of this Attribute.
    • toString

      String toString​(int n)
      Returns a string representation prepended by n spaces of this attribute.
      Returns:
      DOCUMENT ME!
    • isDeleted

      boolean isDeleted()
    • setDeleted

      void setDeleted​(boolean deleted)