uk.ac.vamsas.objects.core
Class NodeType

java.lang.Object
  extended byuk.ac.vamsas.client.Vobject
      extended byuk.ac.vamsas.objects.core.NodeType
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Treenode

public class NodeType
extends Vobject
implements java.io.Serializable

Class NodeType.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.vamsas.client.Vobject
__added_since_last_read, __last_hash, __stored_in_document, __updated_since_last_read, __visited, __vorba, registerable, V_parent, vorbaId
 
Constructor Summary
NodeType()
           
 
Method Summary
 void addProperty(int index, Property vProperty)
           
 void addProperty(Property vProperty)
           
 void addVref(int index, Vref vVref)
           
 void addVref(Vref vVref)
           
 java.util.Enumeration enumerateProperty()
          Method enumerateProperty.
 java.util.Enumeration enumerateVref()
          Method enumerateVref.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 java.lang.String getDescription()
          Returns the value of field 'description'.
 java.lang.String getId()
          Returns the value of field 'id'.
 java.lang.String getModifiable()
          Returns the value of field 'modifiable'.
 java.lang.String getName()
          Returns the value of field 'name'.
 Property[] getProperty()
          Method getProperty.Returns the contents of the collection in an Array.
 Property getProperty(int index)
          Method getProperty.
 java.util.Vector getPropertyAsReference()
          Method getPropertyAsReference.Returns a reference to '_propertyList'.
 int getPropertyCount()
          Method getPropertyCount.
 Vref[] getVref()
          Method getVref.Returns the contents of the collection in an Array.
 Vref getVref(int index)
          Method getVref.
 java.util.Vector getVrefAsReference()
          Method getVrefAsReference.Returns a reference to '_vrefList'.
 int getVrefCount()
          Method getVrefCount.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllProperty()
           
 void removeAllVref()
           
 boolean removeProperty(Property vProperty)
          Method removeProperty.
 Property removePropertyAt(int index)
          Method removePropertyAt.
 boolean removeVref(Vref vVref)
          Method removeVref.
 Vref removeVrefAt(int index)
          Method removeVrefAt.
 void setDescription(java.lang.String description)
          Sets the value of field 'description'.
 void setId(java.lang.String id)
          Sets the value of field 'id'.
 void setModifiable(java.lang.String modifiable)
          Sets the value of field 'modifiable'.
 void setName(java.lang.String name)
          Sets the value of field 'name'.
 void setProperty(int index, Property vProperty)
           
 void setProperty(Property[] vPropertyArray)
           
 void setProperty(java.util.Vector vPropertyList)
          Sets the value of '_propertyList' by copying the given Vector.
 void setPropertyAsReference(java.util.Vector propertyVector)
          Deprecated.  
 void setVref(int index, Vref vVref)
           
 void setVref(java.util.Vector vVrefList)
          Sets the value of '_vrefList' by copying the given Vector.
 void setVref(Vref[] vVrefArray)
           
 void setVrefAsReference(java.util.Vector vrefVector)
          Deprecated.  
static NodeType unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class uk.ac.vamsas.client.Vobject
__callHash, __ensure_instance_ids, __ensure_instance_ids, __getInstanceIdField, __getLHash, __setFinalHash, __setInitHash, doHash, finalize, get__last_hash, getV_parent, getVorbaId, is__stored_in_document, isNewInDocument, isRegisterable, isRegistered, isUpdated, merge, set__added_since_last_read, set__stored_in_document, set__updated_since_last_read, setInstanceIdField, setRegisterable, setV_parent, setVorbaId
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeType

public NodeType()
Method Detail

addProperty

public void addProperty(Property vProperty)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
vProperty -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addProperty

public void addProperty(int index,
                        Property vProperty)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vProperty -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addVref

public void addVref(Vref vVref)
             throws java.lang.IndexOutOfBoundsException
Parameters:
vVref -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addVref

public void addVref(int index,
                    Vref vVref)
             throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vVref -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateProperty

public java.util.Enumeration enumerateProperty()
Method enumerateProperty.

Returns:
an Enumeration over all uk.ac.vamsas.objects.core.Property elements

enumerateVref

public java.util.Enumeration enumerateVref()
Method enumerateVref.

Returns:
an Enumeration over all uk.ac.vamsas.objects.core.Vref elements

equals

public boolean equals(java.lang.Object obj)
Overrides the java.lang.Object.equals method.

Parameters:
obj -
Returns:
true if the objects are equal.

getDescription

public java.lang.String getDescription()
Returns the value of field 'description'. The field 'description' has the following description: Descriptive text for this node

Returns:
the value of field 'Description'.

getId

public java.lang.String getId()
Returns the value of field 'id'. The field 'id' has the following description: Primary Key for vamsas object referencing

Returns:
the value of field 'Id'.

getModifiable

public java.lang.String getModifiable()
Returns the value of field 'modifiable'.

Returns:
the value of field 'Modifiable'.

getName

public java.lang.String getName()
Returns the value of field 'name'. The field 'name' has the following description: Short name for this node

Returns:
the value of field 'Name'.

getProperty

public Property getProperty(int index)
                     throws java.lang.IndexOutOfBoundsException
Method getProperty.

Parameters:
index -
Returns:
the value of the uk.ac.vamsas.objects.core.Property at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getProperty

public Property[] getProperty()
Method getProperty.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getPropertyAsReference

public java.util.Vector getPropertyAsReference()
Method getPropertyAsReference.Returns a reference to '_propertyList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getPropertyCount

public int getPropertyCount()
Method getPropertyCount.

Returns:
the size of this collection

getVref

public Vref getVref(int index)
             throws java.lang.IndexOutOfBoundsException
Method getVref.

Parameters:
index -
Returns:
the value of the uk.ac.vamsas.objects.core.Vref at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getVref

public Vref[] getVref()
Method getVref.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getVrefAsReference

public java.util.Vector getVrefAsReference()
Method getVrefAsReference.Returns a reference to '_vrefList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getVrefCount

public int getVrefCount()
Method getVrefCount.

Returns:
the size of this collection

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class Vobject
Returns:
a hash code value for the object.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
java.io.IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllProperty

public void removeAllProperty()

removeAllVref

public void removeAllVref()

removeProperty

public boolean removeProperty(Property vProperty)
Method removeProperty.

Parameters:
vProperty -
Returns:
true if the object was removed from the collection.

removePropertyAt

public Property removePropertyAt(int index)
Method removePropertyAt.

Parameters:
index -
Returns:
the element removed from the collection

removeVref

public boolean removeVref(Vref vVref)
Method removeVref.

Parameters:
vVref -
Returns:
true if the object was removed from the collection.

removeVrefAt

public Vref removeVrefAt(int index)
Method removeVrefAt.

Parameters:
index -
Returns:
the element removed from the collection

setDescription

public void setDescription(java.lang.String description)
Sets the value of field 'description'. The field 'description' has the following description: Descriptive text for this node

Parameters:
description - the value of field 'description'.

setId

public void setId(java.lang.String id)
Sets the value of field 'id'. The field 'id' has the following description: Primary Key for vamsas object referencing

Parameters:
id - the value of field 'id'.

setModifiable

public void setModifiable(java.lang.String modifiable)
Sets the value of field 'modifiable'.

Parameters:
modifiable - the value of field 'modifiable'.

setName

public void setName(java.lang.String name)
Sets the value of field 'name'. The field 'name' has the following description: Short name for this node

Parameters:
name - the value of field 'name'.

setProperty

public void setProperty(int index,
                        Property vProperty)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vProperty -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setProperty

public void setProperty(Property[] vPropertyArray)
Parameters:
vPropertyArray -

setProperty

public void setProperty(java.util.Vector vPropertyList)
Sets the value of '_propertyList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vPropertyList - the Vector to copy.

setPropertyAsReference

public void setPropertyAsReference(java.util.Vector propertyVector)
Deprecated.  

Sets the value of '_propertyList' by setting it to the given Vector. No type checking is performed.

Parameters:
propertyVector - the Vector to set.

setVref

public void setVref(int index,
                    Vref vVref)
             throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vVref -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setVref

public void setVref(Vref[] vVrefArray)
Parameters:
vVrefArray -

setVref

public void setVref(java.util.Vector vVrefList)
Sets the value of '_vrefList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vVrefList - the Vector to copy.

setVrefAsReference

public void setVrefAsReference(java.util.Vector vrefVector)
Deprecated.  

Sets the value of '_vrefList' by setting it to the given Vector. No type checking is performed.

Parameters:
vrefVector - the Vector to set.

unmarshal

public static NodeType unmarshal(java.io.Reader reader)
                          throws org.exolab.castor.xml.MarshalException,
                                 org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled uk.ac.vamsas.objects.core.NodeType
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema