org.LexGrid.relations
Class AssociationSource

java.lang.Object
  extended by org.LexGrid.relations.AssociationSource
All Implemented Interfaces:
java.io.Serializable

public class AssociationSource
extends java.lang.Object
implements java.io.Serializable

An entity that occurs in one or more instances of a relation on the "from" (or left hand) side of a particular relation.

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

Constructor Summary
AssociationSource()
           
 
Method Summary
 void addTarget(AssociationTarget vTarget)
           
 void addTarget(int index, AssociationTarget vTarget)
           
 void addTargetData(AssociationData vTargetData)
           
 void addTargetData(int index, AssociationData vTargetData)
           
 java.util.Enumeration<AssociationTarget> enumerateTarget()
          Method enumerateTarget.
 java.util.Enumeration<AssociationData> enumerateTargetData()
          Method enumerateTargetData.
 java.lang.Object getChoiceValue()
          Returns the value of field 'choiceValue'.
 java.lang.String getSourceEntityCode()
          Returns the value of field 'sourceEntityCode'.
 java.lang.String getSourceEntityCodeNamespace()
          Returns the value of field 'sourceEntityCodeNamespace'.
 AssociationTarget[] getTarget()
          Method getTarget.Returns the contents of the collection in an Array.
 AssociationTarget getTarget(int index)
          Method getTarget.
 int getTargetCount()
          Method getTargetCount.
 AssociationData[] getTargetData()
          Method getTargetData.Returns the contents of the collection in an Array.
 AssociationData getTargetData(int index)
          Method getTargetData.
 int getTargetDataCount()
          Method getTargetDataCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<AssociationTarget> iterateTarget()
          Method iterateTarget.
 java.util.Iterator<AssociationData> iterateTargetData()
          Method iterateTargetData.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllTarget()
           
 void removeAllTargetData()
           
 boolean removeTarget(AssociationTarget vTarget)
          Method removeTarget.
 AssociationTarget removeTargetAt(int index)
          Method removeTargetAt.
 boolean removeTargetData(AssociationData vTargetData)
          Method removeTargetData.
 AssociationData removeTargetDataAt(int index)
          Method removeTargetDataAt.
 void setSourceEntityCode(java.lang.String sourceEntityCode)
          Sets the value of field 'sourceEntityCode'.
 void setSourceEntityCodeNamespace(java.lang.String sourceEntityCodeNamespace)
          Sets the value of field 'sourceEntityCodeNamespace'.
 void setTarget(AssociationTarget[] vTargetArray)
           
 void setTarget(int index, AssociationTarget vTarget)
           
 void setTargetData(AssociationData[] vTargetDataArray)
           
 void setTargetData(int index, AssociationData vTargetData)
           
static AssociationSource unmarshalAssociationSource(java.io.Reader reader)
          Method unmarshalAssociationSource.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssociationSource

public AssociationSource()
Method Detail

addTarget

public void addTarget(AssociationTarget vTarget)
               throws java.lang.IndexOutOfBoundsException
Parameters:
vTarget -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addTarget

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

addTargetData

public void addTargetData(AssociationData vTargetData)
                   throws java.lang.IndexOutOfBoundsException
Parameters:
vTargetData -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addTargetData

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

enumerateTarget

public java.util.Enumeration<AssociationTarget> enumerateTarget()
Method enumerateTarget.

Returns:
an Enumeration over all possible elements of this collection

enumerateTargetData

public java.util.Enumeration<AssociationData> enumerateTargetData()
Method enumerateTargetData.

Returns:
an Enumeration over all possible elements of this collection

getChoiceValue

public java.lang.Object getChoiceValue()
Returns the value of field 'choiceValue'. The field 'choiceValue' has the following description: Internal choice value storage

Returns:
the value of field 'ChoiceValue'.

getSourceEntityCode

public java.lang.String getSourceEntityCode()
Returns the value of field 'sourceEntityCode'. The field 'sourceEntityCode' has the following description: The entity code of the source entity.

Returns:
the value of field 'SourceEntityCode'.

getSourceEntityCodeNamespace

public java.lang.String getSourceEntityCodeNamespace()
Returns the value of field 'sourceEntityCodeNamespace'. The field 'sourceEntityCodeNamespace' has the following description: Local name of the namespace of the sourceEntityCode. sourceEntityCodeNamespace must match a local id of a supportedNamespace in the corresponding mappings section. If omitted, the URI of sourceEntityCode namespace is the codingSchemeURI of the containing coding scheme.

Returns:
the value of field 'SourceEntityCodeNamespace'.

getTarget

public AssociationTarget getTarget(int index)
                            throws java.lang.IndexOutOfBoundsException
Method getTarget.

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

getTarget

public AssociationTarget[] getTarget()
Method getTarget.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

getTargetCount

public int getTargetCount()
Method getTargetCount.

Returns:
the size of this collection

getTargetData

public AssociationData getTargetData(int index)
                              throws java.lang.IndexOutOfBoundsException
Method getTargetData.

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

getTargetData

public AssociationData[] getTargetData()
Method getTargetData.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

getTargetDataCount

public int getTargetDataCount()
Method getTargetDataCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateTarget

public java.util.Iterator<AssociationTarget> iterateTarget()
Method iterateTarget.

Returns:
an Iterator over all possible elements in this collection

iterateTargetData

public java.util.Iterator<AssociationData> iterateTargetData()
Method iterateTargetData.

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

removeAllTarget

public void removeAllTarget()

removeAllTargetData

public void removeAllTargetData()

removeTarget

public boolean removeTarget(AssociationTarget vTarget)
Method removeTarget.

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

removeTargetAt

public AssociationTarget removeTargetAt(int index)
Method removeTargetAt.

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

removeTargetData

public boolean removeTargetData(AssociationData vTargetData)
Method removeTargetData.

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

removeTargetDataAt

public AssociationData removeTargetDataAt(int index)
Method removeTargetDataAt.

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

setSourceEntityCode

public void setSourceEntityCode(java.lang.String sourceEntityCode)
Sets the value of field 'sourceEntityCode'. The field 'sourceEntityCode' has the following description: The entity code of the source entity.

Parameters:
sourceEntityCode - the value of field 'sourceEntityCode'

setSourceEntityCodeNamespace

public void setSourceEntityCodeNamespace(java.lang.String sourceEntityCodeNamespace)
Sets the value of field 'sourceEntityCodeNamespace'. The field 'sourceEntityCodeNamespace' has the following description: Local name of the namespace of the sourceEntityCode. sourceEntityCodeNamespace must match a local id of a supportedNamespace in the corresponding mappings section. If omitted, the URI of sourceEntityCode namespace is the codingSchemeURI of the containing coding scheme.

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

setTarget

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

setTarget

public void setTarget(AssociationTarget[] vTargetArray)
Parameters:
vTargetArray -

setTargetData

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

setTargetData

public void setTargetData(AssociationData[] vTargetDataArray)
Parameters:
vTargetDataArray -

unmarshalAssociationSource

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

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