org.LexGrid.codingSchemes
Class CodingScheme

java.lang.Object
  extended by org.LexGrid.commonTypes.Versionable
      extended by org.LexGrid.commonTypes.VersionableAndDescribable
          extended by org.LexGrid.codingSchemes.CodingScheme
All Implemented Interfaces:
java.io.Serializable

public class CodingScheme
extends VersionableAndDescribable
implements java.io.Serializable

A resource that makes assertions about a collection of terminological entities.

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

Constructor Summary
CodingScheme()
           
 
Method Summary
 void addLocalName(int index, java.lang.String vLocalName)
           
 void addLocalName(java.lang.String vLocalName)
           
 void addRelations(int index, Relations vRelations)
           
 void addRelations(Relations vRelations)
           
 void addSource(int index, Source vSource)
           
 void addSource(Source vSource)
           
 java.util.Enumeration<java.lang.String> enumerateLocalName()
          Method enumerateLocalName.
 java.util.Enumeration<Relations> enumerateRelations()
          Method enumerateRelations.
 java.util.Enumeration<Source> enumerateSource()
          Method enumerateSource.
 java.lang.Long getApproxNumConcepts()
          Returns the value of field 'approxNumConcepts'.
 java.lang.String getCodingSchemeName()
          Returns the value of field 'codingSchemeName'.
 java.lang.String getCodingSchemeURI()
          Returns the value of field 'codingSchemeURI'.
 Text getCopyright()
          Returns the value of field 'copyright'.
 java.lang.String getDefaultLanguage()
          Returns the value of field 'defaultLanguage'.
 Entities getEntities()
          Returns the value of field 'entities'.
 java.lang.String getFormalName()
          Returns the value of field 'formalName'.
 java.lang.String[] getLocalName()
          Method getLocalName.Returns the contents of the collection in an Array.
 java.lang.String getLocalName(int index)
          Method getLocalName.
 int getLocalNameCount()
          Method getLocalNameCount.
 Mappings getMappings()
          Returns the value of field 'mappings'.
 Properties getProperties()
          Returns the value of field 'properties'.
 Relations[] getRelations()
          Method getRelations.Returns the contents of the collection in an Array.
 Relations getRelations(int index)
          Method getRelations.
 int getRelationsCount()
          Method getRelationsCount.
 java.lang.String getRepresentsVersion()
          Returns the value of field 'representsVersion'.
 Source[] getSource()
          Method getSource.Returns the contents of the collection in an Array.
 Source getSource(int index)
          Method getSource.
 int getSourceCount()
          Method getSourceCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<java.lang.String> iterateLocalName()
          Method iterateLocalName.
 java.util.Iterator<Relations> iterateRelations()
          Method iterateRelations.
 java.util.Iterator<Source> iterateSource()
          Method iterateSource.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllLocalName()
           
 void removeAllRelations()
           
 void removeAllSource()
           
 boolean removeLocalName(java.lang.String vLocalName)
          Method removeLocalName.
 java.lang.String removeLocalNameAt(int index)
          Method removeLocalNameAt.
 boolean removeRelations(Relations vRelations)
          Method removeRelations.
 Relations removeRelationsAt(int index)
          Method removeRelationsAt.
 boolean removeSource(Source vSource)
          Method removeSource.
 Source removeSourceAt(int index)
          Method removeSourceAt.
 void setApproxNumConcepts(java.lang.Long approxNumConcepts)
          Sets the value of field 'approxNumConcepts'.
 void setCodingSchemeName(java.lang.String codingSchemeName)
          Sets the value of field 'codingSchemeName'.
 void setCodingSchemeURI(java.lang.String codingSchemeURI)
          Sets the value of field 'codingSchemeURI'.
 void setCopyright(Text copyright)
          Sets the value of field 'copyright'.
 void setDefaultLanguage(java.lang.String defaultLanguage)
          Sets the value of field 'defaultLanguage'.
 void setEntities(Entities entities)
          Sets the value of field 'entities'.
 void setFormalName(java.lang.String formalName)
          Sets the value of field 'formalName'.
 void setLocalName(int index, java.lang.String vLocalName)
           
 void setLocalName(java.lang.String[] vLocalNameArray)
           
 void setMappings(Mappings mappings)
          Sets the value of field 'mappings'.
 void setProperties(Properties properties)
          Sets the value of field 'properties'.
 void setRelations(int index, Relations vRelations)
           
 void setRelations(Relations[] vRelationsArray)
           
 void setRepresentsVersion(java.lang.String representsVersion)
          Sets the value of field 'representsVersion'.
 void setSource(int index, Source vSource)
           
 void setSource(Source[] vSourceArray)
           
static CodingScheme unmarshalCodingScheme(java.io.Reader reader)
          Method unmarshalCodingScheme.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodingScheme

public CodingScheme()
Method Detail

addLocalName

public void addLocalName(java.lang.String vLocalName)
                  throws java.lang.IndexOutOfBoundsException
Parameters:
vLocalName -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addLocalName

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

addRelations

public void addRelations(Relations vRelations)
                  throws java.lang.IndexOutOfBoundsException
Parameters:
vRelations -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addRelations

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

addSource

public void addSource(Source vSource)
               throws java.lang.IndexOutOfBoundsException
Parameters:
vSource -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addSource

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

enumerateLocalName

public java.util.Enumeration<java.lang.String> enumerateLocalName()
Method enumerateLocalName.

Returns:
an Enumeration over all possible elements of this collection

enumerateRelations

public java.util.Enumeration<Relations> enumerateRelations()
Method enumerateRelations.

Returns:
an Enumeration over all possible elements of this collection

enumerateSource

public java.util.Enumeration<Source> enumerateSource()
Method enumerateSource.

Returns:
an Enumeration over all possible elements of this collection

getApproxNumConcepts

public java.lang.Long getApproxNumConcepts()
Returns the value of field 'approxNumConcepts'. The field 'approxNumConcepts' has the following description: The approximate number of entries in the lexical portion of this scheme. This is used as a hint for browsers and services.

Returns:
the value of field 'ApproxNumConcepts'.

getCodingSchemeName

public java.lang.String getCodingSchemeName()
Returns the value of field 'codingSchemeName'. The field 'codingSchemeName' has the following description: The unique local identifier used to uniquely reference this coding scheme within the context of a message or container. codingSchemeName must match a local id of a supportedCodingScheme in the mappings section.

Returns:
the value of field 'CodingSchemeName'.

getCodingSchemeURI

public java.lang.String getCodingSchemeURI()
Returns the value of field 'codingSchemeURI'. The field 'codingSchemeURI' has the following description: The official URI for this coding scheme . This URI must also be present in the supportedCodingScheme entry that matches the codingSchemeName.

Returns:
the value of field 'CodingSchemeURI'.

getCopyright

public Text getCopyright()
Returns the value of field 'copyright'. The field 'copyright' has the following description: Information about rights held in and over the resource. Typically, copyright information includes a statement about various property rights associated with the resource, including intellectual property rights.

Returns:
the value of field 'Copyright'.

getDefaultLanguage

public java.lang.String getDefaultLanguage()
Returns the value of field 'defaultLanguage'. The field 'defaultLanguage' has the following description: The local identifier of the language that is used in all presentations, descriptions, etc. in this coding scheme if not otherwise specified. defaultLanguage must match a local id of a supportedLanguage in the mappings section.

Returns:
the value of field 'DefaultLanguage'.

getEntities

public Entities getEntities()
Returns the value of field 'entities'. The field 'entities' has the following description: The set of lexical assertions made by this coding scheme.

Returns:
the value of field 'Entities'.

getFormalName

public java.lang.String getFormalName()
Returns the value of field 'formalName'. The field 'formalName' has the following description: The official or common name by which this coding scheme is known. (optional)

Returns:
the value of field 'FormalName'.

getLocalName

public java.lang.String getLocalName(int index)
                              throws java.lang.IndexOutOfBoundsException
Method getLocalName.

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

getLocalName

public java.lang.String[] getLocalName()
Method getLocalName.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

getLocalNameCount

public int getLocalNameCount()
Method getLocalNameCount.

Returns:
the size of this collection

getMappings

public Mappings getMappings()
Returns the value of field 'mappings'. The field 'mappings' has the following description: A list of the local identifiers used in this resource along with the corresponding URI's, if known.

Returns:
the value of field 'Mappings'.

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 coding scheme.

Returns:
the value of field 'Properties'.

getRelations

public Relations getRelations(int index)
                       throws java.lang.IndexOutOfBoundsException
Method getRelations.

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

getRelations

public Relations[] getRelations()
Method getRelations.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

getRelationsCount

public int getRelationsCount()
Method getRelationsCount.

Returns:
the size of this collection

getRepresentsVersion

public java.lang.String getRepresentsVersion()
Returns the value of field 'representsVersion'. The field 'representsVersion' has the following description: The specific version of the resource represented by this coding scheme.

Returns:
the value of field 'RepresentsVersion'.

getSource

public Source getSource(int index)
                 throws java.lang.IndexOutOfBoundsException
Method getSource.

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

getSource

public Source[] getSource()
Method getSource.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

getSourceCount

public int getSourceCount()
Method getSourceCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateLocalName

public java.util.Iterator<java.lang.String> iterateLocalName()
Method iterateLocalName.

Returns:
an Iterator over all possible elements in this collection

iterateRelations

public java.util.Iterator<Relations> iterateRelations()
Method iterateRelations.

Returns:
an Iterator over all possible elements in this collection

iterateSource

public java.util.Iterator<Source> iterateSource()
Method iterateSource.

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

removeAllLocalName

public void removeAllLocalName()

removeAllRelations

public void removeAllRelations()

removeAllSource

public void removeAllSource()

removeLocalName

public boolean removeLocalName(java.lang.String vLocalName)
Method removeLocalName.

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

removeLocalNameAt

public java.lang.String removeLocalNameAt(int index)
Method removeLocalNameAt.

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

removeRelations

public boolean removeRelations(Relations vRelations)
Method removeRelations.

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

removeRelationsAt

public Relations removeRelationsAt(int index)
Method removeRelationsAt.

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

removeSource

public boolean removeSource(Source vSource)
Method removeSource.

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

removeSourceAt

public Source removeSourceAt(int index)
Method removeSourceAt.

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

setApproxNumConcepts

public void setApproxNumConcepts(java.lang.Long approxNumConcepts)
Sets the value of field 'approxNumConcepts'. The field 'approxNumConcepts' has the following description: The approximate number of entries in the lexical portion of this scheme. This is used as a hint for browsers and services.

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

setCodingSchemeName

public void setCodingSchemeName(java.lang.String codingSchemeName)
Sets the value of field 'codingSchemeName'. The field 'codingSchemeName' has the following description: The unique local identifier used to uniquely reference this coding scheme within the context of a message or container. codingSchemeName must match a local id of a supportedCodingScheme in the mappings section.

Parameters:
codingSchemeName - the value of field 'codingSchemeName'

setCodingSchemeURI

public void setCodingSchemeURI(java.lang.String codingSchemeURI)
Sets the value of field 'codingSchemeURI'. The field 'codingSchemeURI' has the following description: The official URI for this coding scheme . This URI must also be present in the supportedCodingScheme entry that matches the codingSchemeName.

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

setCopyright

public void setCopyright(Text copyright)
Sets the value of field 'copyright'. The field 'copyright' has the following description: Information about rights held in and over the resource. Typically, copyright information includes a statement about various property rights associated with the resource, including intellectual property rights.

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

setDefaultLanguage

public void setDefaultLanguage(java.lang.String defaultLanguage)
Sets the value of field 'defaultLanguage'. The field 'defaultLanguage' has the following description: The local identifier of the language that is used in all presentations, descriptions, etc. in this coding scheme if not otherwise specified. defaultLanguage must match a local id of a supportedLanguage in the mappings section.

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

setEntities

public void setEntities(Entities entities)
Sets the value of field 'entities'. The field 'entities' has the following description: The set of lexical assertions made by this coding scheme.

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

setFormalName

public void setFormalName(java.lang.String formalName)
Sets the value of field 'formalName'. The field 'formalName' has the following description: The official or common name by which this coding scheme is known. (optional)

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

setLocalName

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

setLocalName

public void setLocalName(java.lang.String[] vLocalNameArray)
Parameters:
vLocalNameArray -

setMappings

public void setMappings(Mappings mappings)
Sets the value of field 'mappings'. The field 'mappings' has the following description: A list of the local identifiers used in this resource along with the corresponding URI's, if known.

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

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 coding scheme.

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

setRelations

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

setRelations

public void setRelations(Relations[] vRelationsArray)
Parameters:
vRelationsArray -

setRepresentsVersion

public void setRepresentsVersion(java.lang.String representsVersion)
Sets the value of field 'representsVersion'. The field 'representsVersion' has the following description: The specific version of the resource represented by this coding scheme.

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

setSource

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

setSource

public void setSource(Source[] vSourceArray)
Parameters:
vSourceArray -

unmarshalCodingScheme

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

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