Package org.biojava.nbio.ontology.obo
Class OboFileParser
java.lang.Object
org.biojava.nbio.ontology.obo.OboFileParser
A class to parse the content of an OBO file. It delegates handling of the
 content to the OBOFileEventListener implementation.
 This file contains parts of the OBO-Edit file OBOParseEngine, (particularly the encoding and decoding part)
 See link
 Thanks to the OboEdit developers for giving permission to release this in BioJava.
- Since:
 - 1.6
 - Author:
 - Andreas Prlic, John Day Richter
 
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected SimpleDateFormatprotected Stringprotected intprotected StringBufferprotected int - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddOboFileEventListener(OboFileEventListener listener) static Stringstatic intfindUnescaped(String str, char toChar) static intfindUnescaped(String str, char toChar, int startIndex, int endIndex) static intfindUnescaped(String str, char toChar, int startindex, int endindex, boolean honorQuotes) getDbxrefList(String line, int startoffset, int endoffset) protected intgetNestedValue(org.biojava.nbio.ontology.obo.NestedValue nv, String str, int startIndex) protected StringBufferstatic booleanisEscapeStarter(char c) static booleanisQuote(char c) voidparseOBO(BufferedReader oboFile) parse an ontology fileprotected OboFileParser.SOPairreadQuotedString(String value, int startIndex, int stopIndex, char terminatingChar, boolean requireQuotes, boolean legalEndOfLine)  
- 
Field Details
- 
line
 - 
linenum
 - 
totalSize
 - 
bytesRead
 - 
tempBuffer
 - 
dateFormat
 - 
escapeChars
 - 
unescapeChars
 
 - 
 - 
Constructor Details
- 
OboFileParser
public OboFileParser() 
 - 
 - 
Method Details
- 
addOboFileEventListener
 - 
getOboFileEventListener
 - 
parseOBO
parse an ontology file- Parameters:
 oboFile-- Throws:
 IOExceptionIOException
 - 
getDbxrefList
protected Map<String,Object>[] getDbxrefList(String line, int startoffset, int endoffset) throws IOException - Throws:
 IOException
 - 
parseXref
protected Map<String,Object> parseXref(String line, int startoffset, int endoffset) throws IOException - Throws:
 IOException
 - 
escape
 - 
unescape
- Throws:
 IOException
 - 
unescape
public OboFileParser.SOPair unescape(String str, char toChar, int startindex, boolean mustFindChar) throws IOException - Throws:
 IOException
 - 
unescape
public OboFileParser.SOPair unescape(String str, char toChar, int startindex, int endindex, boolean mustFindChar) throws IOException - Throws:
 IOException
 - 
findUnescaped
 - 
findUnescaped
 - 
findUnescaped
public static int findUnescaped(String str, char toChar, int startindex, int endindex, boolean honorQuotes)  - 
isEscapeStarter
 - 
isQuote
 - 
getTempBuffer
 - 
readQuotedString
protected OboFileParser.SOPair readQuotedString(String value, int startIndex, int stopIndex, char terminatingChar, boolean requireQuotes, boolean legalEndOfLine) throws IOException - Throws:
 IOException
 - 
getNestedValue
protected int getNestedValue(org.biojava.nbio.ontology.obo.NestedValue nv, String str, int startIndex) throws IOException - Throws:
 IOException
 
 -