Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.ontology.io
Class OboParser

    java.lang.Object
      org.biojava.ontology.io.OboParser

    public class OboParser

extends Object

Parses an OBO file.

Since:
  1.7

  ## Example

       OboParser parser = new OboParser();
                      InputStream inStream = this.getClass().getResourceAsStream("/files/ontology/biosapiens.obo");

                      BufferedReader oboFile = new BufferedReader ( new InputStreamReader ( inStream ) );
                      try {
                              Ontology ontology = parser.parseOBO(oboFile, "BioSapiens", "the BioSapiens ontology");

                              Set keys = ontology.getTerms();
                              Iterator iter = keys.iterator();
                              while (iter.hasNext()){
                                      System.out.println(iter.next());
                              }

                      } catch (Exception e){
                              e.printStackTrace();
                      }

Author:
  Andreas Prlic

Constructor Summary
`OboParser()`

Method Summary
`Ontology` | `parseOBO(BufferedReader oboFile, String ontoName, String ontoDescription)` Parse a OBO file and return its content as a BioJava Ontology object

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OboParser

    public OboParser()

Method Detail

### parseOBO

    public Ontology parseOBO(BufferedReader oboFile,
                             String ontoName,
                             String ontoDescription)
                      throws ParseException,
                             IOException

  Parse a OBO file and return its content as a BioJava Ontology object

  Parameters:
    `oboFile` - the file to be parsed
    `ontoName` -
    `ontoDescription` -
  Returns:
    the ontology represented as a BioJava ontology file
  Throws:
    `ParseException`
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD