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

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.STYMetaDescriptionImpl
All Implemented Interfaces:
Comparable, STYMetaDescription

public class STYMetaDescriptionImpl
extends Object
implements STYMetaDescription

Default implementation of the STYMetaDescription interface.

Author:
Brian Carlsen, Deborah Shapiro

Constructor Summary
STYMetaDescriptionImpl()
          Instantiates an empty STYMetaDescriptionImpl.
STYMetaDescriptionImpl(String srdef_row)
          Instantiates a STYMetaDescription from a row from the SRDEF file.
 
Method Summary
 boolean allowsNonHumanFlag()
          Indicates whether or not this semantic type or its descendents allow the non human flag.
 int compareTo(Object o)
          Compares this STYMetaDescription to another one.
 boolean equals(Object o)
          Returns true if the specified object is equal to this object.
 String getDef()
          Shorthand for getDefinition().
 String getDefinition()
          Returns the definition (DEF).
 String getEx()
          Shorthand for getExamplesAsString().
 String[] getExamples()
          Returns a String array of of Metathesaurus strings (EX) which are examples of this semantic type.
 List getExamplesAsList()
          Returns a List array of of Metathesaurus strings (EX) which are examples of this semantic type.
 String getExamplesAsString()
          Returns a semi-colon (;) separated list of Metathesaurus strings (EX) which are examples of this semantic type.
 String getIdentifier()
          Returns the unique identifier (UI).
 String getName()
          Returns the name (STY).
 String getNH()
          Returns the non human flag value (NH).
 String getStn()
          Shorthand for getTreeNumber().
 String getSty()
          Shorthand for getName().
 String getTreeNumber()
          Returns the tree number (STN).
 String getUi()
          Shorthand for getIdentifier().
 String getUn()
          Shorthand for getUsageNote().
 String getUsageNote()
          Returns the usage note (UN).
 int hashCode()
          Return a hash code based on key fields.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

STYMetaDescriptionImpl

public STYMetaDescriptionImpl()
Instantiates an empty STYMetaDescriptionImpl.


STYMetaDescriptionImpl

public STYMetaDescriptionImpl(String srdef_row)
Instantiates a STYMetaDescription from a row from the SRDEF file.

Parameters:
srdef_row - row from SRDEF file
Method Detail

getUi

public String getUi()
Shorthand for getIdentifier().

Specified by:
getUi in interface STYMetaDescription
Returns:
the unique identifier

getIdentifier

public String getIdentifier()
Returns the unique identifier (UI).

Specified by:
getIdentifier in interface STYMetaDescription
Returns:
the unique identifier

getSty

public String getSty()
Shorthand for getName().

Specified by:
getSty in interface STYMetaDescription
Returns:
the name

getName

public String getName()
Returns the name (STY).

Specified by:
getName in interface STYMetaDescription
Returns:
the name

getStn

public String getStn()
Shorthand for getTreeNumber().

Specified by:
getStn in interface STYMetaDescription
Returns:
the tree number

getTreeNumber

public String getTreeNumber()
Returns the tree number (STN).

Specified by:
getTreeNumber in interface STYMetaDescription
Returns:
the tree number

getDef

public String getDef()
Shorthand for getDefinition().

Specified by:
getDef in interface STYMetaDescription
Returns:
the definition

getDefinition

public String getDefinition()
Returns the definition (DEF).

Specified by:
getDefinition in interface STYMetaDescription
Returns:
the definition

getEx

public String getEx()
Shorthand for getExamplesAsString().

Specified by:
getEx in interface STYMetaDescription
Returns:
a value listing Metathesaurus examples

getExamples

public String[] getExamples()
Returns a String array of of Metathesaurus strings (EX) which are examples of this semantic type.

Specified by:
getExamples in interface STYMetaDescription
Returns:
an String array of Metathesaurus examples

getExamplesAsString

public String getExamplesAsString()
Returns a semi-colon (;) separated list of Metathesaurus strings (EX) which are examples of this semantic type.

Specified by:
getExamplesAsString in interface STYMetaDescription
Returns:
a value listing Metathesaurus examples

getExamplesAsList

public List getExamplesAsList()
Returns a List array of of Metathesaurus strings (EX) which are examples of this semantic type.

Specified by:
getExamplesAsList in interface STYMetaDescription
Returns:
an List of Metathesaurus examples

getUn

public String getUn()
Shorthand for getUsageNote().

Specified by:
getUn in interface STYMetaDescription
Returns:
the usage note

getUsageNote

public String getUsageNote()
Returns the usage note (UN).

Specified by:
getUsageNote in interface STYMetaDescription
Returns:
the usage note

allowsNonHumanFlag

public boolean allowsNonHumanFlag()
Indicates whether or not this semantic type or its descendents allow the non human flag.

Specified by:
allowsNonHumanFlag in interface STYMetaDescription
Returns:
true if allowed, false if not

getNH

public String getNH()
Returns the non human flag value (NH).

Specified by:
getNH in interface STYMetaDescription
Returns:
the non human flag value

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 a STYMetaDescription 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 STYMetaDescription 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