Package org.coode.owlapi.manchesterowlsyntax

Examples of org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxOntologyFormat


* Date: 22-May-2007<br><br>
*/
public class ManchesterOWLSyntaxOntologyStorer extends AbstractOWLOntologyStorer {

    public boolean canStoreOntology(OWLOntologyFormat ontologyFormat) {
        return ontologyFormat.equals(new ManchesterOWLSyntaxOntologyFormat());
    }
View Full Code Here


        ByteArrayOutputStream out = new ByteArrayOutputStream();
        if(object instanceof OWLOntology){
            OWLOntology o = (OWLOntology) object;
            ManchesterOWLSyntaxOntologyStorer mosos = new ManchesterOWLSyntaxOntologyStorer();
            try {
                mosos.storeOntology(o.getOWLOntologyManager(), o, new StreamDocumentTarget(out), new ManchesterOWLSyntaxOntologyFormat());
            } catch (OWLOntologyStorageException e) {
                log.error("Cannot stream the ontology",e);
                throw new RuntimeException(e);
            }
        }else if (object instanceof Model){
View Full Code Here

                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.MANCHESTER_OWL)) {
                try {
                    manager.saveOntology(ontology, new ManchesterOWLSyntaxOntologyFormat(), out);
                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.FUNCTIONAL_OWL)) {
                try {
View Full Code Here

            if (o == null) o = scope.getCoreSpace().getOntology(OntologyUtils.decode(ontologyId),
                OWLOntology.class, false, prefix);
            if (o == null) rb = Response.status(NOT_FOUND);
            else try {
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                o.getOWLOntologyManager().saveOntology(o, new ManchesterOWLSyntaxOntologyFormat(), out);
                rb = Response.ok(new Viewable("ontology", new OntologyPrettyPrintResource(servletContext,
                        uriInfo, out, scope)));
            } catch (OWLOntologyStorageException e) {
                throw new WebApplicationException(e, INTERNAL_SERVER_ERROR);
            }
View Full Code Here

            OWLOntology o = session.getOntology(OntologyUtils.decode(ontologyId), OWLOntology.class, false,
                prefix);
            if (o == null) rb = Response.status(NOT_FOUND);
            else try {
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                o.getOWLOntologyManager().saveOntology(o, new ManchesterOWLSyntaxOntologyFormat(), out);
                rb = Response.ok(new Viewable("ontology", new OntologyPrettyPrintResource(servletContext,
                        uriInfo, out, session)));
            } catch (OWLOntologyStorageException e) {
                throw new WebApplicationException(e, INTERNAL_SERVER_ERROR);
            }
View Full Code Here

                    } catch (OWLOntologyStorageException e) {
                        log.error("Failed to store ontology for rendering.", e);
                    }
                } else if (mediaType.toString().equals(KRFormat.MANCHESTER_OWL)) {
                    try {
                        manager.saveOntology(ontology, new ManchesterOWLSyntaxOntologyFormat(), out);
                    } catch (OWLOntologyStorageException e) {
                        log.error("Failed to store ontology for rendering.", e);
                    }
                } else if (mediaType.toString().equals(KRFormat.FUNCTIONAL_OWL)) {
                    try {
View Full Code Here

                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.MANCHESTER_OWL)) {
                try {
                    manager.saveOntology(ontology, new ManchesterOWLSyntaxOntologyFormat(), out);
                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.FUNCTIONAL_OWL)) {
                try {
View Full Code Here

            || TURTLE_TYPE.equals(mediaType) || X_TURTLE_TYPE.equals(mediaType)) {

            OWLOntologyFormat format = null;
            if (RDF_XML_TYPE.equals(mediaType)) format = new RDFXMLOntologyFormat();
            else if (OWL_XML_TYPE.equals(mediaType)) format = new OWLXMLOntologyFormat();
            else if (MANCHESTER_OWL_TYPE.equals(mediaType)) format = new ManchesterOWLSyntaxOntologyFormat();
            else if (FUNCTIONAL_OWL_TYPE.equals(mediaType)) format = new OWLFunctionalSyntaxOntologyFormat();
            else if (TURTLE_TYPE.equals(mediaType) || X_TURTLE_TYPE.equals(mediaType)) format = new TurtleOntologyFormat();

            if (format != null) try {
                manager.saveOntology(ontology, format, out);
View Full Code Here

* Date: 22-May-2007<br><br>
*/
public class ManchesterOWLSyntaxOntologyStorer extends AbstractOWLOntologyStorer {

    public boolean canStoreOntology(OWLOntologyFormat ontologyFormat) {
        return ontologyFormat.equals(new ManchesterOWLSyntaxOntologyFormat());
    }
View Full Code Here

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        if(object instanceof OWLOntology){
            OWLOntology o = (OWLOntology) object;
            ManchesterOWLSyntaxOntologyStorer mosos = new ManchesterOWLSyntaxOntologyStorer();
            try {
                mosos.storeOntology(o.getOWLOntologyManager(), o, new StreamDocumentTarget(out), new ManchesterOWLSyntaxOntologyFormat());
            } catch (OWLOntologyStorageException e) {
                log.error("Cannot stream the ontology",e);
                throw new RuntimeException(e);
            }
        }else if (object instanceof Model){
View Full Code Here

TOP

Related Classes of org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxOntologyFormat

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.