/** * Parses a remote URL to an OBODoc. * * @param urlstr urlstr * @return parsed obo document * @throws IOException io exception * @throws OBOFormatParserException parser exception */ public OBODoc parseURL(String urlstr) throws IOException { URL url = new URL(urlstr); return parse(url); }
/** * Parses a remote URL to an OBODoc * * @param urlstr * @return parsed obo document * @throws IOException * @throws OBOFormatParserException */ public OBODoc parseURL(String urlstr) throws IOException, OBOFormatParserException { URL url = new URL(urlstr); return parse(url); }
/** * Parses a remote URL to an OBODoc. * * @param urlstr urlstr * @return parsed obo document * @throws IOException io exception * @throws OBOFormatParserException parser exception */ public OBODoc parseURL(String urlstr) throws IOException { URL url = new URL(urlstr); return parse(url); }
/** * Parses a remote URL to an OBODoc. * * @param urlstr urlstr * @return parsed obo document * @throws IOException io exception * @throws OBOFormatParserException parser exception */ public OBODoc parseURL(String urlstr) throws IOException { URL url = new URL(urlstr); return parse(url); }
/** * Parses a remote URL to an OBODoc. * * @param urlstr urlstr * @return parsed obo document * @throws IOException io exception * @throws OBOFormatParserException parser exception */ public OBODoc parseURL(String urlstr) throws IOException { URL url = new URL(urlstr); return parse(url); }
/** * Parses a local file or URL to an OBODoc. * * @param fn fn * @return parsed obo document * @throws IOException io exception * @throws OBOFormatParserException parser exception */ public OBODoc parse(String fn) throws IOException { if (fn.startsWith("http:")) { return parse(new URL(fn)); } return parse(new File(fn)); }
/** * Parses a local file or URL to an OBODoc. * * @param fn fn * @return parsed obo document * @throws IOException io exception * @throws OBOFormatParserException parser exception */ public OBODoc parse(String fn) throws IOException { if (fn.startsWith("http:")) { return parse(new URL(fn)); } return parse(new File(fn)); }
/** * Parses a remote URL to an OBODoc * * @param url * @return parsed obo document * @throws IOException * @throws OBOFormatParserException */ public OBODoc parse(URL url) throws IOException, OBOFormatParserException { location = url; BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), OBOFormatConstants.DEFAULT_CHARACTER_ENCODING)); return parse(in); }
/** * Parses a local file to an OBODoc * * @param file * @return parsed obo document * @throws IOException * @throws OBOFormatParserException */ public OBODoc parse(File file) throws IOException, OBOFormatParserException { location = file; BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), OBOFormatConstants.DEFAULT_CHARACTER_ENCODING)); return parse(in); }
/** * Parses a remote URL to an OBODoc. * * @param url url * @return parsed obo document * @throws IOException io exception * @throws OBOFormatParserException parser exception */ public OBODoc parse(URL url) throws IOException { location = url; BufferedReader in = new BufferedReader( new InputStreamReader(url.openStream(), StandardCharsets.UTF_8)); return parse(in); }
public PSIModReader(InputStream inputStream) throws IOException { OBOFormatParser oboReader = new OBOFormatParser(); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); try { oboDoc = oboReader.parse(bufferedReader); oboDoc.getInstanceFrames(); } finally { bufferedReader.close(); } }
public PSIModReader(InputStream inputStream) throws IOException { OBOFormatParser oboReader = new OBOFormatParser(); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); try { oboDoc = oboReader.parse(bufferedReader); oboDoc.getInstanceFrames(); } finally { bufferedReader.close(); } }
public static void main(String[] args) throws Exception { OBOFormatParser p = new OBOFormatParser(); OBODoc obodoc1 = p.parse(args[0]); OBODoc obodoc2 = p.parse(args[1]); OBODocDiffer dd = new OBODocDiffer(); List<Diff> diffs = dd.getDiffs(obodoc1, obodoc2); for (Diff d : diffs) { System.out.println(d); } }
/** * @param reader the reader * @param writer the writer * @throws IOException Signals that an I/O exception has occurred. * @throws OBOFormatParserException the oBO format parser exception */ public void write(Reader reader, Writer writer) throws IOException { OBOFormatParser parser = new OBOFormatParser(); OBODoc doc = parser.parse(reader); write(doc, writer); }
/** * @param reader the reader * @param writer the writer * @throws IOException Signals that an I/O exception has occurred. * @throws OBOFormatParserException the oBO format parser exception */ public void write(Reader reader, Writer writer) throws IOException { OBOFormatParser parser = new OBOFormatParser(); OBODoc doc = parser.parse(reader); write(doc, writer); }
/** * @param reader the reader * @param writer the writer * @throws IOException Signals that an I/O exception has occurred. * @throws OBOFormatParserException the oBO format parser exception */ public void write(Reader reader, Writer writer) throws IOException { OBOFormatParser parser = new OBOFormatParser(); OBODoc doc = parser.parse(reader); write(doc, writer); }
public void write(BufferedReader reader, BufferedWriter writer) throws IOException, OBOFormatParserException { OBOFormatParser parser = new OBOFormatParser(); OBODoc doc = parser.parse(reader); write(doc, writer); }
/** * @param reader the reader * @param writer the writer * @throws IOException Signals that an I/O exception has occurred. * @throws OBOFormatParserException the oBO format parser exception */ public void write(Reader reader, Writer writer) throws IOException { OBOFormatParser parser = new OBOFormatParser(); OBODoc doc = parser.parse(reader); write(doc, writer); }
@Override public OWLDocumentFormat parse(OWLOntologyDocumentSource source, OWLOntology in, OWLOntologyLoaderConfiguration config) { try { OBOFormatParser p = new OBOFormatParser(); OBODoc obodoc = p.parse(wrapInputAsReader(source, config)); // create a translator object and feed it the OBO Document OWLAPIObo2Owl bridge = new OWLAPIObo2Owl(in.getOWLOntologyManager()); bridge.convert(obodoc, in); return new OBODocumentFormat(); } catch (OBOFormatParserException | IOException | OWLOntologyInputSourceException e) { throw new OWLParserException(e); } }
@Override public OWLDocumentFormat parse(OWLOntologyDocumentSource source, OWLOntology in, OWLOntologyLoaderConfiguration config) { try { OBOFormatParser p = new OBOFormatParser(); OBODoc obodoc = p.parse(wrapInputAsReader(source, config)); // create a translator object and feed it the OBO Document OWLAPIObo2Owl bridge = new OWLAPIObo2Owl(in.getOWLOntologyManager()); bridge.convert(obodoc, in); return new OBODocumentFormat(); } catch (OBOFormatParserException | IOException | OWLOntologyInputSourceException e) { throw new OWLParserException(e); } }