Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.AddImport


        for (OWLImportsDeclaration oldImp : o.getImportsDeclarations()) {
            changes.add(new RemoveImport(o, oldImp));
            String s = oldImp.getIRI().toString();
            if (s.contains("::")) s = s.substring(s.indexOf("::") + 2, s.length());
            IRI target = IRI.create(base + "/" + s);
            changes.add(new AddImport(o, df.getOWLImportsDeclaration(target)));
        }
        o.getOWLOntologyManager().applyChanges(changes);

        ResponseBuilder rb = Response.ok(o);
        addCORSOrigin(servletContext, rb, headers);
View Full Code Here


      return null;
    }
    List<OWLOntologyChange> additions = new LinkedList<OWLOntologyChange>();
    // The ODP metadata vocabulary is always imported.
    // TODO : also import the ONM meta when it goes online.
    additions.add(new AddImport(ont, __factory
        .getOWLImportsDeclaration(IRI.create("http://www.ontologydesignpatterns.org/schemas/meta.owl"))));
    for (OntologyScope scope : scopes) {
      OWLNamedIndividual iScope = __factory.getOWLNamedIndividual(IRI.create(scope.getNamespace()+scope
          .getID()));
      OWLAxiom ax = __factory.getOWLClassAssertionAxiom(cScope, iScope);
View Full Code Here

    protected void addOntologyAnnotation(OWLAnnotation annotation) {
        applyChange(new AddOntologyAnnotation(ontology, annotation));
    }

    protected void addImport(OWLImportsDeclaration declaration) {
        applyChange(new AddImport(ontology, declaration));
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.AddImport

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.