org.LexGrid.valueDomains
Class ValueDomainDefinition

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

public class ValueDomainDefinition
extends VersionableAndDescribable
implements java.io.Serializable

A definition of a given value domain. A value domain can be a simple description with no associated value domain 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.NOTE: Value domain definitions aren't versionable - changing the definition of the domain changes its identity.

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

Constructor Summary
ValueDomainDefinition()
           
 
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<DefinitionEntry> enumerateDefinitionEntry()
          Method enumerateDefinitionEntry.
 java.util.Enumeration<java.lang.String> enumerateRepresentsRealmOrContext()
          Method enumerateRepresentsRealmOrContext.
 java.util.Enumeration<Source> enumerateSource()
          Method enumerateSource.
 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.
 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.
 int getRepresentsRealmOrContextCount()
          Method getRepresentsRealmOrContextCount.
 Source[] getSource()
          Method getSource.Returns the contents of the collection in an Array.
 Source getSource(int index)
          Method getSource.
 int getSourceCount()
          Method getSourceCount.
 java.lang.String getValueDomainName()
          Returns the value of field 'valueDomainName'.
 java.lang.String getValueDomainURI()
          Returns the value of field 'valueDomainURI'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<DefinitionEntry> iterateDefinitionEntry()
          Method iterateDefinitionEntry.
 java.util.Iterator<java.lang.String> iterateRepresentsRealmOrContext()
          Method iterateRepresentsRealmOrContext.
 java.util.Iterator<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 setDefaultCodingScheme(java.lang.String defaultCodingScheme)
          Sets the value of field 'defaultCodingScheme'.
 void setDefinitionEntry(DefinitionEntry[] vDefinitionEntryArray)
           
 void setDefinitionEntry(int index, DefinitionEntry vDefinitionEntry)
           
 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.lang.String[] vRepresentsRealmOrContextArray)
           
 void setSource(int index, Source vSource)
           
 void setSource(Source[] vSourceArray)
           
 void setValueDomainName(java.lang.String valueDomainName)
          Sets the value of field 'valueDomainName'.
 void setValueDomainURI(java.lang.String valueDomainURI)
          Sets the value of field 'valueDomainURI'.
static ValueDomainDefinition unmarshalValueDomainDefinition(java.io.Reader reader)
          Method unmarshalValueDomainDefinition.
 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

ValueDomainDefinition

public ValueDomainDefinition()
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<DefinitionEntry> enumerateDefinitionEntry()
Method enumerateDefinitionEntry.

Returns:
an Enumeration over all possible elements of this collection

enumerateRepresentsRealmOrContext

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

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

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 domain 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.valueDomains.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

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 domain definition. This set of mappings must be supplied when a value domain definition is included in a changedEntry and must be empty when it is included in a valueDomains 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 propeties used in the description of this value domain.

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

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

getSourceCount

public int getSourceCount()
Method getSourceCount.

Returns:
the size of this collection

getValueDomainName

public java.lang.String getValueDomainName()
Returns the value of field 'valueDomainName'. The field 'valueDomainName' has the following description: The name of this domain, if any.

Returns:
the value of field 'ValueDomainName'.

getValueDomainURI

public java.lang.String getValueDomainURI()
Returns the value of field 'valueDomainURI'. The field 'valueDomainURI' has the following description: The URI of this value domain.

Returns:
the value of field 'ValueDomainURI'.

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<DefinitionEntry> iterateDefinitionEntry()
Method iterateDefinitionEntry.

Returns:
an Iterator over all possible elements in this collection

iterateRepresentsRealmOrContext

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

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

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

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 domain 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 -

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 domain definition. This set of mappings must be supplied when a value domain definition is included in a changedEntry and must be empty when it is included in a valueDomains 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 propeties used in the description of this value domain.

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 -

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 -

setValueDomainName

public void setValueDomainName(java.lang.String valueDomainName)
Sets the value of field 'valueDomainName'. The field 'valueDomainName' has the following description: The name of this domain, if any.

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

setValueDomainURI

public void setValueDomainURI(java.lang.String valueDomainURI)
Sets the value of field 'valueDomainURI'. The field 'valueDomainURI' has the following description: The URI of this value domain.

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

unmarshalValueDomainDefinition

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

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