org.LexGrid.relations
Class AssociatableElement

java.lang.Object
  extended by org.mayo.edu.lgModel.LexGridBase
      extended by org.LexGrid.commonTypes.Versionable
          extended by org.LexGrid.relations.AssociatableElement
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AssociationData, AssociationTarget

public class AssociatableElement
extends Versionable
implements java.io.Serializable

Information common to both the entity and data form of the "to" (or right hand) side of an association.

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

Constructor Summary
AssociatableElement()
           
 
Method Summary
 void addAssociationQualification(AssociationQualification vAssociationQualification)
           
 void addAssociationQualification(int index, AssociationQualification vAssociationQualification)
           
 void addUsageContext(int index, java.lang.String vUsageContext)
           
 void addUsageContext(java.lang.String vUsageContext)
           
 java.util.Enumeration<? extends AssociationQualification> enumerateAssociationQualification()
          Method enumerateAssociationQualification.
 java.util.Enumeration<? extends java.lang.String> enumerateUsageContext()
          Method enumerateUsageContext.
 java.lang.String getAssociationInstanceId()
          Returns the value of field 'associationInstanceId'.
 AssociationQualification[] getAssociationQualification()
          Method getAssociationQualification.Returns the contents of the collection in an Array.
 AssociationQualification getAssociationQualification(int index)
          Method getAssociationQualification.
 java.util.List<AssociationQualification> getAssociationQualificationAsReference()
          Method getAssociationQualificationAsReference.Returns a reference to '_associationQualificationList'.
 int getAssociationQualificationCount()
          Method getAssociationQualificationCount.
 java.lang.Boolean getIsDefining()
          Returns the value of field 'isDefining'.
 java.lang.Boolean getIsInferred()
          Returns the value of field 'isInferred'.
 java.lang.String[] getUsageContext()
          Method getUsageContext.Returns the contents of the collection in an Array.
 java.lang.String getUsageContext(int index)
          Method getUsageContext.
 java.util.List<java.lang.String> getUsageContextAsReference()
          Method getUsageContextAsReference.Returns a reference to '_usageContextList'.
 int getUsageContextCount()
          Method getUsageContextCount.
 java.lang.Boolean isIsDefining()
          Returns the value of field 'isDefining'.
 java.lang.Boolean isIsInferred()
          Returns the value of field 'isInferred'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends AssociationQualification> iterateAssociationQualification()
          Method iterateAssociationQualification.
 java.util.Iterator<? extends java.lang.String> iterateUsageContext()
          Method iterateUsageContext.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllAssociationQualification()
           
 void removeAllUsageContext()
           
 boolean removeAssociationQualification(AssociationQualification vAssociationQualification)
          Method removeAssociationQualification.
 AssociationQualification removeAssociationQualificationAt(int index)
          Method removeAssociationQualificationAt.
 boolean removeUsageContext(java.lang.String vUsageContext)
          Method removeUsageContext.
 java.lang.String removeUsageContextAt(int index)
          Method removeUsageContextAt.
 void setAssociationInstanceId(java.lang.String associationInstanceId)
          Sets the value of field 'associationInstanceId'.
 void setAssociationQualification(AssociationQualification[] vAssociationQualificationArray)
           
 void setAssociationQualification(int index, AssociationQualification vAssociationQualification)
           
 void setAssociationQualification(java.util.List<AssociationQualification> vAssociationQualificationList)
          Sets the value of '_associationQualificationList' by copying the given Vector.
 void setAssociationQualificationAsReference(java.util.List<AssociationQualification> associationQualificationList)
          Deprecated.  
 void setIsDefining(java.lang.Boolean isDefining)
          Sets the value of field 'isDefining'.
 void setIsInferred(java.lang.Boolean isInferred)
          Sets the value of field 'isInferred'.
 void setUsageContext(int index, java.lang.String vUsageContext)
           
 void setUsageContext(java.util.List<java.lang.String> vUsageContextList)
          Sets the value of '_usageContextList' by copying the given Vector.
 void setUsageContext(java.lang.String[] vUsageContextArray)
           
 void setUsageContextAsReference(java.util.List<java.lang.String> usageContextList)
          Deprecated.  
static AssociatableElement unmarshalAssociatableElement(java.io.Reader reader)
          Method unmarshalAssociatableElement.
 void validate()
           
 
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 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

AssociatableElement

public AssociatableElement()
Method Detail

addAssociationQualification

public void addAssociationQualification(AssociationQualification vAssociationQualification)
                                 throws java.lang.IndexOutOfBoundsException
Parameters:
vAssociationQualification -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAssociationQualification

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

addUsageContext

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

addUsageContext

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

enumerateAssociationQualification

public java.util.Enumeration<? extends AssociationQualification> enumerateAssociationQualification()
Method enumerateAssociationQualification.

Returns:
an Enumeration over all possible elements of this collection

enumerateUsageContext

public java.util.Enumeration<? extends java.lang.String> enumerateUsageContext()
Method enumerateUsageContext.

Returns:
an Enumeration over all possible elements of this collection

getAssociationInstanceId

public java.lang.String getAssociationInstanceId()
Returns the value of field 'associationInstanceId'. The field 'associationInstanceId' has the following description: The unique identifier assigned to the particular relation, from, to triple.

Returns:
the value of field 'AssociationInstanceId'.

getAssociationQualification

public AssociationQualification getAssociationQualification(int index)
                                                     throws java.lang.IndexOutOfBoundsException
Method getAssociationQualification.

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

getAssociationQualification

public AssociationQualification[] getAssociationQualification()
Method getAssociationQualification.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

getAssociationQualificationAsReference

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

Returns:
a reference to the Vector backing this class

getAssociationQualificationCount

public int getAssociationQualificationCount()
Method getAssociationQualificationCount.

Returns:
the size of this collection

getIsDefining

public java.lang.Boolean getIsDefining()
Returns the value of field 'isDefining'. The field 'isDefining' has the following description: True means that this association instance is considered to be part of the definition of source entity, false means that it is an "accidental" characteristic. If omitted, this information is not known.

Returns:
the value of field 'IsDefining'.

getIsInferred

public java.lang.Boolean getIsInferred()
Returns the value of field 'isInferred'. The field 'isInferred' has the following description: True means that this association instance isn't asserted in the scheme, but is inferred by a classifier. Default: false

Returns:
the value of field 'IsInferred'.

getUsageContext

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

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

getUsageContext

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

getUsageContextAsReference

public java.util.List<java.lang.String> getUsageContextAsReference()
Method getUsageContextAsReference.Returns a reference to '_usageContextList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getUsageContextCount

public int getUsageContextCount()
Method getUsageContextCount.

Returns:
the size of this collection

isIsDefining

public java.lang.Boolean isIsDefining()
Returns the value of field 'isDefining'. The field 'isDefining' has the following description: True means that this association instance is considered to be part of the definition of source entity, false means that it is an "accidental" characteristic. If omitted, this information is not known.

Returns:
the value of field 'IsDefining'.

isIsInferred

public java.lang.Boolean isIsInferred()
Returns the value of field 'isInferred'. The field 'isInferred' has the following description: True means that this association instance isn't asserted in the scheme, but is inferred by a classifier. Default: false

Returns:
the value of field 'IsInferred'.

isValid

public boolean isValid()
Method isValid.

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

iterateAssociationQualification

public java.util.Iterator<? extends AssociationQualification> iterateAssociationQualification()
Method iterateAssociationQualification.

Returns:
an Iterator over all possible elements in this collection

iterateUsageContext

public java.util.Iterator<? extends java.lang.String> iterateUsageContext()
Method iterateUsageContext.

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

removeAllAssociationQualification

public void removeAllAssociationQualification()

removeAllUsageContext

public void removeAllUsageContext()

removeAssociationQualification

public boolean removeAssociationQualification(AssociationQualification vAssociationQualification)
Method removeAssociationQualification.

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

removeAssociationQualificationAt

public AssociationQualification removeAssociationQualificationAt(int index)
Method removeAssociationQualificationAt.

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

removeUsageContext

public boolean removeUsageContext(java.lang.String vUsageContext)
Method removeUsageContext.

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

removeUsageContextAt

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

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

setAssociationInstanceId

public void setAssociationInstanceId(java.lang.String associationInstanceId)
Sets the value of field 'associationInstanceId'. The field 'associationInstanceId' has the following description: The unique identifier assigned to the particular relation, from, to triple.

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

setAssociationQualification

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

setAssociationQualification

public void setAssociationQualification(AssociationQualification[] vAssociationQualificationArray)
Parameters:
vAssociationQualificationArray -

setAssociationQualification

public void setAssociationQualification(java.util.List<AssociationQualification> vAssociationQualificationList)
Sets the value of '_associationQualificationList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vAssociationQualificationList - the Vector to copy.

setAssociationQualificationAsReference

public void setAssociationQualificationAsReference(java.util.List<AssociationQualification> associationQualificationList)
Deprecated. 

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

Parameters:
associationQualificationList - the Vector to set.

setIsDefining

public void setIsDefining(java.lang.Boolean isDefining)
Sets the value of field 'isDefining'. The field 'isDefining' has the following description: True means that this association instance is considered to be part of the definition of source entity, false means that it is an "accidental" characteristic. If omitted, this information is not known.

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

setIsInferred

public void setIsInferred(java.lang.Boolean isInferred)
Sets the value of field 'isInferred'. The field 'isInferred' has the following description: True means that this association instance isn't asserted in the scheme, but is inferred by a classifier. Default: false

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

setUsageContext

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

setUsageContext

public void setUsageContext(java.lang.String[] vUsageContextArray)
Parameters:
vUsageContextArray -

setUsageContext

public void setUsageContext(java.util.List<java.lang.String> vUsageContextList)
Sets the value of '_usageContextList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vUsageContextList - the Vector to copy.

setUsageContextAsReference

public void setUsageContextAsReference(java.util.List<java.lang.String> usageContextList)
Deprecated. 

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

Parameters:
usageContextList - the Vector to set.

unmarshalAssociatableElement

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

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