|
TC Java 2011 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nih.nlm.nls.tc.Sti.SemanticTypes
public class SemanticTypes
This class is to load Semantic Types from a flat file.
History:
Field Summary | |
---|---|
static int |
BY_DOCUMENT
|
static int |
BY_WORD
|
Constructor Summary | |
---|---|
SemanticTypes(java.lang.String inFile)
Create the Semantic Types list object by specifying the input file. |
|
SemanticTypes(java.lang.String inFile,
boolean verbose)
Create the Semantic Types list object by specifying the input file and flag of verbose. |
Method Summary | |
---|---|
java.lang.String |
GetAbbrByIndex(int index)
Get ST abbreviation by specifying ST index. |
java.lang.String |
GetAbbrByName(java.lang.String name)
Get ST abbreviation by specifying ST name. |
java.lang.String |
GetAbbrByTui(java.lang.String tui)
Get ST abbreviation by specifying TUI. |
int |
GetIndexByAbbr(java.lang.String abbr)
Get ST index by specifying ST abbreviation. |
int |
GetIndexByName(java.lang.String name)
Get ST index by specifying ST name. |
int |
GetIndexByTui(java.lang.String tui)
Get ST index by specifying TUI. |
java.lang.String |
GetNameByAbbr(java.lang.String abbr)
Get ST name by specifying ST abbreviation. |
java.lang.String |
GetNameByIndex(int index)
Get ST name by specifying ST index. |
java.lang.String |
GetNameByTui(java.lang.String tui)
Get ST name by specifying TUI. |
java.util.Hashtable<java.lang.String,SemanticType> |
GetSemanticTypesByAbbr()
Get the collection object (in hashtable) of all STs with key in abbreviation. |
java.util.Hashtable<java.lang.Integer,SemanticType> |
GetSemanticTypesByIndex()
Get the collection object (in hashtable) of all STs with key in index. |
java.util.Hashtable<java.lang.String,SemanticType> |
GetSemanticTypesByName()
Get the collection object (in hashtable) of all STs with key in name. |
java.util.Hashtable<java.lang.String,SemanticType> |
GetSemanticTypesByTui()
Get the collection object (in hashtable) of all STs with key in TUI. |
int |
GetSize()
Get the total number of semantic type from the ST list. |
SemanticType |
GetStByAbbr(java.lang.String abbr)
Get ST object by specifying ST abbreviation. |
SemanticType |
GetStByIndex(int index)
Get ST object by specifying ST index. |
SemanticType |
GetStByName(java.lang.String name)
Get ST object by specifying ST name. |
SemanticType |
GetStByTui(java.lang.String tui)
Get ST object by specifying TUI. |
java.lang.String |
GetTuiByAbbr(java.lang.String abbr)
Get TUI by specifying ST abbreviation. |
java.lang.String |
GetTuiByIndex(int index)
Get TUI by specifying ST index. |
boolean |
IsLegalStAbbr(java.lang.String abbr)
Check if legal ST abbreviation |
boolean |
IsLegalStName(java.lang.String name)
Check if legal ST name |
static void |
main(java.lang.String[] args)
|
void |
ShowSts(java.io.BufferedWriter outWriter,
boolean fileOutput)
Show index, abbreviation, and full name of all Semantic Types. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BY_WORD
public static final int BY_DOCUMENT
Constructor Detail |
---|
public SemanticTypes(java.lang.String inFile)
inFile
- file name of Semantic Types (sts.txt)public SemanticTypes(java.lang.String inFile, boolean verbose)
inFile
- file name of Semantic Types (sts.txt)verbose
- flag of verbose on reading input fileMethod Detail |
---|
public int GetSize()
public SemanticType GetStByIndex(int index)
index
- ST index
public SemanticType GetStByTui(java.lang.String tui)
tui
- TUI
public SemanticType GetStByAbbr(java.lang.String abbr)
abbr
- ST abbreviation
public SemanticType GetStByName(java.lang.String name)
name
- ST name
public java.lang.String GetAbbrByIndex(int index)
index
- ST index
public java.lang.String GetAbbrByTui(java.lang.String tui)
tui
- TUI
public java.lang.String GetNameByIndex(int index)
index
- ST index
public java.lang.String GetNameByTui(java.lang.String tui)
tui
- TUI
public java.lang.String GetNameByAbbr(java.lang.String abbr)
abbr
- ST abbreviation
public int GetIndexByAbbr(java.lang.String abbr)
abbr
- ST abbreviation
public int GetIndexByTui(java.lang.String tui)
tui
- TUI
public java.lang.String GetTuiByAbbr(java.lang.String abbr)
abbr
- ST abbreviation
public java.lang.String GetTuiByIndex(int index)
index
- ST index
public java.lang.String GetAbbrByName(java.lang.String name)
name
- ST name
public int GetIndexByName(java.lang.String name)
name
- ST name
public java.util.Hashtable<java.lang.Integer,SemanticType> GetSemanticTypesByIndex()
public java.util.Hashtable<java.lang.String,SemanticType> GetSemanticTypesByTui()
public java.util.Hashtable<java.lang.String,SemanticType> GetSemanticTypesByAbbr()
public java.util.Hashtable<java.lang.String,SemanticType> GetSemanticTypesByName()
public boolean IsLegalStAbbr(java.lang.String abbr)
abbr
- ST abbreviation
public boolean IsLegalStName(java.lang.String name)
name
- ST name
public void ShowSts(java.io.BufferedWriter outWriter, boolean fileOutput)
outWriter
- outfile bufferfileOutput
- boolean flag for file outputpublic static void main(java.lang.String[] args)
|
TC Java 2011 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |