org.LexGrid.LexOnt
Class CsmfAssociationDefinition

java.lang.Object
  extended by org.LexGrid.LexOnt.CsmfAssociationDefinition
All Implemented Interfaces:
java.io.Serializable

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

Class CsmfAssociationDefinition.

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

Constructor Summary
CsmfAssociationDefinition()
           
 
Method Summary
 void addAssoc(Association vAssoc)
           
 void addAssoc(int index, Association vAssoc)
           
 java.util.Enumeration<Association> enumerateAssoc()
          Method enumerateAssoc.
 Association[] getAssoc()
          Method getAssoc.Returns the contents of the collection in an Array.
 Association getAssoc(int index)
          Method getAssoc.
 int getAssocCount()
          Method getAssocCount.
 java.lang.Boolean getToUpdate()
          Returns the value of field 'toUpdate'.
 java.lang.Boolean isToUpdate()
          Returns the value of field 'toUpdate'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<Association> iterateAssoc()
          Method iterateAssoc.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllAssoc()
           
 boolean removeAssoc(Association vAssoc)
          Method removeAssoc.
 Association removeAssocAt(int index)
          Method removeAssocAt.
 void setAssoc(Association[] vAssocArray)
           
 void setAssoc(int index, Association vAssoc)
           
 void setToUpdate(java.lang.Boolean toUpdate)
          Sets the value of field 'toUpdate'.
static CsmfAssociationDefinition unmarshalCsmfAssociationDefinition(java.io.Reader reader)
          Method unmarshalCsmfAssociationDefinition.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsmfAssociationDefinition

public CsmfAssociationDefinition()
Method Detail

addAssoc

public void addAssoc(Association vAssoc)
              throws java.lang.IndexOutOfBoundsException
Parameters:
vAssoc -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAssoc

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

enumerateAssoc

public java.util.Enumeration<Association> enumerateAssoc()
Method enumerateAssoc.

Returns:
an Enumeration over all possible elements of this collection

getAssoc

public Association getAssoc(int index)
                     throws java.lang.IndexOutOfBoundsException
Method getAssoc.

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

getAssoc

public Association[] getAssoc()
Method getAssoc.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

getAssocCount

public int getAssocCount()
Method getAssocCount.

Returns:
the size of this collection

getToUpdate

public java.lang.Boolean getToUpdate()
Returns the value of field 'toUpdate'. The field 'toUpdate' has the following description: If this flag is set to true, use the localId to check if the entry already exists. If it exists, update that entry with the manifest information. If the entry doesn't exist, add it. If the flag is false, use the localId to check it entry already exists. If it doesn't exist, add it. If it exists, do nothing.

Returns:
the value of field 'ToUpdate'.

isToUpdate

public java.lang.Boolean isToUpdate()
Returns the value of field 'toUpdate'. The field 'toUpdate' has the following description: If this flag is set to true, use the localId to check if the entry already exists. If it exists, update that entry with the manifest information. If the entry doesn't exist, add it. If the flag is false, use the localId to check it entry already exists. If it doesn't exist, add it. If it exists, do nothing.

Returns:
the value of field 'ToUpdate'.

isValid

public boolean isValid()
Method isValid.

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

iterateAssoc

public java.util.Iterator<Association> iterateAssoc()
Method iterateAssoc.

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

removeAllAssoc

public void removeAllAssoc()

removeAssoc

public boolean removeAssoc(Association vAssoc)
Method removeAssoc.

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

removeAssocAt

public Association removeAssocAt(int index)
Method removeAssocAt.

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

setAssoc

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

setAssoc

public void setAssoc(Association[] vAssocArray)
Parameters:
vAssocArray -

setToUpdate

public void setToUpdate(java.lang.Boolean toUpdate)
Sets the value of field 'toUpdate'. The field 'toUpdate' has the following description: If this flag is set to true, use the localId to check if the entry already exists. If it exists, update that entry with the manifest information. If the entry doesn't exist, add it. If the flag is false, use the localId to check it entry already exists. If it doesn't exist, add it. If it exists, do nothing.

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

unmarshalCsmfAssociationDefinition

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

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