Examples of OWLImportsDeclaration


Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

    @Test
    public void shouldBuildImportsDeclarationProperty() {
        // given
        BuilderImportsDeclaration builder = new BuilderImportsDeclaration(df)
                .withImportedOntology(iri);
        OWLImportsDeclaration expected = df.getOWLImportsDeclaration(iri);
        // when
        OWLImportsDeclaration built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

        @Override
        public void handleTriple(IRI subject, IRI predicate, IRI object) {
            consumeTriple(subject, predicate, object);
            consumer.addOntology(subject);
            consumer.addOntology(object);
            OWLImportsDeclaration importsDeclaration = df
                    .getOWLImportsDeclaration(object);
            consumer.addImport(importsDeclaration);
            if (!consumer.getConfiguration().isIgnoredImport(object)) {
                OWLOntologyManager man = consumer.getOWLOntologyManager();
                man.makeLoadImportRequest(importsDeclaration,
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

            } else if (inHeader) {
                if (tag.equals(IMPORT_TAG_NAME)) {
                    String trim = value.trim();
                    assert trim != null;
                    IRI uri = IRI.create(trim);
                    OWLImportsDeclaration decl = owlOntologyManager
                            .getOWLDataFactory().getOWLImportsDeclaration(uri);
                    owlOntologyManager.makeLoadImportRequest(decl,
                            configuration);
                    owlOntologyManager
                            .applyChange(new AddImport(ontology, decl));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

    }

    @Override
    void endElement() {
        IRI ontIRI = handler.getIRI(getText().trim());
        OWLImportsDeclaration decl = df.getOWLImportsDeclaration(ontIRI);
        handler.getOWLOntologyManager().applyChange(
                new AddImport(handler.getOntology(), decl));
        handler.getOWLOntologyManager().makeLoadImportRequest(decl,
                handler.getConfiguration());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

        IRI ont1iri = ont1.getOntologyID().getOntologyIRI().get();
        OWLOntology ont2 = getOWLOntology("testont2A");
        @SuppressWarnings("null")
        @Nonnull
        IRI ont2iri = ont2.getOntologyID().getOntologyIRI().get();
        OWLImportsDeclaration ont2import = ImportsDeclaration(ont1iri);
        ont1.getOWLOntologyManager().applyChange(
                new AddImport(ont2, ont2import));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
        OWLAxiom axannoPropdecl = Declaration(annoProp);
        ont1.getOWLOntologyManager().addAxiom(ont1, axannoPropdecl);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

        IRI ont1iri = ont1.getOntologyID().getOntologyIRI().get();
        OWLOntology ont2 = getOWLOntology("testont2B");
        IRI ont2iri = ont2.getOntologyID().getOntologyIRI().get();
        assert ont1iri != null;
        assert ont2iri != null;
        OWLImportsDeclaration ont2import = ImportsDeclaration(ont1iri);
        ont2.getOWLOntologyManager().applyChange(
                new AddImport(ont2, ont2import));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
        OWLAxiom axAnnoPropDecl = Declaration(annoProp);
        ont1.getOWLOntologyManager().addAxiom(ont1, axAnnoPropDecl);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

            return true;
        }
        if (!(obj instanceof OWLImportsDeclaration)) {
            return false;
        }
        OWLImportsDeclaration other = (OWLImportsDeclaration) obj;
        return iri.equals(other.getIRI());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

  }
 
  public void addImportedOntology(IOntology o) throws IOntologyException {
    lazyLoad();
    IRI toImport=IRI.create(o.getURI());
    OWLImportsDeclaration importDeclaraton = getOWLDataFactory().getOWLImportsDeclaration(toImport);
    getOWLOntologyManager().applyChange(new AddImport(getOWLOntology(),importDeclaraton));
   
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

   
  }
  public void removeImportedOntology(IOntology o) {
    lazyLoad();
    IRI toImport=IRI.create(o.getURI());
    OWLImportsDeclaration importDeclaraton = getOWLDataFactory().getOWLImportsDeclaration(toImport);
    getOWLOntologyManager().applyChange(new RemoveImport(getOWLOntology(),importDeclaraton));
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

  }
 
  public void addImportedOntology(IOntology o) throws IOntologyException {
    lazyLoad();
    IRI toImport=IRI.create(o.getURI());
    OWLImportsDeclaration importDeclaraton = getOWLDataFactory().getOWLImportsDeclaration(toImport);
    getOWLOntologyManager().applyChange(new AddImport(getOWLOntology(),importDeclaraton));
   
  }
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.