Package org.graffiti.attributes
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 Summary
-
Method Summary
Modifier and Type Method Description AttributablegetAttributable()Returns the attributable theAttributebelongs to.StringgetId()Returns theAttribute's identifier.CollectionAttributegetParent()Returns theAttribute's parent.StringgetPath()Returns theAttribute's path.ObjectgetValue()Returns the value of thisAttribute.booleanisDeleted()voidsetDefaultValue()The attribute's value is set so that itsgetValue()method will not returnnull.voidsetDeleted(boolean deleted)voidsetId(String id)voidsetParent(CollectionAttribute parent)Sets theAttribute's parent.voidsetValue(Object v)Sets the value of thisAttributeto the given value.StringtoString(int n)Returns a string representation prepended bynspaces of this attribute.Methods inherited from interface org.graffiti.plugin.Displayable
getDescription, getIcon, getName, setDescription, toXMLString
-
Field Details
-
SEPARATOR
The path seperator for the attributes hierarchy.- See Also:
- Constant Field Values
-
-
Method Details
-
getAttributable
Attributable getAttributable()Returns the attributable theAttributebelongs to.- Returns:
- the
Attribute's attributable.
-
setDefaultValue
void setDefaultValue()The attribute's value is set so that itsgetValue()method will not returnnull. -
getId
String getId()Returns theAttribute's identifier.- Returns:
- the
Attribute's identifier.
-
setId
-
setParent
Sets theAttribute's parent. Implementation Note: This function should only work if theAttribute's parent isnullbefore. Normaly onlyaddAttribute()methods should call it.- Parameters:
parent- theAttribute's parent.- Throws:
FieldAlreadySetException- if the parent was already set before
-
getParent
CollectionAttribute getParent()Returns theAttribute's parent. Ifthisis already the rootAttribute,nullis returned.- Returns:
- the
Attribute's parent.
-
getPath
String getPath()Returns theAttribute's path.- Returns:
- the
Attribute's path.
-
setValue
Sets the value of thisAttributeto the given value. If the value is set viaatt.setValue(x)and then retrieved viay = 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:
setValuein interfaceDisplayable- Parameters:
v- the new value.- Throws:
IllegalArgumentException- if v is not of the apropriate type.
-
getValue
Object getValue()Returns the value of thisAttribute. If the value is set viaatt.setValue(x)and then retrieved viay = 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:
getValuein interfaceDisplayable- Returns:
- the value of this
Attribute.
-
toString
Returns a string representation prepended bynspaces of this attribute.- Returns:
- DOCUMENT ME!
-
isDeleted
boolean isDeleted() -
setDeleted
void setDeleted(boolean deleted)
-