edu.hust.go.model
Class GoParser
java.lang.Object
|
+--edu.hust.go.model.GoParser
- Direct Known Subclasses:
- OboGoParser, XmlGoParser
- public abstract class GoParser
- extends java.lang.Object
Constructor Summary |
GoParser(java.lang.String _target)
|
GoParser(java.lang.String _target,
int _maxThreadNumber)
|
GoParser(java.lang.String _target,
int _maxThreadNumber,
int _maxPoolSize)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OBO
public static final byte OBO
- See Also:
- Constant Field Values
OBOXML
public static final byte OBOXML
- See Also:
- Constant Field Values
RDFXML
public static final byte RDFXML
- See Also:
- Constant Field Values
OWL
public static final byte OWL
- See Also:
- Constant Field Values
defaultThreadNumber
static final int defaultThreadNumber
- See Also:
- Constant Field Values
defaultPoolSize
static final int defaultPoolSize
- See Also:
- Constant Field Values
target
java.lang.String target
threadNumber
int threadNumber
poolSize
int poolSize
termMap
java.util.HashMap termMap
dataPool
java.util.Vector dataPool
threadPool
java.util.HashMap threadPool
m_ParserActive
boolean m_ParserActive
GoParser
public GoParser(java.lang.String _target)
GoParser
public GoParser(java.lang.String _target,
int _maxThreadNumber)
GoParser
public GoParser(java.lang.String _target,
int _maxThreadNumber,
int _maxPoolSize)
- Parameters:
_target
- GO definition file_maxThreadNumber
- thread number_maxPoolSize
- GO term parse speed may slower than read thread, if
the number of unparsed terms greater than maxPoolSize, new term has to
wait until old terms have been parsed.
getTermMap
public java.util.HashMap getTermMap()
- get the whole GO id-terms in GO definition.
- Returns:
- the key is GO ids, and the value is GO terms.
If the termType is SIMPLE_TERM, the value is DefaultGO_term.
If the termType is COMPLETE_TERM and the parse is OBOGoParser, the value is OBOGO_term.
If the termType is COMPLETE_TERM and the parse is SaxGoParser, the value is XMLGO_term.
getGoTermById
public abstract edu.hust.go.term.GO_term getGoTermById(java.lang.String id)
parse
protected void parse(byte goDefType)
parseTarget
protected abstract void parseTarget()
queueProcessed
protected boolean queueProcessed()
parsingInProgress
protected boolean parsingInProgress()
setParserActive
protected void setParserActive()
setParsingComplete
protected void setParsingComplete()
addDataToPool
protected void addDataToPool(java.lang.Object data)
getDataFromPool
protected java.lang.Object getDataFromPool()
addTermToMap
protected void addTermToMap(java.lang.Object data,
byte defType)
removeThread
protected void removeThread(java.lang.String threadName)
threadActive
protected boolean threadActive()