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 Attributable
getAttributable()
Returns the attributable theAttribute
belongs to.String
getId()
Returns theAttribute
's identifier.CollectionAttribute
getParent()
Returns theAttribute
's parent.String
getPath()
Returns theAttribute
's path.Object
getValue()
Returns the value of thisAttribute
.boolean
isDeleted()
void
setDefaultValue()
The attribute's value is set so that itsgetValue()
method will not returnnull
.void
setDeleted(boolean deleted)
void
setId(String id)
void
setParent(CollectionAttribute parent)
Sets theAttribute
's parent.void
setValue(Object v)
Sets the value of thisAttribute
to the given value.String
toString(int n)
Returns a string representation prepended byn
spaces 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 theAttribute
belongs 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 isnull
before. 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. Ifthis
is already the rootAttribute
,null
is returned.- Returns:
- the
Attribute
's parent.
-
getPath
String getPath()Returns theAttribute
's path.- Returns:
- the
Attribute
's path.
-
setValue
Sets the value of thisAttribute
to 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:
setValue
in 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:
getValue
in interfaceDisplayable
- Returns:
- the value of this
Attribute
.
-
toString
Returns a string representation prepended byn
spaces of this attribute.- Returns:
- DOCUMENT ME!
-
isDeleted
boolean isDeleted() -
setDeleted
void setDeleted(boolean deleted)
-