org.LexGrid.relations
Class Relations

java.lang.Object
  extended by org.mayo.edu.lgModel.LexGridBase
      extended by org.LexGrid.commonTypes.Versionable
          extended by org.LexGrid.commonTypes.VersionableAndDescribable
              extended by org.LexGrid.relations.Relations
All Implemented Interfaces:
java.io.Serializable

public class Relations
extends VersionableAndDescribable
implements java.io.Serializable

A collection of relations that represent a particular point of view or community.

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

Constructor Summary
Relations()
           
 
Method Summary
 void addAssociationPredicate(AssociationPredicate vAssociationPredicate)
           
 void addAssociationPredicate(int index, AssociationPredicate vAssociationPredicate)
           
 java.util.Enumeration<? extends AssociationPredicate> enumerateAssociationPredicate()
          Method enumerateAssociationPredicate.
 AssociationPredicate[] getAssociationPredicate()
          Method getAssociationPredicate.Returns the contents of the collection in an Array.
 AssociationPredicate getAssociationPredicate(int index)
          Method getAssociationPredicate.
 java.util.List<AssociationPredicate> getAssociationPredicateAsReference()
          Method getAssociationPredicateAsReference.Returns a reference to '_associationPredicateList'.
 int getAssociationPredicateCount()
          Method getAssociationPredicateCount.
 java.lang.String getContainerName()
          Returns the value of field 'containerName'.
 java.lang.Boolean getIsMapping()
          Returns the value of field 'isMapping'.
 Properties getProperties()
          Returns the value of field 'properties'.
 java.lang.String getRepresentsVersion()
          Returns the value of field 'representsVersion'.
 java.lang.String getSourceCodingScheme()
          Returns the value of field 'sourceCodingScheme'.
 java.lang.String getSourceCodingSchemeVersion()
          Returns the value of field 'sourceCodingSchemeVersion'.
 java.lang.String getTargetCodingScheme()
          Returns the value of field 'targetCodingScheme'.
 java.lang.String getTargetCodingSchemeVersion()
          Returns the value of field 'targetCodingSchemeVersion'.
 java.lang.Boolean isIsMapping()
          Returns the value of field 'isMapping'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends AssociationPredicate> iterateAssociationPredicate()
          Method iterateAssociationPredicate.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllAssociationPredicate()
           
 boolean removeAssociationPredicate(AssociationPredicate vAssociationPredicate)
          Method removeAssociationPredicate.
 AssociationPredicate removeAssociationPredicateAt(int index)
          Method removeAssociationPredicateAt.
 void setAssociationPredicate(AssociationPredicate[] vAssociationPredicateArray)
           
 void setAssociationPredicate(int index, AssociationPredicate vAssociationPredicate)
           
 void setAssociationPredicate(java.util.List<AssociationPredicate> vAssociationPredicateList)
          Sets the value of '_associationPredicateList' by copying the given Vector.
 void setAssociationPredicateAsReference(java.util.List<AssociationPredicate> associationPredicateList)
          Deprecated.  
 void setContainerName(java.lang.String containerName)
          Sets the value of field 'containerName'.
 void setIsMapping(java.lang.Boolean isMapping)
          Sets the value of field 'isMapping'.
 void setProperties(Properties properties)
          Sets the value of field 'properties'.
 void setRepresentsVersion(java.lang.String representsVersion)
          Sets the value of field 'representsVersion'.
 void setSourceCodingScheme(java.lang.String sourceCodingScheme)
          Sets the value of field 'sourceCodingScheme'.
 void setSourceCodingSchemeVersion(java.lang.String sourceCodingSchemeVersion)
          Sets the value of field 'sourceCodingSchemeVersion'.
 void setTargetCodingScheme(java.lang.String targetCodingScheme)
          Sets the value of field 'targetCodingScheme'.
 void setTargetCodingSchemeVersion(java.lang.String targetCodingSchemeVersion)
          Sets the value of field 'targetCodingSchemeVersion'.
static Relations unmarshalRelations(java.io.Reader reader)
          Method unmarshalRelations.
 void validate()
           
 
Methods inherited from class org.LexGrid.commonTypes.VersionableAndDescribable
getEntityDescription, setEntityDescription, unmarshalVersionableAndDescribable
 
Methods inherited from class org.LexGrid.commonTypes.Versionable
getEffectiveDate, getEntryState, getExpirationDate, getIsActive, getOwner, getStatus, isIsActive, setEffectiveDate, setEntryState, setExpirationDate, setIsActive, setOwner, setStatus, unmarshalVersionable
 
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

Relations

public Relations()
Method Detail

addAssociationPredicate

public void addAssociationPredicate(AssociationPredicate vAssociationPredicate)
                             throws java.lang.IndexOutOfBoundsException
Parameters:
vAssociationPredicate -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAssociationPredicate

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

enumerateAssociationPredicate

public java.util.Enumeration<? extends AssociationPredicate> enumerateAssociationPredicate()
Method enumerateAssociationPredicate.

Returns:
an Enumeration over all possible elements of this collection

getAssociationPredicate

public AssociationPredicate getAssociationPredicate(int index)
                                             throws java.lang.IndexOutOfBoundsException
Method getAssociationPredicate.

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

getAssociationPredicate

public AssociationPredicate[] getAssociationPredicate()
Method getAssociationPredicate.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

getAssociationPredicateAsReference

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

Returns:
a reference to the Vector backing this class

getAssociationPredicateCount

public int getAssociationPredicateCount()
Method getAssociationPredicateCount.

Returns:
the size of this collection

getContainerName

public java.lang.String getContainerName()
Returns the value of field 'containerName'. The field 'containerName' has the following description: The unique identifier of this collection. Required if there is more than one collection of relations in a coding scheme

Returns:
the value of field 'ContainerName'.

getIsMapping

public java.lang.Boolean getIsMapping()
Returns the value of field 'isMapping'. The field 'isMapping' has the following description: True means that this set of relations are considered mapping between sourceCodingScheme and targetCodingScheme.

Returns:
the value of field 'IsMapping'.

getProperties

public Properties getProperties()
Returns the value of field 'properties'. The field 'properties' has the following description: A list of propeties used in the description of this relation.

Returns:
the value of field 'Properties'.

getRepresentsVersion

public java.lang.String getRepresentsVersion()
Returns the value of field 'representsVersion'. The field 'representsVersion' has the following description: The version of the particular container (mapping) that the relations entry represents

Returns:
the value of field 'RepresentsVersion'.

getSourceCodingScheme

public java.lang.String getSourceCodingScheme()
Returns the value of field 'sourceCodingScheme'. The field 'sourceCodingScheme' has the following description: Local name of the coding scheme that is used as a source for this set of relations. sourceCodingScheme must match a local id of a supportedCodingScheme in the mappings section.

Returns:
the value of field 'SourceCodingScheme'.

getSourceCodingSchemeVersion

public java.lang.String getSourceCodingSchemeVersion()
Returns the value of field 'sourceCodingSchemeVersion'. The field 'sourceCodingSchemeVersion' has the following description: Version of the source coding scheme used in mappings.

Returns:
the value of field 'SourceCodingSchemeVersion'.

getTargetCodingScheme

public java.lang.String getTargetCodingScheme()
Returns the value of field 'targetCodingScheme'. The field 'targetCodingScheme' has the following description: Local name of the coding scheme that is used as a target for this set of relations. targetCodingScheme must match a local id of a supportedCodingScheme in the mappings section.

Returns:
the value of field 'TargetCodingScheme'.

getTargetCodingSchemeVersion

public java.lang.String getTargetCodingSchemeVersion()
Returns the value of field 'targetCodingSchemeVersion'. The field 'targetCodingSchemeVersion' has the following description: Version of the target coding scheme used in mappings.

Returns:
the value of field 'TargetCodingSchemeVersion'.

isIsMapping

public java.lang.Boolean isIsMapping()
Returns the value of field 'isMapping'. The field 'isMapping' has the following description: True means that this set of relations are considered mapping between sourceCodingScheme and targetCodingScheme.

Returns:
the value of field 'IsMapping'.

isValid

public boolean isValid()
Method isValid.

Overrides:
isValid in class VersionableAndDescribable
Returns:
true if this object is valid according to the schema

iterateAssociationPredicate

public java.util.Iterator<? extends AssociationPredicate> iterateAssociationPredicate()
Method iterateAssociationPredicate.

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
Overrides:
marshal in class VersionableAndDescribable
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
Overrides:
marshal in class VersionableAndDescribable
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

removeAllAssociationPredicate

public void removeAllAssociationPredicate()

removeAssociationPredicate

public boolean removeAssociationPredicate(AssociationPredicate vAssociationPredicate)
Method removeAssociationPredicate.

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

removeAssociationPredicateAt

public AssociationPredicate removeAssociationPredicateAt(int index)
Method removeAssociationPredicateAt.

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

setAssociationPredicate

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

setAssociationPredicate

public void setAssociationPredicate(AssociationPredicate[] vAssociationPredicateArray)
Parameters:
vAssociationPredicateArray -

setAssociationPredicate

public void setAssociationPredicate(java.util.List<AssociationPredicate> vAssociationPredicateList)
Sets the value of '_associationPredicateList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vAssociationPredicateList - the Vector to copy.

setAssociationPredicateAsReference

public void setAssociationPredicateAsReference(java.util.List<AssociationPredicate> associationPredicateList)
Deprecated. 

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

Parameters:
associationPredicateList - the Vector to set.

setContainerName

public void setContainerName(java.lang.String containerName)
Sets the value of field 'containerName'. The field 'containerName' has the following description: The unique identifier of this collection. Required if there is more than one collection of relations in a coding scheme

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

setIsMapping

public void setIsMapping(java.lang.Boolean isMapping)
Sets the value of field 'isMapping'. The field 'isMapping' has the following description: True means that this set of relations are considered mapping between sourceCodingScheme and targetCodingScheme.

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

setProperties

public void setProperties(Properties properties)
Sets the value of field 'properties'. The field 'properties' has the following description: A list of propeties used in the description of this relation.

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

setRepresentsVersion

public void setRepresentsVersion(java.lang.String representsVersion)
Sets the value of field 'representsVersion'. The field 'representsVersion' has the following description: The version of the particular container (mapping) that the relations entry represents

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

setSourceCodingScheme

public void setSourceCodingScheme(java.lang.String sourceCodingScheme)
Sets the value of field 'sourceCodingScheme'. The field 'sourceCodingScheme' has the following description: Local name of the coding scheme that is used as a source for this set of relations. sourceCodingScheme must match a local id of a supportedCodingScheme in the mappings section.

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

setSourceCodingSchemeVersion

public void setSourceCodingSchemeVersion(java.lang.String sourceCodingSchemeVersion)
Sets the value of field 'sourceCodingSchemeVersion'. The field 'sourceCodingSchemeVersion' has the following description: Version of the source coding scheme used in mappings.

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

setTargetCodingScheme

public void setTargetCodingScheme(java.lang.String targetCodingScheme)
Sets the value of field 'targetCodingScheme'. The field 'targetCodingScheme' has the following description: Local name of the coding scheme that is used as a target for this set of relations. targetCodingScheme must match a local id of a supportedCodingScheme in the mappings section.

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

setTargetCodingSchemeVersion

public void setTargetCodingSchemeVersion(java.lang.String targetCodingSchemeVersion)
Sets the value of field 'targetCodingSchemeVersion'. The field 'targetCodingSchemeVersion' has the following description: Version of the target coding scheme used in mappings.

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

unmarshalRelations

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

Parameters:
reader -
Returns:
the unmarshaled org.LexGrid.relations.Relations
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
Overrides:
validate in class VersionableAndDescribable
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.