Package org.semanticweb.owlapi.formats

Examples of org.semanticweb.owlapi.formats.RioRDFDocumentFormat


            if (!(format instanceof RioRDFDocumentFormat)) {
                throw new OWLOntologyStorageException(
                        "Unable to use RioOntologyStorer to store this format as it is not recognised as a RioRDFOntologyFormat: "
                                + format);
            }
            final RioRDFDocumentFormat rioFormat = (RioRDFDocumentFormat) format;
            if (format.isTextual()) {
                rioHandler = getRDFHandlerForWriter(rioFormat.getRioFormat(),
                        writer);
            } else {
                throw new OWLOntologyStorageException(
                        "Unable to use storeOntology with a Writer as the desired format is not textual. Format was "
                                + format);
View Full Code Here


            if (!(format instanceof RioRDFDocumentFormat)) {
                throw new OWLOntologyStorageException(
                        "Unable to use RioOntologyStorer to store this format as it is not recognised as a RioRDFOntologyFormat: "
                                + format);
            }
            final RioRDFDocumentFormat rioFormat = (RioRDFDocumentFormat) format;
            if (format.isTextual()) {
                try {
                    Writer writer = new BufferedWriter(new OutputStreamWriter(
                            outputStream, UTF_8));
                    rioHandler = getRDFHandlerForWriter(
                            rioFormat.getRioFormat(), writer);
                } catch (IOException e) {
                    throw new OWLOntologyStorageException(e);
                }
            } else {
                rioHandler = getRDFHandlerForOutputStream(
                        rioFormat.getRioFormat(), outputStream);
            }
        }
        try {
            final RioRenderer ren = new RioRenderer(ontology, rioHandler,
                    format, contexts);
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.formats.RioRDFDocumentFormat

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.