[Biojava-l] Trouble with GOParser

"Óscar D. Sánchez Jiménez" osanchez at fis.upv.es
Thu Jul 14 10:37:18 EDT 2005


I am having some troubles wiht GOParser class. I would like to use it in 
order to load an ontology and then display this ontology in a JTree.

This is the code I am testing:

try {
        BufferedReader file = new BufferedReader(new 
        OntologyFactory factory = OntoTools.getDefaultFactory();
        GOParser parser = new GOParser();     
        Ontology onto = parser.parseGO(file, "trait", "description", 

        } catch (Exception e) {System.out.println(e);};

When I execute it, I get a java.lang.NullPointerException. The line 
causing the exception is the parseGO(...) one. Do you have any idea? I 
am able to read perfectly the ontology with Dag-Edit.

Thanks in advance,

Óscar D. Sánchez

Óscar David Sánchez Jiménez
Telecommunications Engineer - Computer Science Ph.D. student

Grupo de Informática Médica
ITACA - BET (Bioingeniería, Electrónica y Telemedicina)
Universidad Politécnica de Valencia
Camino de Vera s/n E-46022 Valencia (Spain)

More information about the Biojava-l mailing list