StanzaToOWLConverter { public void parse(String fn) throws IOException { File myFile = new File(fn); parse(myFile); } StanzaToOWLConverter(OWLGraphWrapper graph); void setDefaults(); void parse(String fn); void parse(File myFile); void translate(Stanza s); public Config config; public OWLGraphWrapper graph; }
@Test public void testConvert() throws Exception{ OWLGraphWrapper wrapper = getOBO2OWLOntologyWrapper("caro.obo"); File f = getResource("GO.xrf_abbs"); StanzaToOWLConverter sc = new StanzaToOWLConverter(wrapper); OWLOntology tgt = wrapper.getManager().createOntology(); sc.config.targetOntology = tgt; sc.config.defaultPrefix = "http: sc.parse(f); assertTrue(tgt.getAxiomCount() > 0); for (OWLAxiom ax : tgt.getAxioms()) { LOG.debug(ax); } }