Package org.semanticweb.owl.io

Examples of org.semanticweb.owl.io.RDFXMLOntologyFormat


    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    /* Set up a mapping, which maps the ontology URI to the physical URI */
    SimpleURIMapper mapper = new SimpleURIMapper(ontology.getURI(), tboxPhysicalURI);
    manager.addURIMapper(mapper);
    try {
      manager.saveOntology(ontology, new RDFXMLOntologyFormat(), tboxPhysicalURI);
    } catch (UnknownOWLOntologyException e) {
      logger.equals("Couldn't save approximated Tbox to file ("+tboxPhysicalURI+")");
      logger.equals(e);
    } catch (OWLOntologyStorageException e) {
      logger.equals("Couldn't save approximated Tbox to file ("+tboxPhysicalURI+")");
View Full Code Here


        physicalURI);
    manager.addURIMapper(mapper);

    try
    {
      manager.saveOntology(ontology, new RDFXMLOntologyFormat(),
          physicalURI);
    } catch (UnknownOWLOntologyException e)
    {
    } catch (OWLOntologyStorageException e)
    {
View Full Code Here

            entity = getDataFactory().getOWLDataProperty(subject);
        }
        else if (getConsumer().isAnnotationProperty(subject)) {
            // An annotation on an annotation property - what the hell do we do here?
            // 18th Dec 2006: I can't find anyway of dealing with this!
            RDFXMLOntologyFormat format = getConsumer().getOntologyFormat();
            format.addAnnotationURIAnnotation(subject, annotation);
            consumeTriple(subject, predicate, object);
        }
        else {
            // The annotation will either be on an individual or on an
            // axiom
View Full Code Here

                    return annotationPropertyURIs.contains(uri);
                }
                else {
                    OWLOntologyFormat format = owlOntologyManager.getOntologyFormat(ont);
                    if (format instanceof RDFXMLOntologyFormat) {
                        RDFXMLOntologyFormat rdfFormat = (RDFXMLOntologyFormat) format;
                        annotationPropertyURIs.addAll(rdfFormat.getAnnotationURIs());
                        return annotationPropertyURIs.contains(uri);
                    }
                }
            }
        }
View Full Code Here

    public void endModel() throws SAXException {
        try {
            uriMap.clear();

            tripleProcessor.fine("Total number of triples: " + count);
            RDFXMLOntologyFormat format = getOntologyFormat();
            if (format != null) {
                format.setNumberOfTriplesProcessedDuringLoading(count);
            }

            // Do we need to change the ontology URI?
            if (!ontologyURIs.contains(ontology.getURI())) {
                if (ontologyURIs.size() == 1) {
View Full Code Here

    protected Set<URI> getAnnotationURIsThatRequireNamespaces() {
        Set<URI> results = new HashSet<URI>();
        OWLOntologyFormat format = man.getOntologyFormat(ontology);
        // Nasty hack until OWL 1.1 spec is fixed
        if (format instanceof RDFXMLOntologyFormat) {
            RDFXMLOntologyFormat rdfXmlFormat = (RDFXMLOntologyFormat) format;
            results.addAll(rdfXmlFormat.getAnnotationURIs());
        }
        results.addAll(ontology.getAnnotationURIs());
        return results;
    }
View Full Code Here

        annotationURIs.removeAll(OWLRDFVocabulary.BUILT_IN_ANNOTATION_PROPERTIES);
        Map<URI, Set<OWLAnnotation>> annoURIAnnotations = Collections.emptyMap();
        OWLOntologyFormat format = getOntologyFormat();

        if (format instanceof RDFXMLOntologyFormat) {
            RDFXMLOntologyFormat rdfXMLFormat = (RDFXMLOntologyFormat) format;
            annotationURIs.addAll(rdfXMLFormat.getAnnotationURIs());
            annoURIAnnotations = rdfXMLFormat.getAnnotationURIAnnotations();
        }
        if (!annotationURIs.isEmpty()) {
            writeBanner("Annotation properties");
            graph = new RDFGraph();
            for (URI uri : annotationURIs) {
View Full Code Here

TOP

Related Classes of org.semanticweb.owl.io.RDFXMLOntologyFormat

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.