org.LexGrid.valueDomains
Class PickListEntry

java.lang.Object
  extended by org.LexGrid.valueDomains.PickListEntry
All Implemented Interfaces:
java.io.Serializable

public class PickListEntry
extends java.lang.Object
implements java.io.Serializable

An entity code and corresponding textual representation.

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

Constructor Summary
PickListEntry()
           
 
Method Summary
 void addPickContext(int index, java.lang.String vPickContext)
           
 void addPickContext(java.lang.String vPickContext)
           
 java.util.Enumeration<java.lang.String> enumeratePickContext()
          Method enumeratePickContext.
 java.lang.String getEntityCode()
          Returns the value of field 'entityCode'.
 java.lang.String getEntityCodeNamespace()
          Returns the value of field 'entityCodeNamespace'.
 java.lang.Long getEntryOrder()
          Returns the value of field 'entryOrder'.
 java.lang.Boolean getIsDefault()
          Returns the value of field 'isDefault'.
 java.lang.String getLanguage()
          Returns the value of field 'language'.
 java.lang.Boolean getMatchIfNoContext()
          Returns the value of field 'matchIfNoContext'.
 java.lang.String[] getPickContext()
          Method getPickContext.Returns the contents of the collection in an Array.
 java.lang.String getPickContext(int index)
          Method getPickContext.
 int getPickContextCount()
          Method getPickContextCount.
 java.lang.String getPickText()
          Returns the value of field 'pickText'.
 java.lang.String getPropertyId()
          Returns the value of field 'propertyId'.
 java.lang.Boolean isIsDefault()
          Returns the value of field 'isDefault'.
 java.lang.Boolean isMatchIfNoContext()
          Returns the value of field 'matchIfNoContext'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<java.lang.String> iteratePickContext()
          Method iteratePickContext.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllPickContext()
           
 boolean removePickContext(java.lang.String vPickContext)
          Method removePickContext.
 java.lang.String removePickContextAt(int index)
          Method removePickContextAt.
 void setEntityCode(java.lang.String entityCode)
          Sets the value of field 'entityCode'.
 void setEntityCodeNamespace(java.lang.String entityCodeNamespace)
          Sets the value of field 'entityCodeNamespace'.
 void setEntryOrder(java.lang.Long entryOrder)
          Sets the value of field 'entryOrder'.
 void setIsDefault(java.lang.Boolean isDefault)
          Sets the value of field 'isDefault'.
 void setLanguage(java.lang.String language)
          Sets the value of field 'language'.
 void setMatchIfNoContext(java.lang.Boolean matchIfNoContext)
          Sets the value of field 'matchIfNoContext'.
 void setPickContext(int index, java.lang.String vPickContext)
           
 void setPickContext(java.lang.String[] vPickContextArray)
           
 void setPickText(java.lang.String pickText)
          Sets the value of field 'pickText'.
 void setPropertyId(java.lang.String propertyId)
          Sets the value of field 'propertyId'.
static PickListEntry unmarshalPickListEntry(java.io.Reader reader)
          Method unmarshalPickListEntry.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PickListEntry

public PickListEntry()
Method Detail

addPickContext

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

addPickContext

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

enumeratePickContext

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

Returns:
an Enumeration over all possible elements of this collection

getEntityCode

public java.lang.String getEntityCode()
Returns the value of field 'entityCode'. The field 'entityCode' has the following description: Entity code associated with this entry.

Returns:
the value of field 'EntityCode'.

getEntityCodeNamespace

public java.lang.String getEntityCodeNamespace()
Returns the value of field 'entityCodeNamespace'. The field 'entityCodeNamespace' has the following description: Local identifier of the namespace of the entity code if different than the pickListDefinition defaultEntityCodeNamespace. entityCodeNamespace must match a local id of a supportedNamespace in the mappings section.

Returns:
the value of field 'EntityCodeNamespace'.

getEntryOrder

public java.lang.Long getEntryOrder()
Returns the value of field 'entryOrder'. The field 'entryOrder' has the following description: Relative order of this entry in the list. pickListEntries without a supplied order follow the all entries with an order, and the order is not defined.

Returns:
the value of field 'EntryOrder'.

getIsDefault

public java.lang.Boolean getIsDefault()
Returns the value of field 'isDefault'. The field 'isDefault' has the following description: True means that this is the default entry for the supplied language and context.

Returns:
the value of field 'IsDefault'.

getLanguage

public java.lang.String getLanguage()
Returns the value of field 'language'. The field 'language' has the following description: The local name of the language to be used when the application/user supplies a selection language matches. If absent, this matches all languages. language must match a local id od of a supportedLanguage in the mappings section.

Returns:
the value of field 'Language'.

getMatchIfNoContext

public java.lang.Boolean getMatchIfNoContext()
Returns the value of field 'matchIfNoContext'. The field 'matchIfNoContext' has the following description: True means that this entry can be used if no contexts are supplied, even though pickContext ispresent.

Returns:
the value of field 'MatchIfNoContext'.

getPickContext

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

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

getPickContext

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

getPickContextCount

public int getPickContextCount()
Method getPickContextCount.

Returns:
the size of this collection

getPickText

public java.lang.String getPickText()
Returns the value of field 'pickText'. The field 'pickText' has the following description: The text that represents this node in the pick list. Some business rules may require that this string match a presentation associated with the entityCode

Returns:
the value of field 'PickText'.

getPropertyId

public java.lang.String getPropertyId()
Returns the value of field 'propertyId'. The field 'propertyId' has the following description: The property identifier associated with the entityCode and entityCodeNamespace that the pickText was derived from. If absent, the pick text can be anything. Some terminologies may have business rules requiring this attribute to be present.

Returns:
the value of field 'PropertyId'.

isIsDefault

public java.lang.Boolean isIsDefault()
Returns the value of field 'isDefault'. The field 'isDefault' has the following description: True means that this is the default entry for the supplied language and context.

Returns:
the value of field 'IsDefault'.

isMatchIfNoContext

public java.lang.Boolean isMatchIfNoContext()
Returns the value of field 'matchIfNoContext'. The field 'matchIfNoContext' has the following description: True means that this entry can be used if no contexts are supplied, even though pickContext ispresent.

Returns:
the value of field 'MatchIfNoContext'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iteratePickContext

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

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

removeAllPickContext

public void removeAllPickContext()

removePickContext

public boolean removePickContext(java.lang.String vPickContext)
Method removePickContext.

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

removePickContextAt

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

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

setEntityCode

public void setEntityCode(java.lang.String entityCode)
Sets the value of field 'entityCode'. The field 'entityCode' has the following description: Entity code associated with this entry.

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

setEntityCodeNamespace

public void setEntityCodeNamespace(java.lang.String entityCodeNamespace)
Sets the value of field 'entityCodeNamespace'. The field 'entityCodeNamespace' has the following description: Local identifier of the namespace of the entity code if different than the pickListDefinition defaultEntityCodeNamespace. entityCodeNamespace must match a local id of a supportedNamespace in the mappings section.

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

setEntryOrder

public void setEntryOrder(java.lang.Long entryOrder)
Sets the value of field 'entryOrder'. The field 'entryOrder' has the following description: Relative order of this entry in the list. pickListEntries without a supplied order follow the all entries with an order, and the order is not defined.

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

setIsDefault

public void setIsDefault(java.lang.Boolean isDefault)
Sets the value of field 'isDefault'. The field 'isDefault' has the following description: True means that this is the default entry for the supplied language and context.

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

setLanguage

public void setLanguage(java.lang.String language)
Sets the value of field 'language'. The field 'language' has the following description: The local name of the language to be used when the application/user supplies a selection language matches. If absent, this matches all languages. language must match a local id od of a supportedLanguage in the mappings section.

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

setMatchIfNoContext

public void setMatchIfNoContext(java.lang.Boolean matchIfNoContext)
Sets the value of field 'matchIfNoContext'. The field 'matchIfNoContext' has the following description: True means that this entry can be used if no contexts are supplied, even though pickContext ispresent.

Parameters:
matchIfNoContext - the value of field 'matchIfNoContext'

setPickContext

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

setPickContext

public void setPickContext(java.lang.String[] vPickContextArray)
Parameters:
vPickContextArray -

setPickText

public void setPickText(java.lang.String pickText)
Sets the value of field 'pickText'. The field 'pickText' has the following description: The text that represents this node in the pick list. Some business rules may require that this string match a presentation associated with the entityCode

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

setPropertyId

public void setPropertyId(java.lang.String propertyId)
Sets the value of field 'propertyId'. The field 'propertyId' has the following description: The property identifier associated with the entityCode and entityCodeNamespace that the pickText was derived from. If absent, the pick text can be anything. Some terminologies may have business rules requiring this attribute to be present.

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

unmarshalPickListEntry

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

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