gov.nih.nlm.umls.meta.impl
Class RelationshipAttributeImpl

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.AttributeImpl
      extended bygov.nih.nlm.umls.meta.impl.RelationshipAttributeImpl
All Implemented Interfaces:
Attribute, AttributeElement, Comparable, ConceptElement, ContentViewElement, RelationshipAttribute, RelationshipElement, SourceElement, SourceIdentifierElement, SuppressibleElement

public class RelationshipAttributeImpl
extends AttributeImpl
implements RelationshipAttribute

Implementation of the RelationshipAttribute interface.

Author:
Brian Carlsen, Deborah Shapiro

Nested Class Summary
 
Nested classes inherited from class gov.nih.nlm.umls.meta.SourceElement
SourceElement.BySourceComparator, SourceElement.BySourceRestrictor
 
Field Summary
 
Fields inherited from class gov.nih.nlm.umls.meta.impl.AttributeImpl
key_fields, key_fields_flag
 
Constructor Summary
RelationshipAttributeImpl()
          Instantiate an empty RelationshipAttribute.
RelationshipAttributeImpl(RelationshipAttribute rui_a)
          This is a copy constructor for RelationshipAttribute.
 
Method Summary
 int compareTo(Object o)
          Compares this RelationshipAttribute to another one.
 boolean equals(Object o)
          Returns true if the specified object is equal to this object.
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 Relationship getRelationship()
          Returns the Relationship this RelationshipAttribute is connected to.
 int hashCode()
          Return a hash code based on key fields.
 void setRelationship(Relationship rel)
          Sets the Relationship this RelationshipAttribute is connected to.
 
Methods inherited from class gov.nih.nlm.umls.meta.impl.AttributeImpl
getAtn, getAttributeIdentifier, getAttributeName, getAttributeValue, getAtui, getAtv, getConcept, getContentView, getCvf, getSatui, getSource, getSourceAttributeIdentifier, getSourceIdentifierType, getSuppress, isObsolete, isSuppressible, setAtn, setAttributeIdentifier, setAttributeName, setAttributeValue, setAtui, setAtv, setConcept, setContentView, setCvf, setSatui, setSource, setSourceAttributeIdentifier, setSourceIdentifierType, setSuppress
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nih.nlm.umls.meta.Attribute
getAtn, getAttributeName, getAttributeValue, getAtv, setAtn, setAttributeName, setAttributeValue, setAtv
 
Methods inherited from interface gov.nih.nlm.umls.meta.AttributeElement
getAttributeIdentifier, getAtui, getSatui, getSourceAttributeIdentifier, setAttributeIdentifier, setAtui, setSatui, setSourceAttributeIdentifier
 
Methods inherited from interface gov.nih.nlm.umls.meta.ConceptElement
getConcept, setConcept
 
Methods inherited from interface gov.nih.nlm.umls.meta.ContentViewElement
getContentView, getCvf, setContentView, setCvf
 
Methods inherited from interface gov.nih.nlm.umls.meta.SourceIdentifierElement
getSourceIdentifierType, setSourceIdentifierType
 
Methods inherited from interface gov.nih.nlm.umls.meta.SourceElement
getSource, setSource
 
Methods inherited from interface gov.nih.nlm.umls.meta.SuppressibleElement
getSuppress, isObsolete, isSuppressible, setSuppress
 

Constructor Detail

RelationshipAttributeImpl

public RelationshipAttributeImpl()
Instantiate an empty RelationshipAttribute.


RelationshipAttributeImpl

public RelationshipAttributeImpl(RelationshipAttribute rui_a)
This is a copy constructor for RelationshipAttribute.

Parameters:
rui_a - RelationshipAttribute to be copied
Method Detail

getRelationship

public Relationship getRelationship()
Returns the Relationship this RelationshipAttribute is connected to.

Specified by:
getRelationship in interface RelationshipElement
Returns:
the Relationship this RelationshipAttribute is connected to

setRelationship

public void setRelationship(Relationship rel)
Sets the Relationship this RelationshipAttribute is connected to.

Specified by:
setRelationship in interface RelationshipElement
Parameters:
rel - the Relationship this RelationshipAttribute is connected to

getKeyFields

public String getKeyFields()
Returns a String key which can be used by equals, compareTo, and hashCode methods.

Specified by:
getKeyFields in interface Attribute
Overrides:
getKeyFields in class AttributeImpl
Returns:
a String composed from the cui, aui, sui, versioned source, tty, and code.

hashCode

public int hashCode()
Return a hash code based on key fields.

Overrides:
hashCode in class AttributeImpl
Returns:
a hash code based on key fields

equals

public boolean equals(Object o)
Returns true if the specified object is equal to this object. The specified object must be a RelationshipAttribute with matching key fields.

Overrides:
equals in class AttributeImpl
Parameters:
o - an Object to compare against
Returns:
boolean true if Object o is equal false otherwise

compareTo

public int compareTo(Object o)
Compares this RelationshipAttribute to another one. Results are indeterminate if the specified parameter is not of the same class.

Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class AttributeImpl
Parameters:
o - the Object to compare to
Returns:
int representing the relative ordering of this and the compare-to object


Copyright ©2005