org.LexGrid.REST.relations
Class RelationsDirectory

java.lang.Object
  extended by org.mayo.edu.lgModel.LexGridBase
      extended by org.LexGrid.REST.relations.RelationsDirectory
All Implemented Interfaces:
java.io.Serializable

public class RelationsDirectory
extends LexGridBase
implements java.io.Serializable

Class RelationsDirectory.

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

Constructor Summary
RelationsDirectory()
           
 
Method Summary
 void addRelation(int index, Relation vRelation)
           
 void addRelation(Relation vRelation)
           
 java.util.Enumeration<? extends Relation> enumerateRelation()
          Method enumerateRelation.
 Continuation getContinuation()
          Returns the value of field 'continuation'.
 Relation[] getRelation()
          Method getRelation.Returns the contents of the collection in an Array.
 Relation getRelation(int index)
          Method getRelation.
 java.util.List<Relation> getRelationAsReference()
          Method getRelationAsReference.Returns a reference to '_relationList'.
 int getRelationCount()
          Method getRelationCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends Relation> iterateRelation()
          Method iterateRelation.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllRelation()
           
 boolean removeRelation(Relation vRelation)
          Method removeRelation.
 Relation removeRelationAt(int index)
          Method removeRelationAt.
 void setContinuation(Continuation continuation)
          Sets the value of field 'continuation'.
 void setRelation(int index, Relation vRelation)
           
 void setRelation(java.util.List<Relation> vRelationList)
          Sets the value of '_relationList' by copying the given Vector.
 void setRelation(Relation[] vRelationArray)
           
 void setRelationAsReference(java.util.List<Relation> relationList)
          Deprecated.  
static RelationsDirectory unmarshalRelationsDirectory(java.io.Reader reader)
          Method unmarshalRelationsDirectory.
 void validate()
           
 
Methods inherited from class org.mayo.edu.lgModel.LexGridBase
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationsDirectory

public RelationsDirectory()
Method Detail

addRelation

public void addRelation(Relation vRelation)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
vRelation -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addRelation

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

enumerateRelation

public java.util.Enumeration<? extends Relation> enumerateRelation()
Method enumerateRelation.

Returns:
an Enumeration over all possible elements of this collection

getContinuation

public Continuation getContinuation()
Returns the value of field 'continuation'.

Returns:
the value of field 'Continuation'.

getRelation

public Relation getRelation(int index)
                     throws java.lang.IndexOutOfBoundsException
Method getRelation.

Parameters:
index -
Returns:
the value of the org.LexGrid.REST.relations.Relation at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getRelation

public Relation[] getRelation()
Method getRelation.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

getRelationAsReference

public java.util.List<Relation> getRelationAsReference()
Method getRelationAsReference.Returns a reference to '_relationList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getRelationCount

public int getRelationCount()
Method getRelationCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateRelation

public java.util.Iterator<? extends Relation> iterateRelation()
Method iterateRelation.

Returns:
an Iterator over all possible elements in this collection

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

removeAllRelation

public void removeAllRelation()

removeRelation

public boolean removeRelation(Relation vRelation)
Method removeRelation.

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

removeRelationAt

public Relation removeRelationAt(int index)
Method removeRelationAt.

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

setContinuation

public void setContinuation(Continuation continuation)
Sets the value of field 'continuation'.

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

setRelation

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

setRelation

public void setRelation(Relation[] vRelationArray)
Parameters:
vRelationArray -

setRelation

public void setRelation(java.util.List<Relation> vRelationList)
Sets the value of '_relationList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vRelationList - the Vector to copy.

setRelationAsReference

public void setRelationAsReference(java.util.List<Relation> relationList)
Deprecated. 

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

Parameters:
relationList - the Vector to set.

unmarshalRelationsDirectory

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

Parameters:
reader -
Returns:
the unmarshaled org.LexGrid.REST.relations.RelationsDirectory
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

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.