|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.meta.HierarchicalSemanticType
Represents information about a semantic type in the semantic network. This class ensures that each unique hierarchical semantic type is represented by a singleton object. In order for this to work correctly, the class must be properly initialized. Data from the SRDEF file (STY rows) can be found here.
Constructor Summary | |
HierarchicalSemanticType()
Instantiates an empty HierarchicalSemanticType . |
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 HierarchicalSemanticType to another one. |
boolean |
equals(Object o)
Returns true if the specified object is
equal to this object. |
String |
getDef()
Returns the definition (DEF). |
String |
getDefinition()
Returns the definition (DEF). |
String |
getEx()
Returns a semi-colon (;) separated list of Metathesaurus strings (EX) which are examples of this semantic type. |
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. |
static HierarchicalSemanticType |
getHierarchicalSemanticType(String name)
Returns the HierarchicalSemanticType for the specified semantic type name. |
static HierarchicalSemanticType[] |
getHierarchicalSemanticTypes()
Return all HierarchicalSemanticType s. |
static List |
getHierarchicalSemanticTypesAsList()
Return all HierarchicalSemanticType s. |
String |
getIdentifier()
Returns the unique identifier (UI). |
String |
getName()
Returns the name (STY). |
String |
getNH()
Returns the non human flag value (NH). |
String |
getStn()
Returns the tree number (STN). |
String |
getSty()
Returns the name (STY). |
String |
getTreeNumber()
Returns the tree number (STN). |
String |
getUi()
Returns the unique identifier (UI). |
String |
getUn()
Returns the usage note (UN). |
String |
getUsageNote()
Returns the usage note (UN). |
int |
hashCode()
Return a hash code based on key fields. |
static void |
initialize(List meta_dsc)
Initializes the Map used to track all of the
HierarchicalSemanticType s that exist at one time. |
static void |
initialize(STYMetaDescription[] meta_dsc)
Initializes the Map used to track all of the
HierarchicalSemanticType s that exist at one time. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HierarchicalSemanticType()
HierarchicalSemanticType
.
Method Detail |
public static void initialize(STYMetaDescription[] meta_dsc)
Map
used to track all of the
HierarchicalSemanticType
s that exist at one time.
meta_dsc
- an array of STYMetaDescription
spublic static void initialize(List meta_dsc)
Map
used to track all of the
HierarchicalSemanticType
s that exist at one time. This
is implemented as a call to initialize(STYMetaDescription[])
.
meta_dsc
- an array of STYMetaDescription
s
IllegalStateException
- if an attempt is made to call this
method more than oncepublic static HierarchicalSemanticType getHierarchicalSemanticType(String name)
HierarchicalSemanticType
for the specified semantic type name.
This method will return null
if the initialize
method has not been called or if the specified name
was not one of those used during initialization.
name
- the semantic type name to look up
HierarchicalSemanticType
for the specified namepublic static HierarchicalSemanticType[] getHierarchicalSemanticTypes()
HierarchicalSemanticType
s.
HierarchicalSemanticType
public static List getHierarchicalSemanticTypesAsList()
HierarchicalSemanticType
s.
List
of HierarchicalSemanticType
public String getUi()
getIdentifier()
.
getUi
in interface STYMetaDescription
public String getIdentifier()
getIdentifier
in interface STYMetaDescription
public String getSty()
getName()
.
getSty
in interface STYMetaDescription
public String getName()
getName
in interface STYMetaDescription
public String getStn()
getTreeNumber()
.
getStn
in interface STYMetaDescription
public String getTreeNumber()
getTreeNumber
in interface STYMetaDescription
public String getDef()
getDefinition()
.
getDef
in interface STYMetaDescription
public String getDefinition()
getDefinition
in interface STYMetaDescription
public String getEx()
getExamplesAsString()
.
getEx
in interface STYMetaDescription
public String[] getExamples()
String
array of of Metathesaurus strings (EX)
which are examples of this semantic type.
getExamples
in interface STYMetaDescription
String
array of Metathesaurus examplespublic String getExamplesAsString()
getExamplesAsString()
.
getExamplesAsString
in interface STYMetaDescription
public List getExamplesAsList()
List
array of of Metathesaurus strings (EX)
which are examples of this semantic type.
getExamplesAsList
in interface STYMetaDescription
List
of Metathesaurus examplespublic String getUn()
getUsageNote()
.
getUn
in interface STYMetaDescription
public String getUsageNote()
getUsageNote
in interface STYMetaDescription
public boolean allowsNonHumanFlag()
allowsNonHumanFlag
in interface STYMetaDescription
true
if allowed, false
if notpublic String getNH()
getNH
in interface STYMetaDescription
public int hashCode()
public boolean equals(Object o)
true
if the specified object is
equal to this object. The specified object must be an
Source
with matching key fields.
o
- an Object
to compare against
true
if Object o is equal
false
otherwisepublic int compareTo(Object o)
HierarchicalSemanticType
to another one. Results
are indeterminate if the specified parameter is not of the
same class.
compareTo
in interface Comparable
o
- the Object
to compare to
int
representing the relative ordering
of this and the compare-to object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |