org.LexGrid.valueDomains
Class PickListDefinition

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

public class PickListDefinition
extends VersionableAndDescribable
implements java.io.Serializable

An ordered list of entity codes and corresponding presentations drawn from a value domain.

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

Constructor Summary
PickListDefinition()
           
 
Method Summary
 void addDefaultPickContext(int index, java.lang.String vDefaultPickContext)
           
 void addDefaultPickContext(java.lang.String vDefaultPickContext)
           
 void addPickListEntryNode(int index, PickListEntryNode vPickListEntryNode)
           
 void addPickListEntryNode(PickListEntryNode vPickListEntryNode)
           
 void addSource(int index, Source vSource)
           
 void addSource(Source vSource)
           
 java.util.Enumeration<java.lang.String> enumerateDefaultPickContext()
          Method enumerateDefaultPickContext.
 java.util.Enumeration<PickListEntryNode> enumeratePickListEntryNode()
          Method enumeratePickListEntryNode.
 java.util.Enumeration<Source> enumerateSource()
          Method enumerateSource.
 java.lang.Boolean getCompleteDomain()
          Returns the value of field 'completeDomain'.
 java.lang.String getDefaultEntityCodeNamespace()
          Returns the value of field 'defaultEntityCodeNamespace'.
 java.lang.String getDefaultLanguage()
          Returns the value of field 'defaultLanguage'.
 java.lang.String[] getDefaultPickContext()
          Method getDefaultPickContext.Returns the contents of the collection in an Array.
 java.lang.String getDefaultPickContext(int index)
          Method getDefaultPickContext.
 int getDefaultPickContextCount()
          Method getDefaultPickContextCount.
 java.lang.String getDefaultSortOrder()
          Returns the value of field 'defaultSortOrder'.
 Mappings getMappings()
          Returns the value of field 'mappings'.
 PickListEntryNode[] getPickListEntryNode()
          Method getPickListEntryNode.Returns the contents of the collection in an Array.
 PickListEntryNode getPickListEntryNode(int index)
          Method getPickListEntryNode.
 int getPickListEntryNodeCount()
          Method getPickListEntryNodeCount.
 java.lang.String getPickListId()
          Returns the value of field 'pickListId'.
 Properties getProperties()
          Returns the value of field 'properties'.
 java.lang.String getRepresentsValueDomain()
          Returns the value of field 'representsValueDomain'.
 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.Boolean isCompleteDomain()
          Returns the value of field 'completeDomain'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<java.lang.String> iterateDefaultPickContext()
          Method iterateDefaultPickContext.
 java.util.Iterator<PickListEntryNode> iteratePickListEntryNode()
          Method iteratePickListEntryNode.
 java.util.Iterator<Source> iterateSource()
          Method iterateSource.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllDefaultPickContext()
           
 void removeAllPickListEntryNode()
           
 void removeAllSource()
           
 boolean removeDefaultPickContext(java.lang.String vDefaultPickContext)
          Method removeDefaultPickContext.
 java.lang.String removeDefaultPickContextAt(int index)
          Method removeDefaultPickContextAt.
 boolean removePickListEntryNode(PickListEntryNode vPickListEntryNode)
          Method removePickListEntryNode.
 PickListEntryNode removePickListEntryNodeAt(int index)
          Method removePickListEntryNodeAt.
 boolean removeSource(Source vSource)
          Method removeSource.
 Source removeSourceAt(int index)
          Method removeSourceAt.
 void setCompleteDomain(java.lang.Boolean completeDomain)
          Sets the value of field 'completeDomain'.
 void setDefaultEntityCodeNamespace(java.lang.String defaultEntityCodeNamespace)
          Sets the value of field 'defaultEntityCodeNamespace'.
 void setDefaultLanguage(java.lang.String defaultLanguage)
          Sets the value of field 'defaultLanguage'.
 void setDefaultPickContext(int index, java.lang.String vDefaultPickContext)
           
 void setDefaultPickContext(java.lang.String[] vDefaultPickContextArray)
           
 void setDefaultSortOrder(java.lang.String defaultSortOrder)
          Sets the value of field 'defaultSortOrder'.
 void setMappings(Mappings mappings)
          Sets the value of field 'mappings'.
 void setPickListEntryNode(int index, PickListEntryNode vPickListEntryNode)
           
 void setPickListEntryNode(PickListEntryNode[] vPickListEntryNodeArray)
           
 void setPickListId(java.lang.String pickListId)
          Sets the value of field 'pickListId'.
 void setProperties(Properties properties)
          Sets the value of field 'properties'.
 void setRepresentsValueDomain(java.lang.String representsValueDomain)
          Sets the value of field 'representsValueDomain'.
 void setSource(int index, Source vSource)
           
 void setSource(Source[] vSourceArray)
           
static PickListDefinition unmarshalPickListDefinition(java.io.Reader reader)
          Method unmarshalPickListDefinition.
 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

PickListDefinition

public PickListDefinition()
Method Detail

addDefaultPickContext

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

addDefaultPickContext

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

addPickListEntryNode

public void addPickListEntryNode(PickListEntryNode vPickListEntryNode)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
vPickListEntryNode -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPickListEntryNode

public void addPickListEntryNode(int index,
                                 PickListEntryNode vPickListEntryNode)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vPickListEntryNode -
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

enumerateDefaultPickContext

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

Returns:
an Enumeration over all possible elements of this collection

enumeratePickListEntryNode

public java.util.Enumeration<PickListEntryNode> enumeratePickListEntryNode()
Method enumeratePickListEntryNode.

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

getCompleteDomain

public java.lang.Boolean getCompleteDomain()
Returns the value of field 'completeDomain'. The field 'completeDomain' has the following description: True means that this pick list should represent all of the entries in the domain. Any active entity codes that aren't in the specific pick list entries are added to the end, using the designations identified by the defaultLanguage, defaultSortOrder and defaultPickContext. Default: false

Returns:
the value of field 'CompleteDomain'.

getDefaultEntityCodeNamespace

public java.lang.String getDefaultEntityCodeNamespace()
Returns the value of field 'defaultEntityCodeNamespace'. The field 'defaultEntityCodeNamespace' has the following description: Local name of the namespace to which the entry codes in this list belong. defaultEntityCodeNamespace must match a local id of a supportedNamespace in the mappings section.

Returns:
the value of field 'DefaultEntityCodeNamespace'.

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 to generate the text of this pick list if not otherwise specified. Note that this language does NOT necessarily have any coorelation with the language of a pickListEntry itself or the language of the target user. defaultLanguage must match a local id of a supportedLanguage in the mappings section.

Returns:
the value of field 'DefaultLanguage'.

getDefaultPickContext

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

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

getDefaultPickContext

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

getDefaultPickContextCount

public int getDefaultPickContextCount()
Method getDefaultPickContextCount.

Returns:
the size of this collection

getDefaultSortOrder

public java.lang.String getDefaultSortOrder()
Returns the value of field 'defaultSortOrder'. The field 'defaultSortOrder' has the following description: The local identifier of a sort order that is used as the default in the definition of the pick list

Returns:
the value of field 'DefaultSortOrder'.

getMappings

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

Returns:
the value of field 'Mappings'.

getPickListEntryNode

public PickListEntryNode getPickListEntryNode(int index)
                                       throws java.lang.IndexOutOfBoundsException
Method getPickListEntryNode.

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

getPickListEntryNode

public PickListEntryNode[] getPickListEntryNode()
Method getPickListEntryNode.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

getPickListEntryNodeCount

public int getPickListEntryNodeCount()
Method getPickListEntryNodeCount.

Returns:
the size of this collection

getPickListId

public java.lang.String getPickListId()
Returns the value of field 'pickListId'. The field 'pickListId' has the following description: An identifier that uniquely names this list within the context of the collection.

Returns:
the value of field 'PickListId'.

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 pick list.

Returns:
the value of field 'Properties'.

getRepresentsValueDomain

public java.lang.String getRepresentsValueDomain()
Returns the value of field 'representsValueDomain'. The field 'representsValueDomain' has the following description: The URI of the value domain definition that is represented by this pick list

Returns:
the value of field 'RepresentsValueDomain'.

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

isCompleteDomain

public java.lang.Boolean isCompleteDomain()
Returns the value of field 'completeDomain'. The field 'completeDomain' has the following description: True means that this pick list should represent all of the entries in the domain. Any active entity codes that aren't in the specific pick list entries are added to the end, using the designations identified by the defaultLanguage, defaultSortOrder and defaultPickContext. Default: false

Returns:
the value of field 'CompleteDomain'.

isValid

public boolean isValid()
Method isValid.

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

iterateDefaultPickContext

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

Returns:
an Iterator over all possible elements in this collection

iteratePickListEntryNode

public java.util.Iterator<PickListEntryNode> iteratePickListEntryNode()
Method iteratePickListEntryNode.

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

removeAllDefaultPickContext

public void removeAllDefaultPickContext()

removeAllPickListEntryNode

public void removeAllPickListEntryNode()

removeAllSource

public void removeAllSource()

removeDefaultPickContext

public boolean removeDefaultPickContext(java.lang.String vDefaultPickContext)
Method removeDefaultPickContext.

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

removeDefaultPickContextAt

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

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

removePickListEntryNode

public boolean removePickListEntryNode(PickListEntryNode vPickListEntryNode)
Method removePickListEntryNode.

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

removePickListEntryNodeAt

public PickListEntryNode removePickListEntryNodeAt(int index)
Method removePickListEntryNodeAt.

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

setCompleteDomain

public void setCompleteDomain(java.lang.Boolean completeDomain)
Sets the value of field 'completeDomain'. The field 'completeDomain' has the following description: True means that this pick list should represent all of the entries in the domain. Any active entity codes that aren't in the specific pick list entries are added to the end, using the designations identified by the defaultLanguage, defaultSortOrder and defaultPickContext. Default: false

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

setDefaultEntityCodeNamespace

public void setDefaultEntityCodeNamespace(java.lang.String defaultEntityCodeNamespace)
Sets the value of field 'defaultEntityCodeNamespace'. The field 'defaultEntityCodeNamespace' has the following description: Local name of the namespace to which the entry codes in this list belong. defaultEntityCodeNamespace must match a local id of a supportedNamespace in the mappings section.

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

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 to generate the text of this pick list if not otherwise specified. Note that this language does NOT necessarily have any coorelation with the language of a pickListEntry itself or the language of the target user. defaultLanguage must match a local id of a supportedLanguage in the mappings section.

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

setDefaultPickContext

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

setDefaultPickContext

public void setDefaultPickContext(java.lang.String[] vDefaultPickContextArray)
Parameters:
vDefaultPickContextArray -

setDefaultSortOrder

public void setDefaultSortOrder(java.lang.String defaultSortOrder)
Sets the value of field 'defaultSortOrder'. The field 'defaultSortOrder' has the following description: The local identifier of a sort order that is used as the default in the definition of the pick list

Parameters:
defaultSortOrder - the value of field 'defaultSortOrder'

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 pick list definition. This set of mappings must be supplied when a pick list definition is included in a changedEntry and must be empty when it is included in a pickLists collection, as the collection itself carries the mappings

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

setPickListEntryNode

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

setPickListEntryNode

public void setPickListEntryNode(PickListEntryNode[] vPickListEntryNodeArray)
Parameters:
vPickListEntryNodeArray -

setPickListId

public void setPickListId(java.lang.String pickListId)
Sets the value of field 'pickListId'. The field 'pickListId' has the following description: An identifier that uniquely names this list within the context of the collection.

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

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 pick list.

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

setRepresentsValueDomain

public void setRepresentsValueDomain(java.lang.String representsValueDomain)
Sets the value of field 'representsValueDomain'. The field 'representsValueDomain' has the following description: The URI of the value domain definition that is represented by this pick list

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

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 -

unmarshalPickListDefinition

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

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