org.LexGrid.concepts
Class Entities

java.lang.Object
  extended by org.mayo.edu.lgModel.LexGridBase
      extended by org.LexGrid.concepts.Entities
All Implemented Interfaces:
java.io.Serializable

public class Entities
extends LexGridBase
implements java.io.Serializable

A set of entity codes and their lexical descriptions

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

Constructor Summary
Entities()
           
 
Method Summary
 void addAssociationEntity(AssociationEntity vAssociationEntity)
           
 void addAssociationEntity(int index, AssociationEntity vAssociationEntity)
           
 void addEntity(Entity vEntity)
           
 void addEntity(int index, Entity vEntity)
           
 java.util.Enumeration<? extends AssociationEntity> enumerateAssociationEntity()
          Method enumerateAssociationEntity.
 java.util.Enumeration<? extends Entity> enumerateEntity()
          Method enumerateEntity.
 AssociationEntity[] getAssociationEntity()
          Method getAssociationEntity.Returns the contents of the collection in an Array.
 AssociationEntity getAssociationEntity(int index)
          Method getAssociationEntity.
 java.util.List<AssociationEntity> getAssociationEntityAsReference()
          Method getAssociationEntityAsReference.Returns a reference to '_associationEntityList'.
 int getAssociationEntityCount()
          Method getAssociationEntityCount.
 Entity[] getEntity()
          Method getEntity.Returns the contents of the collection in an Array.
 Entity getEntity(int index)
          Method getEntity.
 java.util.List<Entity> getEntityAsReference()
          Method getEntityAsReference.Returns a reference to '_entityList'.
 int getEntityCount()
          Method getEntityCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends AssociationEntity> iterateAssociationEntity()
          Method iterateAssociationEntity.
 java.util.Iterator<? extends Entity> iterateEntity()
          Method iterateEntity.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllAssociationEntity()
           
 void removeAllEntity()
           
 boolean removeAssociationEntity(AssociationEntity vAssociationEntity)
          Method removeAssociationEntity.
 AssociationEntity removeAssociationEntityAt(int index)
          Method removeAssociationEntityAt.
 boolean removeEntity(Entity vEntity)
          Method removeEntity.
 Entity removeEntityAt(int index)
          Method removeEntityAt.
 void setAssociationEntity(AssociationEntity[] vAssociationEntityArray)
           
 void setAssociationEntity(int index, AssociationEntity vAssociationEntity)
           
 void setAssociationEntity(java.util.List<AssociationEntity> vAssociationEntityList)
          Sets the value of '_associationEntityList' by copying the given Vector.
 void setAssociationEntityAsReference(java.util.List<AssociationEntity> associationEntityList)
          Deprecated.  
 void setEntity(Entity[] vEntityArray)
           
 void setEntity(int index, Entity vEntity)
           
 void setEntity(java.util.List<Entity> vEntityList)
          Sets the value of '_entityList' by copying the given Vector.
 void setEntityAsReference(java.util.List<Entity> entityList)
          Deprecated.  
static Entities unmarshalEntities(java.io.Reader reader)
          Method unmarshalEntities.
 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

Entities

public Entities()
Method Detail

addAssociationEntity

public void addAssociationEntity(AssociationEntity vAssociationEntity)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
vAssociationEntity -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAssociationEntity

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

addEntity

public void addEntity(Entity vEntity)
               throws java.lang.IndexOutOfBoundsException
Parameters:
vEntity -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addEntity

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

enumerateAssociationEntity

public java.util.Enumeration<? extends AssociationEntity> enumerateAssociationEntity()
Method enumerateAssociationEntity.

Returns:
an Enumeration over all possible elements of this collection

enumerateEntity

public java.util.Enumeration<? extends Entity> enumerateEntity()
Method enumerateEntity.

Returns:
an Enumeration over all possible elements of this collection

getAssociationEntity

public AssociationEntity getAssociationEntity(int index)
                                       throws java.lang.IndexOutOfBoundsException
Method getAssociationEntity.

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

getAssociationEntity

public AssociationEntity[] getAssociationEntity()
Method getAssociationEntity.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

getAssociationEntityAsReference

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

Returns:
a reference to the Vector backing this class

getAssociationEntityCount

public int getAssociationEntityCount()
Method getAssociationEntityCount.

Returns:
the size of this collection

getEntity

public Entity getEntity(int index)
                 throws java.lang.IndexOutOfBoundsException
Method getEntity.

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

getEntity

public Entity[] getEntity()
Method getEntity.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

getEntityAsReference

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

Returns:
a reference to the Vector backing this class

getEntityCount

public int getEntityCount()
Method getEntityCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateAssociationEntity

public java.util.Iterator<? extends AssociationEntity> iterateAssociationEntity()
Method iterateAssociationEntity.

Returns:
an Iterator over all possible elements in this collection

iterateEntity

public java.util.Iterator<? extends Entity> iterateEntity()
Method iterateEntity.

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

removeAllAssociationEntity

public void removeAllAssociationEntity()

removeAllEntity

public void removeAllEntity()

removeAssociationEntity

public boolean removeAssociationEntity(AssociationEntity vAssociationEntity)
Method removeAssociationEntity.

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

removeAssociationEntityAt

public AssociationEntity removeAssociationEntityAt(int index)
Method removeAssociationEntityAt.

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

removeEntity

public boolean removeEntity(Entity vEntity)
Method removeEntity.

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

removeEntityAt

public Entity removeEntityAt(int index)
Method removeEntityAt.

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

setAssociationEntity

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

setAssociationEntity

public void setAssociationEntity(AssociationEntity[] vAssociationEntityArray)
Parameters:
vAssociationEntityArray -

setAssociationEntity

public void setAssociationEntity(java.util.List<AssociationEntity> vAssociationEntityList)
Sets the value of '_associationEntityList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vAssociationEntityList - the Vector to copy.

setAssociationEntityAsReference

public void setAssociationEntityAsReference(java.util.List<AssociationEntity> associationEntityList)
Deprecated. 

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

Parameters:
associationEntityList - the Vector to set.

setEntity

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

setEntity

public void setEntity(Entity[] vEntityArray)
Parameters:
vEntityArray -

setEntity

public void setEntity(java.util.List<Entity> vEntityList)
Sets the value of '_entityList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vEntityList - the Vector to copy.

setEntityAsReference

public void setEntityAsReference(java.util.List<Entity> entityList)
Deprecated. 

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

Parameters:
entityList - the Vector to set.

unmarshalEntities

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

Parameters:
reader -
Returns:
the unmarshaled org.LexGrid.concepts.Entities
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.