Examples of OBOFormatParser


Examples of org.obolibrary.oboformat.parser.OBOFormatParser

    }

    @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

Examples of org.obolibrary.oboformat.parser.OBOFormatParser

        return inputStream;
    }

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

Examples of org.obolibrary.oboformat.parser.OBOFormatParser

    }

    @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

Examples of org.obolibrary.oboformat.parser.OBOFormatParser

     * @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

Examples of org.obolibrary.oboformat.parser.OBOFormatParser

                    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
Copyright © 2018 www.massapi.com. 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.