org.biomage.Common
Class NameValueType

java.lang.Object
  extended by org.biomage.Common.NameValueType
All Implemented Interfaces:
java.io.Serializable, HasPropertySets

public class NameValueType
extends java.lang.Object
implements java.io.Serializable, HasPropertySets

A tuple designed to store data, keyed by a name and type.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasPropertySets
HasPropertySets.PropertySets_list
 
Field Summary
protected  java.util.List propertySets
          Allows nested specification of name/value pairs
 
Constructor Summary
NameValueType()
          Default constructor.
NameValueType(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 void addToPropertySets(int position, NameValueType nameValueType)
          Method to add NameValueType at position to PropertySets_list
 void addToPropertySets(NameValueType nameValueType)
          Method to add NameValueType to PropertySets_list
 boolean emptyMAGEobject()
           
 NameValueType getFromPropertySets(int position)
          Method to get NameValueType from PropertySets_list
 long getId()
           
 java.lang.String getModelClassName()
           
 java.lang.String getName()
          Get method for name
 HasPropertySets.PropertySets_list getPropertySets()
          Get method for propertySets
 java.lang.String getType()
          Get method for type
 java.lang.String getValue()
          Get method for value
 void removeElementAtFromPropertySets(int position)
          Method to remove by position from PropertySets_list
 void removeFromPropertySets(NameValueType nameValueType)
          Method to remove first NameValueType from PropertySets_list
 void setId(long l)
           
 void setName(java.lang.String name)
          Set method for name
 void setPropertySets(HasPropertySets.PropertySets_list propertySets)
          Set method for propertySets
 void setType(java.lang.String type)
          Set method for type
 void setValue(java.lang.String value)
          Set method for value
 void writeAssociations(java.io.Writer out)
          writeAssociations This method is responsible for assembling the association data into XML.
 void writeAttributes(java.io.Writer out)
          writeAttributes This method is responsible for assembling the attribute data into XML.
 void writeMAGEML(java.io.Writer out)
          writeMAGEML This method is responsible for assembling the attribute and association data into XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertySets

protected java.util.List propertySets
Allows nested specification of name/value pairs

Constructor Detail

NameValueType

public NameValueType()
Default constructor.


NameValueType

public NameValueType(org.xml.sax.Attributes atts)
Attribute constructor. Looks up the attributes in the parameter and casts them from strings appropriately

Parameters:
atts: - the attribute list.
Method Detail

writeMAGEML

public void writeMAGEML(java.io.Writer out)
                 throws java.io.IOException
writeMAGEML This method is responsible for assembling the attribute and association data into XML. It creates the object tag and then calls the writeAttributes and writeAssociation methods.

Throws:
java.io.IOException

emptyMAGEobject

public boolean emptyMAGEobject()

writeAttributes

public void writeAttributes(java.io.Writer out)
                     throws java.io.IOException
writeAttributes This method is responsible for assembling the attribute data into XML. It calls the super method to write out all attributes of this class and it's ancestors.

Throws:
java.io.IOException

writeAssociations

public void writeAssociations(java.io.Writer out)
                       throws java.io.IOException
writeAssociations This method is responsible for assembling the association data into XML. It calls the super method to write out all associations of this class's ancestors.

Throws:
java.io.IOException

setName

public void setName(java.lang.String name)
Set method for name

Parameters:
value - to set

getName

public java.lang.String getName()
Get method for name

Returns:
value of the attribute

setValue

public void setValue(java.lang.String value)
Set method for value

Parameters:
value - to set

getValue

public java.lang.String getValue()
Get method for value

Returns:
value of the attribute

setType

public void setType(java.lang.String type)
Set method for type

Parameters:
value - to set

getType

public java.lang.String getType()
Get method for type

Returns:
value of the attribute

getModelClassName

public java.lang.String getModelClassName()

setPropertySets

public void setPropertySets(HasPropertySets.PropertySets_list propertySets)
Set method for propertySets

Specified by:
setPropertySets in interface HasPropertySets
Parameters:
value - to set

getPropertySets

public HasPropertySets.PropertySets_list getPropertySets()
Get method for propertySets

Specified by:
getPropertySets in interface HasPropertySets
Returns:
value of the attribute

addToPropertySets

public void addToPropertySets(NameValueType nameValueType)
Method to add NameValueType to PropertySets_list

Specified by:
addToPropertySets in interface HasPropertySets

addToPropertySets

public void addToPropertySets(int position,
                              NameValueType nameValueType)
Method to add NameValueType at position to PropertySets_list

Specified by:
addToPropertySets in interface HasPropertySets

getFromPropertySets

public NameValueType getFromPropertySets(int position)
Method to get NameValueType from PropertySets_list

Specified by:
getFromPropertySets in interface HasPropertySets

removeElementAtFromPropertySets

public void removeElementAtFromPropertySets(int position)
Method to remove by position from PropertySets_list

Specified by:
removeElementAtFromPropertySets in interface HasPropertySets

removeFromPropertySets

public void removeFromPropertySets(NameValueType nameValueType)
Method to remove first NameValueType from PropertySets_list

Specified by:
removeFromPropertySets in interface HasPropertySets

getId

public long getId()
Returns:

setId

public void setId(long l)
Parameters:
l -