org.LexGrid.relations
Class Association

java.lang.Object
  extended by org.LexGrid.commonTypes.Versionable
      extended by org.LexGrid.commonTypes.VersionableAndDescribable
          extended by org.LexGrid.concepts.Entity
              extended by org.LexGrid.relations.Association
All Implemented Interfaces:
java.io.Serializable

public class Association
extends Entity
implements java.io.Serializable

A binary relation from a set of entities to a set of entities and/or data. The entityType for the class concept must be "association".

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

Constructor Summary
Association()
           
 
Method Summary
 void addSource(AssociationSource vSource)
           
 void addSource(int index, AssociationSource vSource)
           
 java.util.Enumeration<AssociationSource> enumerateSource()
          Method enumerateSource.
 java.lang.String getAssociationName()
          Returns the value of field 'associationName'.
 java.lang.String getForwardName()
          Returns the value of field 'forwardName'.
 java.lang.String getInverse()
          Returns the value of field 'inverse'.
 java.lang.Boolean getIsAntiReflexive()
          Returns the value of field 'isAntiReflexive'.
 java.lang.Boolean getIsAntiSymmetric()
          Returns the value of field 'isAntiSymmetric'.
 java.lang.Boolean getIsAntiTransitive()
          Returns the value of field 'isAntiTransitive'.
 java.lang.Boolean getIsFunctional()
          Returns the value of field 'isFunctional'.
 java.lang.Boolean getIsNavigable()
          Returns the value of field 'isNavigable'.
 java.lang.Boolean getIsReflexive()
          Returns the value of field 'isReflexive'.
 java.lang.Boolean getIsReverseFunctional()
          Returns the value of field 'isReverseFunctional'.
 java.lang.Boolean getIsSymmetric()
          Returns the value of field 'isSymmetric'.
 java.lang.Boolean getIsTransitive()
          Returns the value of field 'isTransitive'.
 java.lang.String getReverseName()
          Returns the value of field 'reverseName'.
 AssociationSource[] getSource()
          Method getSource.Returns the contents of the collection in an Array.
 AssociationSource getSource(int index)
          Method getSource.
 int getSourceCount()
          Method getSourceCount.
 java.lang.Boolean isIsAntiReflexive()
          Returns the value of field 'isAntiReflexive'.
 java.lang.Boolean isIsAntiSymmetric()
          Returns the value of field 'isAntiSymmetric'.
 java.lang.Boolean isIsAntiTransitive()
          Returns the value of field 'isAntiTransitive'.
 java.lang.Boolean isIsFunctional()
          Returns the value of field 'isFunctional'.
 java.lang.Boolean isIsNavigable()
          Returns the value of field 'isNavigable'.
 java.lang.Boolean isIsReflexive()
          Returns the value of field 'isReflexive'.
 java.lang.Boolean isIsReverseFunctional()
          Returns the value of field 'isReverseFunctional'.
 java.lang.Boolean isIsSymmetric()
          Returns the value of field 'isSymmetric'.
 java.lang.Boolean isIsTransitive()
          Returns the value of field 'isTransitive'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<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 setForwardName(java.lang.String forwardName)
          Sets the value of field 'forwardName'.
 void setInverse(java.lang.String inverse)
          Sets the value of field 'inverse'.
 void setIsAntiReflexive(java.lang.Boolean isAntiReflexive)
          Sets the value of field 'isAntiReflexive'.
 void setIsAntiSymmetric(java.lang.Boolean isAntiSymmetric)
          Sets the value of field 'isAntiSymmetric'.
 void setIsAntiTransitive(java.lang.Boolean isAntiTransitive)
          Sets the value of field 'isAntiTransitive'.
 void setIsFunctional(java.lang.Boolean isFunctional)
          Sets the value of field 'isFunctional'.
 void setIsNavigable(java.lang.Boolean isNavigable)
          Sets the value of field 'isNavigable'.
 void setIsReflexive(java.lang.Boolean isReflexive)
          Sets the value of field 'isReflexive'.
 void setIsReverseFunctional(java.lang.Boolean isReverseFunctional)
          Sets the value of field 'isReverseFunctional'.
 void setIsSymmetric(java.lang.Boolean isSymmetric)
          Sets the value of field 'isSymmetric'.
 void setIsTransitive(java.lang.Boolean isTransitive)
          Sets the value of field 'isTransitive'.
 void setReverseName(java.lang.String reverseName)
          Sets the value of field 'reverseName'.
 void setSource(AssociationSource[] vSourceArray)
           
 void setSource(int index, AssociationSource vSource)
           
static Association unmarshalAssociation(java.io.Reader reader)
          Method unmarshalAssociation.
 void validate()
           
 
Methods inherited from class org.LexGrid.concepts.Entity
addAnyProperties, addAnyProperty, addComment, addComment, addDefinition, addDefinition, addEntityType, addEntityType, addPresentation, addPresentation, addProperty, addProperty, addPropertyLink, addPropertyLink, enumerateComment, enumerateDefinition, enumerateEntityType, enumeratePresentation, enumerateProperty, enumeratePropertyLink, getAllProperties, getComment, getComment, getCommentCount, getDefinition, getDefinition, getDefinitionCount, getEntityCode, getEntityCodeNamespace, getEntityType, getEntityType, getEntityTypeCount, getIsAnonymous, getIsDefined, getPresentation, getPresentation, getPresentationCount, getProperty, getProperty, getPropertyCount, getPropertyLink, getPropertyLink, getPropertyLinkCount, isIsAnonymous, isIsDefined, iterateComment, iterateDefinition, iterateEntityType, iteratePresentation, iterateProperty, iteratePropertyLink, removeAllComment, removeAllDefinition, removeAllEntityType, removeAllPresentation, removeAllProperty, removeAllPropertyLink, removeComment, removeCommentAt, removeDefinition, removeDefinitionAt, removeEntityType, removeEntityTypeAt, removePresentation, removePresentationAt, removeProperty, removePropertyAt, removePropertyLink, removePropertyLinkAt, setComment, setComment, setDefinition, setDefinition, setEntityCode, setEntityCodeNamespace, setEntityType, setEntityType, setIsAnonymous, setIsDefined, setPresentation, setPresentation, setProperty, setProperty, setPropertyLink, setPropertyLink, unmarshalEntity
 
Methods inherited from class org.LexGrid.commonTypes.VersionableAndDescribable
getEntityDescription, setEntityDescription, unmarshalVersionableAndDescribable
 
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Association

public Association()
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<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'.

getForwardName

public java.lang.String getForwardName()
Returns the value of field 'forwardName'. The field 'forwardName' has the following description: The name or role that the "from" entity plays with respect to the "to" entry. Should be phrased in terms of the default language of the association and imply direction.

Returns:
the value of field 'ForwardName'.

getInverse

public java.lang.String getInverse()
Returns the value of field 'inverse'. The field 'inverse' has the following description: The associationName of the inverse of this association. inverse must match a local id of a supportedAssociationName in the corresponding mappings section.

Returns:
the value of field 'Inverse'.

getIsAntiReflexive

public java.lang.Boolean getIsAntiReflexive()
Returns the value of field 'isAntiReflexive'. The field 'isAntiReflexive' has the following description: TRUE means that the association is antiReflexive ( for all a in domain, not r(a,a) ), false means not antiReflexive. If absent, reflexivity is unknown or not applicable.

Returns:
the value of field 'IsAntiReflexive'.

getIsAntiSymmetric

public java.lang.Boolean getIsAntiSymmetric()
Returns the value of field 'isAntiSymmetric'. The field 'isAntiSymmetric' has the following description: True means that the association is antiSymmetric ( r(a,b) -> not r(b,a)) , false means not antitransitive. If absent, symmetricity is unknown or not applicable.

Returns:
the value of field 'IsAntiSymmetric'.

getIsAntiTransitive

public java.lang.Boolean getIsAntiTransitive()
Returns the value of field 'isAntiTransitive'. The field 'isAntiTransitive' has the following description: True means that the association is antiTransitive ( r(a,b), r(b,c) -> not r(a,c)). False means not antitransitive. If absent, transitivity is unknown or not applicable.

Returns:
the value of field 'IsAntiTransitive'.

getIsFunctional

public java.lang.Boolean getIsFunctional()
Returns the value of field 'isFunctional'. The field 'isFunctional' has the following description: TRUE means that the association is injective(for all a in domain, there exists exactly one b in the range such that r(a,b) ).

Returns:
the value of field 'IsFunctional'.

getIsNavigable

public java.lang.Boolean getIsNavigable()
Returns the value of field 'isNavigable'. The field 'isNavigable' has the following description: True means that the reverse direction of the associaton is "navigable", meaning that it is makes sense to represent the target to source side of the association.

Returns:
the value of field 'IsNavigable'.

getIsReflexive

public java.lang.Boolean getIsReflexive()
Returns the value of field 'isReflexive'. The field 'isReflexive' has the following description: True means that association is reflexive (for all a in domain, r(a,a) ). False means not reflexive. If absent, reflexivity is unknown or not applicable.

Returns:
the value of field 'IsReflexive'.

getIsReverseFunctional

public java.lang.Boolean getIsReverseFunctional()
Returns the value of field 'isReverseFunctional'. The field 'isReverseFunctional' has the following description: TRUE means that the association is surjective (for all b in range, there exists exactly one a in range such that r(a,b) ).

Returns:
the value of field 'IsReverseFunctional'.

getIsSymmetric

public java.lang.Boolean getIsSymmetric()
Returns the value of field 'isSymmetric'. The field 'isSymmetric' has the following description: True means that association is symmetric ( r(a,b) -> r(b, a)). False means not symmetric. If absent, symmetricity is unknown or not applicable.

Returns:
the value of field 'IsSymmetric'.

getIsTransitive

public java.lang.Boolean getIsTransitive()
Returns the value of field 'isTransitive'. The field 'isTransitive' has the following description: True means that association is transitive ( r(a,b), r(b,c) -> r(a,c)). False means not transitive. If absent, transitivity is unknown or not applicable.

Returns:
the value of field 'IsTransitive'.

getReverseName

public java.lang.String getReverseName()
Returns the value of field 'reverseName'. The field 'reverseName' has the following description: The name or role that the "to" entity plays with respect to the "from" entry. Should be phrased in terms of the default language of the association and imply direction.

Returns:
the value of field 'ReverseName'.

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

getSourceCount

public int getSourceCount()
Method getSourceCount.

Returns:
the size of this collection

isIsAntiReflexive

public java.lang.Boolean isIsAntiReflexive()
Returns the value of field 'isAntiReflexive'. The field 'isAntiReflexive' has the following description: TRUE means that the association is antiReflexive ( for all a in domain, not r(a,a) ), false means not antiReflexive. If absent, reflexivity is unknown or not applicable.

Returns:
the value of field 'IsAntiReflexive'.

isIsAntiSymmetric

public java.lang.Boolean isIsAntiSymmetric()
Returns the value of field 'isAntiSymmetric'. The field 'isAntiSymmetric' has the following description: True means that the association is antiSymmetric ( r(a,b) -> not r(b,a)) , false means not antitransitive. If absent, symmetricity is unknown or not applicable.

Returns:
the value of field 'IsAntiSymmetric'.

isIsAntiTransitive

public java.lang.Boolean isIsAntiTransitive()
Returns the value of field 'isAntiTransitive'. The field 'isAntiTransitive' has the following description: True means that the association is antiTransitive ( r(a,b), r(b,c) -> not r(a,c)). False means not antitransitive. If absent, transitivity is unknown or not applicable.

Returns:
the value of field 'IsAntiTransitive'.

isIsFunctional

public java.lang.Boolean isIsFunctional()
Returns the value of field 'isFunctional'. The field 'isFunctional' has the following description: TRUE means that the association is injective(for all a in domain, there exists exactly one b in the range such that r(a,b) ).

Returns:
the value of field 'IsFunctional'.

isIsNavigable

public java.lang.Boolean isIsNavigable()
Returns the value of field 'isNavigable'. The field 'isNavigable' has the following description: True means that the reverse direction of the associaton is "navigable", meaning that it is makes sense to represent the target to source side of the association.

Returns:
the value of field 'IsNavigable'.

isIsReflexive

public java.lang.Boolean isIsReflexive()
Returns the value of field 'isReflexive'. The field 'isReflexive' has the following description: True means that association is reflexive (for all a in domain, r(a,a) ). False means not reflexive. If absent, reflexivity is unknown or not applicable.

Returns:
the value of field 'IsReflexive'.

isIsReverseFunctional

public java.lang.Boolean isIsReverseFunctional()
Returns the value of field 'isReverseFunctional'. The field 'isReverseFunctional' has the following description: TRUE means that the association is surjective (for all b in range, there exists exactly one a in range such that r(a,b) ).

Returns:
the value of field 'IsReverseFunctional'.

isIsSymmetric

public java.lang.Boolean isIsSymmetric()
Returns the value of field 'isSymmetric'. The field 'isSymmetric' has the following description: True means that association is symmetric ( r(a,b) -> r(b, a)). False means not symmetric. If absent, symmetricity is unknown or not applicable.

Returns:
the value of field 'IsSymmetric'.

isIsTransitive

public java.lang.Boolean isIsTransitive()
Returns the value of field 'isTransitive'. The field 'isTransitive' has the following description: True means that association is transitive ( r(a,b), r(b,c) -> r(a,c)). False means not transitive. If absent, transitivity is unknown or not applicable.

Returns:
the value of field 'IsTransitive'.

isValid

public boolean isValid()
Method isValid.

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

iterateSource

public java.util.Iterator<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
Overrides:
marshal in class Entity
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 Entity
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'.

setForwardName

public void setForwardName(java.lang.String forwardName)
Sets the value of field 'forwardName'. The field 'forwardName' has the following description: The name or role that the "from" entity plays with respect to the "to" entry. Should be phrased in terms of the default language of the association and imply direction.

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

setInverse

public void setInverse(java.lang.String inverse)
Sets the value of field 'inverse'. The field 'inverse' has the following description: The associationName of the inverse of this association. inverse must match a local id of a supportedAssociationName in the corresponding mappings section.

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

setIsAntiReflexive

public void setIsAntiReflexive(java.lang.Boolean isAntiReflexive)
Sets the value of field 'isAntiReflexive'. The field 'isAntiReflexive' has the following description: TRUE means that the association is antiReflexive ( for all a in domain, not r(a,a) ), false means not antiReflexive. If absent, reflexivity is unknown or not applicable.

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

setIsAntiSymmetric

public void setIsAntiSymmetric(java.lang.Boolean isAntiSymmetric)
Sets the value of field 'isAntiSymmetric'. The field 'isAntiSymmetric' has the following description: True means that the association is antiSymmetric ( r(a,b) -> not r(b,a)) , false means not antitransitive. If absent, symmetricity is unknown or not applicable.

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

setIsAntiTransitive

public void setIsAntiTransitive(java.lang.Boolean isAntiTransitive)
Sets the value of field 'isAntiTransitive'. The field 'isAntiTransitive' has the following description: True means that the association is antiTransitive ( r(a,b), r(b,c) -> not r(a,c)). False means not antitransitive. If absent, transitivity is unknown or not applicable.

Parameters:
isAntiTransitive - the value of field 'isAntiTransitive'

setIsFunctional

public void setIsFunctional(java.lang.Boolean isFunctional)
Sets the value of field 'isFunctional'. The field 'isFunctional' has the following description: TRUE means that the association is injective(for all a in domain, there exists exactly one b in the range such that r(a,b) ).

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

setIsNavigable

public void setIsNavigable(java.lang.Boolean isNavigable)
Sets the value of field 'isNavigable'. The field 'isNavigable' has the following description: True means that the reverse direction of the associaton is "navigable", meaning that it is makes sense to represent the target to source side of the association.

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

setIsReflexive

public void setIsReflexive(java.lang.Boolean isReflexive)
Sets the value of field 'isReflexive'. The field 'isReflexive' has the following description: True means that association is reflexive (for all a in domain, r(a,a) ). False means not reflexive. If absent, reflexivity is unknown or not applicable.

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

setIsReverseFunctional

public void setIsReverseFunctional(java.lang.Boolean isReverseFunctional)
Sets the value of field 'isReverseFunctional'. The field 'isReverseFunctional' has the following description: TRUE means that the association is surjective (for all b in range, there exists exactly one a in range such that r(a,b) ).

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

setIsSymmetric

public void setIsSymmetric(java.lang.Boolean isSymmetric)
Sets the value of field 'isSymmetric'. The field 'isSymmetric' has the following description: True means that association is symmetric ( r(a,b) -> r(b, a)). False means not symmetric. If absent, symmetricity is unknown or not applicable.

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

setIsTransitive

public void setIsTransitive(java.lang.Boolean isTransitive)
Sets the value of field 'isTransitive'. The field 'isTransitive' has the following description: True means that association is transitive ( r(a,b), r(b,c) -> r(a,c)). False means not transitive. If absent, transitivity is unknown or not applicable.

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

setReverseName

public void setReverseName(java.lang.String reverseName)
Sets the value of field 'reverseName'. The field 'reverseName' has the following description: The name or role that the "to" entity plays with respect to the "from" entry. Should be phrased in terms of the default language of the association and imply direction.

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

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 -

unmarshalAssociation

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

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