org.LexGrid.valueSets
Class ValueSetDefinition

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.valueSets.ValueSetDefinition
All Implemented Interfaces:
java.io.Serializable

public class ValueSetDefinition
extends VersionableAndDescribable
implements java.io.Serializable

A definition of a given value set. A value set definition can be a simple description with no associated value set entries, or it can consist of one or more definitionEntries that resolve to an enumerated list of entityCodes when applied to one or more codingScheme versions.

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

Constructor Summary
ValueSetDefinition()
           
 
Method Summary
 void addDefinitionEntry(DefinitionEntry vDefinitionEntry)
           
 void addDefinitionEntry(int index, DefinitionEntry vDefinitionEntry)
           
 void addRepresentsRealmOrContext(int index, java.lang.String vRepresentsRealmOrContext)
           
 void addRepresentsRealmOrContext(java.lang.String vRepresentsRealmOrContext)
           
 void addSource(int index, Source vSource)
           
 void addSource(Source vSource)
           
 java.util.Enumeration<? extends DefinitionEntry> enumerateDefinitionEntry()
          Method enumerateDefinitionEntry.
 java.util.Enumeration<? extends java.lang.String> enumerateRepresentsRealmOrContext()
          Method enumerateRepresentsRealmOrContext.
 java.util.Enumeration<? extends Source> enumerateSource()
          Method enumerateSource.
 java.lang.String getConceptDomain()
          Returns the value of field 'conceptDomain'.
 java.lang.String getDefaultCodingScheme()
          Returns the value of field 'defaultCodingScheme'.
 DefinitionEntry[] getDefinitionEntry()
          Method getDefinitionEntry.Returns the contents of the collection in an Array.
 DefinitionEntry getDefinitionEntry(int index)
          Method getDefinitionEntry.
 java.util.List<DefinitionEntry> getDefinitionEntryAsReference()
          Method getDefinitionEntryAsReference.Returns a reference to '_definitionEntryList'.
 int getDefinitionEntryCount()
          Method getDefinitionEntryCount.
 Mappings getMappings()
          Returns the value of field 'mappings'.
 Properties getProperties()
          Returns the value of field 'properties'.
 java.lang.String[] getRepresentsRealmOrContext()
          Method getRepresentsRealmOrContext.Returns the contents of the collection in an Array.
 java.lang.String getRepresentsRealmOrContext(int index)
          Method getRepresentsRealmOrContext.
 java.util.List<java.lang.String> getRepresentsRealmOrContextAsReference()
          Method getRepresentsRealmOrContextAsReference.Returns a reference to '_representsRealmOrContextList'.
 int getRepresentsRealmOrContextCount()
          Method getRepresentsRealmOrContextCount.
 Source[] getSource()
          Method getSource.Returns the contents of the collection in an Array.
 Source getSource(int index)
          Method getSource.
 java.util.List<Source> getSourceAsReference()
          Method getSourceAsReference.Returns a reference to '_sourceList'.
 int getSourceCount()
          Method getSourceCount.
 java.lang.String getValueSetDefinitionName()
          Returns the value of field 'valueSetDefinitionName'.
 java.lang.String getValueSetDefinitionURI()
          Returns the value of field 'valueSetDefinitionURI'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends DefinitionEntry> iterateDefinitionEntry()
          Method iterateDefinitionEntry.
 java.util.Iterator<? extends java.lang.String> iterateRepresentsRealmOrContext()
          Method iterateRepresentsRealmOrContext.
 java.util.Iterator<? extends Source> iterateSource()
          Method iterateSource.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllDefinitionEntry()
           
 void removeAllRepresentsRealmOrContext()
           
 void removeAllSource()
           
 boolean removeDefinitionEntry(DefinitionEntry vDefinitionEntry)
          Method removeDefinitionEntry.
 DefinitionEntry removeDefinitionEntryAt(int index)
          Method removeDefinitionEntryAt.
 boolean removeRepresentsRealmOrContext(java.lang.String vRepresentsRealmOrContext)
          Method removeRepresentsRealmOrContext.
 java.lang.String removeRepresentsRealmOrContextAt(int index)
          Method removeRepresentsRealmOrContextAt.
 boolean removeSource(Source vSource)
          Method removeSource.
 Source removeSourceAt(int index)
          Method removeSourceAt.
 void setConceptDomain(java.lang.String conceptDomain)
          Sets the value of field 'conceptDomain'.
 void setDefaultCodingScheme(java.lang.String defaultCodingScheme)
          Sets the value of field 'defaultCodingScheme'.
 void setDefinitionEntry(DefinitionEntry[] vDefinitionEntryArray)
           
 void setDefinitionEntry(int index, DefinitionEntry vDefinitionEntry)
           
 void setDefinitionEntry(java.util.List<DefinitionEntry> vDefinitionEntryList)
          Sets the value of '_definitionEntryList' by copying the given Vector.
 void setDefinitionEntryAsReference(java.util.List<DefinitionEntry> definitionEntryList)
          Deprecated.  
 void setMappings(Mappings mappings)
          Sets the value of field 'mappings'.
 void setProperties(Properties properties)
          Sets the value of field 'properties'.
 void setRepresentsRealmOrContext(int index, java.lang.String vRepresentsRealmOrContext)
           
 void setRepresentsRealmOrContext(java.util.List<java.lang.String> vRepresentsRealmOrContextList)
          Sets the value of '_representsRealmOrContextList' by copying the given Vector.
 void setRepresentsRealmOrContext(java.lang.String[] vRepresentsRealmOrContextArray)
           
 void setRepresentsRealmOrContextAsReference(java.util.List<java.lang.String> representsRealmOrContextList)
          Deprecated.  
 void setSource(int index, Source vSource)
           
 void setSource(java.util.List<Source> vSourceList)
          Sets the value of '_sourceList' by copying the given Vector.
 void setSource(Source[] vSourceArray)
           
 void setSourceAsReference(java.util.List<Source> sourceList)
          Deprecated.  
 void setValueSetDefinitionName(java.lang.String valueSetDefinitionName)
          Sets the value of field 'valueSetDefinitionName'.
 void setValueSetDefinitionURI(java.lang.String valueSetDefinitionURI)
          Sets the value of field 'valueSetDefinitionURI'.
static ValueSetDefinition unmarshalValueSetDefinition(java.io.Reader reader)
          Method unmarshalValueSetDefinition.
 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

ValueSetDefinition

public ValueSetDefinition()
Method Detail

addDefinitionEntry

public void addDefinitionEntry(DefinitionEntry vDefinitionEntry)
                        throws java.lang.IndexOutOfBoundsException
Parameters:
vDefinitionEntry -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addDefinitionEntry

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

addRepresentsRealmOrContext

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

addRepresentsRealmOrContext

public void addRepresentsRealmOrContext(int index,
                                        java.lang.String vRepresentsRealmOrContext)
                                 throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vRepresentsRealmOrContext -
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

enumerateDefinitionEntry

public java.util.Enumeration<? extends DefinitionEntry> enumerateDefinitionEntry()
Method enumerateDefinitionEntry.

Returns:
an Enumeration over all possible elements of this collection

enumerateRepresentsRealmOrContext

public java.util.Enumeration<? extends java.lang.String> enumerateRepresentsRealmOrContext()
Method enumerateRepresentsRealmOrContext.

Returns:
an Enumeration over all possible elements of this collection

enumerateSource

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

Returns:
an Enumeration over all possible elements of this collection

getConceptDomain

public java.lang.String getConceptDomain()
Returns the value of field 'conceptDomain'. The field 'conceptDomain' has the following description: The local name of the concept domain this value set definition binds to. conceptDomain must match a local id of a supportedConceptDomain in the mappings section.

Returns:
the value of field 'ConceptDomain'.

getDefaultCodingScheme

public java.lang.String getDefaultCodingScheme()
Returns the value of field 'defaultCodingScheme'. The field 'defaultCodingScheme' has the following description: Local name of the primary coding scheme from which the value set is drawn. defaultCodingScheme must match a local id of a supportedCodingScheme in the mappings section.

Returns:
the value of field 'DefaultCodingScheme'.

getDefinitionEntry

public DefinitionEntry getDefinitionEntry(int index)
                                   throws java.lang.IndexOutOfBoundsException
Method getDefinitionEntry.

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

getDefinitionEntry

public DefinitionEntry[] getDefinitionEntry()
Method getDefinitionEntry.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

getDefinitionEntryAsReference

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

Returns:
a reference to the Vector backing this class

getDefinitionEntryCount

public int getDefinitionEntryCount()
Method getDefinitionEntryCount.

Returns:
the size of this collection

getMappings

public Mappings getMappings()
Returns the value of field 'mappings'. The field 'mappings' has the following description: The mappings that are specific to this value set definition. This set of mappings must be supplied when a value set definition is included in a changedEntry and must be empty when it is included in a valueSets collection, as the collection itself carries the mappings

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 properties used in the description of this value set definition.

Returns:
the value of field 'Properties'.

getRepresentsRealmOrContext

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

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

getRepresentsRealmOrContext

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

getRepresentsRealmOrContextAsReference

public java.util.List<java.lang.String> getRepresentsRealmOrContextAsReference()
Method getRepresentsRealmOrContextAsReference.Returns a reference to '_representsRealmOrContextList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getRepresentsRealmOrContextCount

public int getRepresentsRealmOrContextCount()
Method getRepresentsRealmOrContextCount.

Returns:
the size of this collection

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

getSourceAsReference

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

Returns:
a reference to the Vector backing this class

getSourceCount

public int getSourceCount()
Method getSourceCount.

Returns:
the size of this collection

getValueSetDefinitionName

public java.lang.String getValueSetDefinitionName()
Returns the value of field 'valueSetDefinitionName'. The field 'valueSetDefinitionName' has the following description: The name of this value set definition, if any.

Returns:
the value of field 'ValueSetDefinitionName'.

getValueSetDefinitionURI

public java.lang.String getValueSetDefinitionURI()
Returns the value of field 'valueSetDefinitionURI'. The field 'valueSetDefinitionURI' has the following description: The URI of this value set definition.

Returns:
the value of field 'ValueSetDefinitionURI'.

isValid

public boolean isValid()
Method isValid.

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

iterateDefinitionEntry

public java.util.Iterator<? extends DefinitionEntry> iterateDefinitionEntry()
Method iterateDefinitionEntry.

Returns:
an Iterator over all possible elements in this collection

iterateRepresentsRealmOrContext

public java.util.Iterator<? extends java.lang.String> iterateRepresentsRealmOrContext()
Method iterateRepresentsRealmOrContext.

Returns:
an Iterator over all possible elements in this collection

iterateSource

public java.util.Iterator<? extends 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

removeAllDefinitionEntry

public void removeAllDefinitionEntry()

removeAllRepresentsRealmOrContext

public void removeAllRepresentsRealmOrContext()

removeAllSource

public void removeAllSource()

removeDefinitionEntry

public boolean removeDefinitionEntry(DefinitionEntry vDefinitionEntry)
Method removeDefinitionEntry.

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

removeDefinitionEntryAt

public DefinitionEntry removeDefinitionEntryAt(int index)
Method removeDefinitionEntryAt.

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

removeRepresentsRealmOrContext

public boolean removeRepresentsRealmOrContext(java.lang.String vRepresentsRealmOrContext)
Method removeRepresentsRealmOrContext.

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

removeRepresentsRealmOrContextAt

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

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

setConceptDomain

public void setConceptDomain(java.lang.String conceptDomain)
Sets the value of field 'conceptDomain'. The field 'conceptDomain' has the following description: The local name of the concept domain this value set definition binds to. conceptDomain must match a local id of a supportedConceptDomain in the mappings section.

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

setDefaultCodingScheme

public void setDefaultCodingScheme(java.lang.String defaultCodingScheme)
Sets the value of field 'defaultCodingScheme'. The field 'defaultCodingScheme' has the following description: Local name of the primary coding scheme from which the value set is drawn. defaultCodingScheme must match a local id of a supportedCodingScheme in the mappings section.

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

setDefinitionEntry

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

setDefinitionEntry

public void setDefinitionEntry(DefinitionEntry[] vDefinitionEntryArray)
Parameters:
vDefinitionEntryArray -

setDefinitionEntry

public void setDefinitionEntry(java.util.List<DefinitionEntry> vDefinitionEntryList)
Sets the value of '_definitionEntryList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vDefinitionEntryList - the Vector to copy.

setDefinitionEntryAsReference

public void setDefinitionEntryAsReference(java.util.List<DefinitionEntry> definitionEntryList)
Deprecated. 

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

Parameters:
definitionEntryList - the Vector to set.

setMappings

public void setMappings(Mappings mappings)
Sets the value of field 'mappings'. The field 'mappings' has the following description: The mappings that are specific to this value set definition. This set of mappings must be supplied when a value set definition is included in a changedEntry and must be empty when it is included in a valueSets collection, as the collection itself carries the mappings

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 properties used in the description of this value set definition.

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

setRepresentsRealmOrContext

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

setRepresentsRealmOrContext

public void setRepresentsRealmOrContext(java.lang.String[] vRepresentsRealmOrContextArray)
Parameters:
vRepresentsRealmOrContextArray -

setRepresentsRealmOrContext

public void setRepresentsRealmOrContext(java.util.List<java.lang.String> vRepresentsRealmOrContextList)
Sets the value of '_representsRealmOrContextList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vRepresentsRealmOrContextList - the Vector to copy.

setRepresentsRealmOrContextAsReference

public void setRepresentsRealmOrContextAsReference(java.util.List<java.lang.String> representsRealmOrContextList)
Deprecated. 

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

Parameters:
representsRealmOrContextList - the Vector to set.

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 -

setSource

public void setSource(java.util.List<Source> vSourceList)
Sets the value of '_sourceList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vSourceList - the Vector to copy.

setSourceAsReference

public void setSourceAsReference(java.util.List<Source> sourceList)
Deprecated. 

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

Parameters:
sourceList - the Vector to set.

setValueSetDefinitionName

public void setValueSetDefinitionName(java.lang.String valueSetDefinitionName)
Sets the value of field 'valueSetDefinitionName'. The field 'valueSetDefinitionName' has the following description: The name of this value set definition, if any.

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

setValueSetDefinitionURI

public void setValueSetDefinitionURI(java.lang.String valueSetDefinitionURI)
Sets the value of field 'valueSetDefinitionURI'. The field 'valueSetDefinitionURI' has the following description: The URI of this value set definition.

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

unmarshalValueSetDefinition

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

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