Class OboFileParser


  • public class OboFileParser
    extends java.lang.Object
    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) http://geneontology.cvs.sourceforge.net/geneontology/go-dev/java/oboedit/sources/org/geneontology/oboedit/dataadapter/OBOParseEngine.java?revision=1.10&view=markup 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 
      Modifier and Type Class Description
      static class  OboFileParser.SOPair  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int bytesRead  
      protected java.text.SimpleDateFormat dateFormat  
      protected static java.util.Map<java.lang.Character,​java.lang.Character> escapeChars  
      protected java.lang.String line  
      protected int linenum  
      protected java.lang.StringBuffer tempBuffer  
      protected int totalSize  
      protected static java.util.Map<java.lang.Character,​java.lang.Character> unescapeChars  
    • Constructor Summary

      Constructors 
      Constructor Description
      OboFileParser()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addOboFileEventListener​(OboFileEventListener listener)  
      static java.lang.String escape​(java.lang.String str, boolean escapespaces)  
      static int findUnescaped​(java.lang.String str, char toChar)  
      static int findUnescaped​(java.lang.String str, char toChar, int startIndex, int endIndex)  
      static int findUnescaped​(java.lang.String str, char toChar, int startindex, int endindex, boolean honorQuotes)  
      protected java.util.Map<java.lang.String,​java.lang.Object>[] getDbxrefList​(java.lang.String line, int startoffset, int endoffset)  
      protected int getNestedValue​(org.biojava.ontology.obo.NestedValue nv, java.lang.String str, int startIndex)  
      java.util.List<OboFileEventListener> getOboFileEventListener()  
      protected java.lang.StringBuffer getTempBuffer()  
      static boolean isEscapeStarter​(char c)  
      static boolean isQuote​(char c)  
      void parseOBO​(java.io.BufferedReader oboFile)
      parse an ontology file
      protected java.util.Map<java.lang.String,​java.lang.Object> parseXref​(java.lang.String line, int startoffset, int endoffset)  
      protected OboFileParser.SOPair readQuotedString​(java.lang.String value, int startIndex, int stopIndex, char terminatingChar, boolean requireQuotes, boolean legalEndOfLine)  
      java.lang.String unescape​(java.lang.String str)  
      OboFileParser.SOPair unescape​(java.lang.String str, char toChar, int startindex, boolean mustFindChar)  
      OboFileParser.SOPair unescape​(java.lang.String str, char toChar, int startindex, int endindex, boolean mustFindChar)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait