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

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.SemanticTypeImpl
All Implemented Interfaces:
Comparable, ConceptElement, ContentViewElement, SemanticType

public class SemanticTypeImpl
extends Object
implements SemanticType

Default implementation of the SemanticType interface.

Author:
Brian Carlsen, Deborah Shapiro

Constructor Summary
SemanticTypeImpl()
          Instantiates an empty SemanticType.
SemanticTypeImpl(SemanticType sty)
          Instantiates a SemanticType from the specified SemanticType.
 
Method Summary
 int compareTo(Object o)
          Compares this SemanticType to another one.
 boolean equals(Object o)
          Returns true if the specified object is equal to this object.
 String getAttributeIdentifier()
          Returns the unique identifier (ATUI).
 String getAtui()
          Shorthand for getAttributeIdentifier().
 Concept getConcept()
          Returns the Concept that holds this SemanticType.
 ContentView getContentView()
          Returns tbe ContentView definition for this SemanticType (CVF).
 ContentView getCvf()
          Shorthand for getContentView().
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 HierarchicalSemanticType getSemanticType()
          Returns the HierarchicalSemanticType (STY).
 HierarchicalSemanticType getSty()
          Shorthand for getSemanticType()
 int hashCode()
          Return a hash code based on key fields.
 void setAttributeIdentifier(String atui)
          Sets the unique identifier (ATUI).
 void setAtui(String atui)
          Shorthand for setAttributeIdentifier(String).
 void setConcept(Concept concept)
          Sets the Concept that holds this SemanticType.
 void setContentView(ContentView cvf)
          Sets tbe ContentView definition for this SemanticType (CVF).
 void setCvf(ContentView cvf)
          Shorthand for setContentView(ContentView).
 void setSemanticType(HierarchicalSemanticType sty)
          Sets the HierarchicalSemanticType (STY).
 void setSty(HierarchicalSemanticType sty)
          Shorthand for setSemanticType(HierarchicalSemanticType).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemanticTypeImpl

public SemanticTypeImpl()
Instantiates an empty SemanticType.


SemanticTypeImpl

public SemanticTypeImpl(SemanticType sty)
Instantiates a SemanticType from the specified SemanticType.

Parameters:
sty - SemanticType to be copied
Method Detail

getSemanticType

public HierarchicalSemanticType getSemanticType()
Returns the HierarchicalSemanticType (STY).

Specified by:
getSemanticType in interface SemanticType
Returns:
the HierarchicalSemanticType

setSemanticType

public void setSemanticType(HierarchicalSemanticType sty)
Sets the HierarchicalSemanticType (STY).

Specified by:
setSemanticType in interface SemanticType
Parameters:
sty - the HierarchicalSemanticType

getSty

public HierarchicalSemanticType getSty()
Shorthand for getSemanticType()

Specified by:
getSty in interface SemanticType
Returns:
the HierarchicalSemanticType

setSty

public void setSty(HierarchicalSemanticType sty)
Shorthand for setSemanticType(HierarchicalSemanticType).

Specified by:
setSty in interface SemanticType
Parameters:
sty - the HierarchicalSemanticType

getAttributeIdentifier

public String getAttributeIdentifier()
Returns the unique identifier (ATUI).

Specified by:
getAttributeIdentifier in interface SemanticType
Returns:
the ATUI

getAtui

public String getAtui()
Shorthand for getAttributeIdentifier().

Specified by:
getAtui in interface SemanticType
Returns:
the ATUI

setAttributeIdentifier

public void setAttributeIdentifier(String atui)
Sets the unique identifier (ATUI).

Specified by:
setAttributeIdentifier in interface SemanticType
Parameters:
atui - the ATUI

setAtui

public void setAtui(String atui)
Shorthand for setAttributeIdentifier(String).

Specified by:
setAtui in interface SemanticType
Parameters:
atui - the ATUI

getConcept

public Concept getConcept()
Returns the Concept that holds this SemanticType.

Specified by:
getConcept in interface ConceptElement
Returns:
the Concept that holds this SemanticType

setConcept

public void setConcept(Concept concept)
Sets the Concept that holds this SemanticType.

Specified by:
setConcept in interface ConceptElement
Parameters:
concept - the Concept that holds this SemanticType

getContentView

public ContentView getContentView()
Returns tbe ContentView definition for this SemanticType (CVF).

Specified by:
getContentView in interface ContentViewElement
Returns:
tbe ContentView definition

setContentView

public void setContentView(ContentView cvf)
Sets tbe ContentView definition for this SemanticType (CVF).

Specified by:
setContentView in interface ContentViewElement
Parameters:
cvf - the ContentView definition

getCvf

public ContentView getCvf()
Shorthand for getContentView().

Specified by:
getCvf in interface ContentViewElement
Returns:
tbe ContentView definition

setCvf

public void setCvf(ContentView cvf)
Shorthand for setContentView(ContentView).

Specified by:
setCvf in interface ContentViewElement
Parameters:
cvf - the ContentView definition

getKeyFields

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

Specified by:
getKeyFields in interface SemanticType
Returns:
a String composed from the cui, and sty ui.

hashCode

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

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 an SemanticType with matching key fields.

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 SemanticType to another one. Results are indeterminate if the specified parameter is not of the same class.

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


Copyright ©2005