vanted.attribute.token
Class AbstractTokenAttribute

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttribute
      extended by org.graffiti.attributes.StringAttribute
          extended by vanted.attribute.token.AbstractTokenAttribute
All Implemented Interfaces:
org.graffiti.attributes.Attribute, org.graffiti.core.DeepCopy, org.graffiti.plugin.Displayable
Direct Known Subclasses:
TokenAttributeContinuous, TokenAttributeDiscrete

public abstract class AbstractTokenAttribute
extends org.graffiti.attributes.StringAttribute

The Class AbstractTokenAttribute handles the abstract token attribute.

Author:
Kevin Pucknat

Field Summary
static java.lang.String path
          The Constant path.
static java.lang.String seperator
          The Constant seperator.
 
Fields inherited from interface org.graffiti.attributes.Attribute
SEPARATOR
 
Constructor Summary
AbstractTokenAttribute()
          Instantiates a new abstract token attribute.
AbstractTokenAttribute(java.lang.String id)
          Instantiates a new abstract token attribute.
AbstractTokenAttribute(java.lang.String id, java.lang.String value)
          Instantiates a new abstract token attribute.
 
Method Summary
 boolean addToken(AbstractToken token)
          Adds the token.
 java.lang.String getString()
           
 java.util.List<AbstractToken> getTokens()
          Gets the tokens.
 java.lang.Object getValue()
           
 void removeAllTokens()
          Removes all tokens.
 boolean removeToken(AbstractToken token)
          Removes the token.
 void setDefaultValue()
           
 void setString(java.lang.String value)
           
 
Methods inherited from class org.graffiti.attributes.StringAttribute
copy, getTypedStringAttribute, getTypedStringAttribute, putAttributeType, toString, toXMLString
 
Methods inherited from class org.graffiti.attributes.AbstractAttribute
addEdgeAttributeType, addNodeAttributeType, getAttributable, getDescription, getIcon, getId, getName, getParent, getPath, getTypedAttribute, isTypedAttributeFromID, setDescription, setId, setParent, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

path

public static final java.lang.String path
The Constant path.

See Also:
Constant Field Values

seperator

public static final java.lang.String seperator
The Constant seperator.

See Also:
Constant Field Values
Constructor Detail

AbstractTokenAttribute

public AbstractTokenAttribute()
Instantiates a new abstract token attribute.


AbstractTokenAttribute

public AbstractTokenAttribute(java.lang.String id)
Instantiates a new abstract token attribute.

Parameters:
id - the id

AbstractTokenAttribute

public AbstractTokenAttribute(java.lang.String id,
                              java.lang.String value)
Instantiates a new abstract token attribute.

Parameters:
id - the id
value - the value
Method Detail

getString

public java.lang.String getString()
Overrides:
getString in class org.graffiti.attributes.StringAttribute

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface org.graffiti.attributes.Attribute
Specified by:
getValue in interface org.graffiti.plugin.Displayable
Overrides:
getValue in class org.graffiti.attributes.StringAttribute

setString

public void setString(java.lang.String value)
Overrides:
setString in class org.graffiti.attributes.StringAttribute

getTokens

public java.util.List<AbstractToken> getTokens()
Gets the tokens.

Returns:
the tokens

addToken

public boolean addToken(AbstractToken token)
Adds the token.

Parameters:
token - the token
Returns:
true, if successful

removeToken

public boolean removeToken(AbstractToken token)
Removes the token.

Parameters:
token - the token
Returns:
true, if successful

removeAllTokens

public void removeAllTokens()
Removes all tokens.


setDefaultValue

public void setDefaultValue()
Specified by:
setDefaultValue in interface org.graffiti.attributes.Attribute
Overrides:
setDefaultValue in class org.graffiti.attributes.StringAttribute