Examples of OWLXMLOntologyFormat


Examples of org.semanticweb.owl.io.OWLXMLOntologyFormat

* Date: 07-Jan-2007<br><br>
*/
public class OWLXMLOntologyStorer extends AbstractOWLOntologyStorer {

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

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

* Date: 07-Jan-2007<br><br>
*/
public class OWLXMLOntologyStorer extends AbstractOWLOntologyStorer {

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

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

 
  public void write(OutputStream out, int format) throws IOntologyException {
    OWLOntologyFormat ontologyFormat = manager.getOntologyFormat(ontology);
    switch(format){
    case OWL_FORMAT:
      ontologyFormat = new OWLXMLOntologyFormat();break;
    case RDF_FORMAT:
      ontologyFormat = new RDFXMLOntologyFormat();break;
    case NTRIPLE_FORMAT:
      throw new IOntologyException("Unsupported export format");
    case OBO_FORMAT:
View Full Code Here

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

 
  public void write(OutputStream out, int format) throws IOntologyException {
    OWLOntologyFormat ontologyFormat = manager.getOntologyFormat(ontology);
    switch(format){
    case OWL_FORMAT:
      ontologyFormat = new OWLXMLOntologyFormat();break;
    case RDF_FORMAT:
      ontologyFormat = new RDFXMLOntologyFormat();break;
    case NTRIPLE_FORMAT:
      throw new IOntologyException("Unsupported export format");
    case OBO_FORMAT:
View Full Code Here

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

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

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

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

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

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

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

            || MANCHESTER_OWL_TYPE.equals(mediaType) || FUNCTIONAL_OWL_TYPE.equals(mediaType)
            || 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 {
View Full Code Here

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

* Date: 07-Jan-2007<br><br>
*/
public class OWLXMLOntologyStorer extends AbstractOWLOntologyStorer {

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

Examples of org.semanticweb.owlapi.io.OWLXMLOntologyFormat

    public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) throws OWLParserException, IOException, OWLOntologyChangeException, UnloadableImportException {
      InputSource isrc = null;
      try {
            System.setProperty("entityExpansionLimit", "100000000");
            OWLXMLOntologyFormat format = new OWLXMLOntologyFormat();
            SAXParserFactory factory = SAXParserFactory.newInstance();
            factory.setNamespaceAware(true);
            SAXParser parser = factory.newSAXParser();
            isrc = getInputSource(documentSource);
            OWLXMLParserHandler handler = new OWLXMLParserHandler(ontology, configuration);
            parser.parse(isrc, handler);
            Map<String, String> prefix2NamespaceMap = handler.getPrefixName2PrefixMap();
            for(String prefix : prefix2NamespaceMap.keySet()) {
                format.setPrefix(prefix, prefix2NamespaceMap.get(prefix));
            }
            return format;
        }
        catch (ParserConfigurationException e) {
            // What the hell should be do here?  In serious trouble if this happens
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.