Package org.obolibrary.oboformat.parser

Examples of org.obolibrary.oboformat.parser.OBOFormatParser$MyStream


    }

    @Nonnull
    protected OBODoc parseOBOFile(@Nonnull Reader fn, boolean allowEmptyFrames)
            throws IOException {
        OBOFormatParser p = new OBOFormatParser();
        OBODoc obodoc = p.parse(new BufferedReader(fn));
        assertNotNull("The obodoc should not be null", obodoc);
        if (obodoc.getTermFrames().isEmpty() && !allowEmptyFrames) {
            fail("Term frames should not be empty.");
        }
        return obodoc;
View Full Code Here


        return inputStream;
    }

    @Nonnull
    protected OBODoc parseOBOFile(@Nonnull File file) throws IOException {
        OBOFormatParser p = new OBOFormatParser();
        return p.parse(file.getCanonicalPath());
    }
View Full Code Here

    }

    @Nonnull
    protected static OBODoc parseOboToString(@Nonnull String oboString)
            throws IOException {
        OBOFormatParser p = new OBOFormatParser();
        BufferedReader reader = new BufferedReader(new StringReader(oboString));
        OBODoc parsedOboDoc = p.parse(reader);
        reader.close();
        return parsedOboDoc;
    }
View Full Code Here

     * @throws OBOFormatParserException
     *         the oBO format parser exception
     */
    public void write(BufferedReader reader, @Nonnull BufferedWriter writer)
            throws IOException {
        OBOFormatParser parser = new OBOFormatParser();
        OBODoc doc = parser.parse(reader);
        write(doc, writer);
    }
View Full Code Here

                    OWLOntologyCreationException {
        if (iri == null && source == null) {
            throw new IllegalArgumentException(
                    "iri and source annot both be null");
        }
        OBOFormatParser p = new OBOFormatParser();
        OBODoc obodoc = null;
        if (iri != null) {
            obodoc = p.parse(iri.toURI().toURL());
        } else {
            if (source.isReaderAvailable()) {
                obodoc = p.parse(new BufferedReader(source.getReader()));
            } else if (source.isInputStreamAvailable()) {
                obodoc = p.parse(new BufferedReader(new InputStreamReader(
                        source.getInputStream())));
            } else {
                return parse(source.getDocumentIRI(), null, in);
            }
        }
View Full Code Here

TOP

Related Classes of org.obolibrary.oboformat.parser.OBOFormatParser$MyStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.