|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.umls.meta.HierarchicalSemanticType
public final class 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 HierarchicalSemanticTypes. |
static List |
getHierarchicalSemanticTypesAsList()
Return all HierarchicalSemanticTypes. |
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
HierarchicalSemanticTypes that exist at one time. |
static void |
initialize(STYMetaDescription[] meta_dsc)
Initializes the Map used to track all of the
HierarchicalSemanticTypes 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
HierarchicalSemanticTypes that exist at one time.
meta_dsc - an array of STYMetaDescriptionspublic static void initialize(List meta_dsc)
Map used to track all of the
HierarchicalSemanticTypes that exist at one time. This
is implemented as a call to initialize(STYMetaDescription[]).
meta_dsc - an array of STYMetaDescriptions
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()
HierarchicalSemanticTypes.
HierarchicalSemanticTypepublic static List getHierarchicalSemanticTypesAsList()
HierarchicalSemanticTypes.
List of HierarchicalSemanticTypepublic String getUi()
getIdentifier().
getUi in interface STYMetaDescriptionpublic String getIdentifier()
getIdentifier in interface STYMetaDescriptionpublic String getSty()
getName().
getSty in interface STYMetaDescriptionpublic String getName()
getName in interface STYMetaDescriptionpublic String getStn()
getTreeNumber().
getStn in interface STYMetaDescriptionpublic String getTreeNumber()
getTreeNumber in interface STYMetaDescriptionpublic String getDef()
getDefinition().
getDef in interface STYMetaDescriptionpublic String getDefinition()
getDefinition in interface STYMetaDescriptionpublic String getEx()
getExamplesAsString().
getEx in interface STYMetaDescriptionpublic String[] getExamples()
String array of of Metathesaurus strings (EX)
which are examples of this semantic type.
getExamples in interface STYMetaDescriptionString array of Metathesaurus examplespublic String getExamplesAsString()
getExamplesAsString().
getExamplesAsString in interface STYMetaDescriptionpublic List getExamplesAsList()
List array of of Metathesaurus strings (EX)
which are examples of this semantic type.
getExamplesAsList in interface STYMetaDescriptionList of Metathesaurus examplespublic String getUn()
getUsageNote().
getUn in interface STYMetaDescriptionpublic String getUsageNote()
getUsageNote in interface STYMetaDescriptionpublic boolean allowsNonHumanFlag()
allowsNonHumanFlag in interface STYMetaDescriptiontrue if allowed, false if notpublic String getNH()
getNH in interface STYMetaDescriptionpublic int hashCode()
hashCode in class Objectpublic 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.
equals in class Objecto - 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 Comparableo - 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 | ||||||||