org.LexGrid.codingSchemes
Class CodingSchemes

java.lang.Object
  extended by org.mayo.edu.lgModel.LexGridBase
      extended by org.LexGrid.codingSchemes.CodingSchemes
All Implemented Interfaces:
java.io.Serializable

public class CodingSchemes
extends LexGridBase
implements java.io.Serializable

A collection of one or more coding schemes.

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

Constructor Summary
CodingSchemes()
           
 
Method Summary
 void addCodingScheme(CodingScheme vCodingScheme)
           
 void addCodingScheme(int index, CodingScheme vCodingScheme)
           
 java.util.Enumeration<? extends CodingScheme> enumerateCodingScheme()
          Method enumerateCodingScheme.
 CodingScheme[] getCodingScheme()
          Method getCodingScheme.Returns the contents of the collection in an Array.
 CodingScheme getCodingScheme(int index)
          Method getCodingScheme.
 java.util.List<CodingScheme> getCodingSchemeAsReference()
          Method getCodingSchemeAsReference.Returns a reference to '_codingSchemeList'.
 int getCodingSchemeCount()
          Method getCodingSchemeCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends CodingScheme> iterateCodingScheme()
          Method iterateCodingScheme.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllCodingScheme()
           
 boolean removeCodingScheme(CodingScheme vCodingScheme)
          Method removeCodingScheme.
 CodingScheme removeCodingSchemeAt(int index)
          Method removeCodingSchemeAt.
 void setCodingScheme(CodingScheme[] vCodingSchemeArray)
           
 void setCodingScheme(int index, CodingScheme vCodingScheme)
           
 void setCodingScheme(java.util.List<CodingScheme> vCodingSchemeList)
          Sets the value of '_codingSchemeList' by copying the given Vector.
 void setCodingSchemeAsReference(java.util.List<CodingScheme> codingSchemeList)
          Deprecated.  
static CodingSchemes unmarshalCodingSchemes(java.io.Reader reader)
          Method unmarshalCodingSchemes.
 void validate()
           
 
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

CodingSchemes

public CodingSchemes()
Method Detail

addCodingScheme

public void addCodingScheme(CodingScheme vCodingScheme)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
vCodingScheme -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCodingScheme

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

enumerateCodingScheme

public java.util.Enumeration<? extends CodingScheme> enumerateCodingScheme()
Method enumerateCodingScheme.

Returns:
an Enumeration over all possible elements of this collection

getCodingScheme

public CodingScheme getCodingScheme(int index)
                             throws java.lang.IndexOutOfBoundsException
Method getCodingScheme.

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

getCodingScheme

public CodingScheme[] getCodingScheme()
Method getCodingScheme.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

getCodingSchemeAsReference

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

Returns:
a reference to the Vector backing this class

getCodingSchemeCount

public int getCodingSchemeCount()
Method getCodingSchemeCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateCodingScheme

public java.util.Iterator<? extends CodingScheme> iterateCodingScheme()
Method iterateCodingScheme.

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

removeAllCodingScheme

public void removeAllCodingScheme()

removeCodingScheme

public boolean removeCodingScheme(CodingScheme vCodingScheme)
Method removeCodingScheme.

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

removeCodingSchemeAt

public CodingScheme removeCodingSchemeAt(int index)
Method removeCodingSchemeAt.

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

setCodingScheme

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

setCodingScheme

public void setCodingScheme(CodingScheme[] vCodingSchemeArray)
Parameters:
vCodingSchemeArray -

setCodingScheme

public void setCodingScheme(java.util.List<CodingScheme> vCodingSchemeList)
Sets the value of '_codingSchemeList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vCodingSchemeList - the Vector to copy.

setCodingSchemeAsReference

public void setCodingSchemeAsReference(java.util.List<CodingScheme> codingSchemeList)
Deprecated. 

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

Parameters:
codingSchemeList - the Vector to set.

unmarshalCodingSchemes

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

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