org.LexGrid.relations
Class AssociationPredicate

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

public class AssociationPredicate
extends LexGridBase
implements java.io.Serializable

The local identifier of the relation itself. associationName must match a local id of a supportedAssociationName in the corresponding mappings section.

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

Constructor Summary
AssociationPredicate()
           
 
Method Summary
 void addSource(AssociationSource vSource)
           
 void addSource(int index, AssociationSource vSource)
           
 java.util.Enumeration<? extends AssociationSource> enumerateSource()
          Method enumerateSource.
 java.lang.String getAssociationName()
          Returns the value of field 'associationName'.
 AssociationSource[] getSource()
          Method getSource.Returns the contents of the collection in an Array.
 AssociationSource getSource(int index)
          Method getSource.
 java.util.List<AssociationSource> getSourceAsReference()
          Method getSourceAsReference.Returns a reference to '_sourceList'.
 int getSourceCount()
          Method getSourceCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends AssociationSource> iterateSource()
          Method iterateSource.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllSource()
           
 boolean removeSource(AssociationSource vSource)
          Method removeSource.
 AssociationSource removeSourceAt(int index)
          Method removeSourceAt.
 void setAssociationName(java.lang.String associationName)
          Sets the value of field 'associationName'.
 void setSource(AssociationSource[] vSourceArray)
           
 void setSource(int index, AssociationSource vSource)
           
 void setSource(java.util.List<AssociationSource> vSourceList)
          Sets the value of '_sourceList' by copying the given Vector.
 void setSourceAsReference(java.util.List<AssociationSource> sourceList)
          Deprecated.  
static AssociationPredicate unmarshalAssociationPredicate(java.io.Reader reader)
          Method unmarshalAssociationPredicate.
 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

AssociationPredicate

public AssociationPredicate()
Method Detail

addSource

public void addSource(AssociationSource 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,
                      AssociationSource vSource)
               throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vSource -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateSource

public java.util.Enumeration<? extends AssociationSource> enumerateSource()
Method enumerateSource.

Returns:
an Enumeration over all possible elements of this collection

getAssociationName

public java.lang.String getAssociationName()
Returns the value of field 'associationName'. The field 'associationName' has the following description: The local identifier of the relation itself. associationName must match a local id of a supportedAssociationName in the corresponding mappings section.

Returns:
the value of field 'AssociationName'.

getSource

public AssociationSource getSource(int index)
                            throws java.lang.IndexOutOfBoundsException
Method getSource.

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

getSource

public AssociationSource[] 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

getSourceAsReference

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

Returns:
a reference to the Vector backing this class

getSourceCount

public int getSourceCount()
Method getSourceCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateSource

public java.util.Iterator<? extends AssociationSource> 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
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

removeAllSource

public void removeAllSource()

removeSource

public boolean removeSource(AssociationSource vSource)
Method removeSource.

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

removeSourceAt

public AssociationSource removeSourceAt(int index)
Method removeSourceAt.

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

setAssociationName

public void setAssociationName(java.lang.String associationName)
Sets the value of field 'associationName'. The field 'associationName' has the following description: The local identifier of the relation itself. associationName must match a local id of a supportedAssociationName in the corresponding mappings section.

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

setSource

public void setSource(int index,
                      AssociationSource 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(AssociationSource[] vSourceArray)
Parameters:
vSourceArray -

setSource

public void setSource(java.util.List<AssociationSource> vSourceList)
Sets the value of '_sourceList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vSourceList - the Vector to copy.

setSourceAsReference

public void setSourceAsReference(java.util.List<AssociationSource> sourceList)
Deprecated. 

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

Parameters:
sourceList - the Vector to set.

unmarshalAssociationPredicate

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

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