Examples of OWLImportsDeclaration


Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

      }
      else {
        // loading multiple files so each input file should be added as
        // an import to the base ontology we created
        OWLOntology importOnt = manager.loadOntologyFromOntologyDocument( fileIRI )
        OWLImportsDeclaration declaration = manager.getOWLDataFactory()
            .getOWLImportsDeclaration( importOnt.getOntologyID().getOntologyIRI() );
        manager.applyChange( new AddImport( baseOntology, declaration ) );
      }
    } catch( IllegalArgumentException e ) {
      throw new RuntimeException( e );
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

    private void checkForImportsChange(OWLOntologyChange change) {
        if (change.isImportChange()) {
            resetImportsClosureCache();
            if (change instanceof AddImport) {
              OWLImportsDeclaration addImportDeclaration = ((AddImport) change).getImportDeclaration();
              boolean found=false;
              IRI iri = addImportDeclaration.getIRI();
        for(OWLOntologyID id:ontologiesByID.keySet()) {
                if(iri.equals(id.getDefaultDocumentIRI())||iri.equals(id.getOntologyIRI())) {
                  found=true;
                  ontologyIDsByImportsDeclaration.put(addImportDeclaration, id);
                }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

            Iterator<OWLImportsDeclaration> importedontob = inowl.getImportsDeclarations().iterator();
            additions = new LinkedList<OWLOntologyChange>();
            auxfactory = inowl.getOWLOntologyManager().getOWLDataFactory();

            while(importedontob.hasNext()){
                OWLImportsDeclaration  auxontob = importedontob.next();
                additions.add(new AddImport(toadd,auxontob));
            }
        }

        return additions;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

            Iterator<OWLImportsDeclaration> importedontob = inowl.getImportsDeclarations().iterator();
            additions = new LinkedList<OWLOntologyChange>();
            auxfactory = inowl.getOWLOntologyManager().getOWLDataFactory();

            while(importedontob.hasNext()){
                OWLImportsDeclaration  auxontob = importedontob.next();
                additions.add(new AddImport(toadd,auxontob));
            }
        }

        return additions;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

        // Named ontology with a provided absolute prefix. Use name and prefix
        // for creating an new import statement.
        if (!oChild.isAnonymous() && rewritePrefix != null
        /* && rewritePrefix.isAbsolute() */) {
            IRI impIri = IRI.create(rewritePrefix + "/" + oChild.getOntologyID().getOntologyIRI());
            OWLImportsDeclaration imp = factory.getOWLImportsDeclaration(impIri);
            ontologyManager.applyChange(new AddImport(oParent, imp));
        }
        // Anonymous, with physicalIRI. A plain import statement is added.
        else if (childSrc.hasPhysicalIRI()) {
            OWLImportsDeclaration imp = factory.getOWLImportsDeclaration(childSrc.getPhysicalIRI());
            ontologyManager.applyChange(new AddImport(oParent, imp));
        }

        // Anonymous and no physical IRI (e.g. in memory). Copy all axioms and
        // import statements.
        else {
            ontologyManager.addAxioms(oParent, oChild.getAxioms());
            for (OWLImportsDeclaration imp : oChild.getImportsDeclarations())
                ontologyManager.applyChange(new AddImport(oParent, factory.getOWLImportsDeclaration(imp
                        .getIRI())));
        }
        return oParent;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

            Iterator<OWLImportsDeclaration> importedontob = inowl.getImportsDeclarations().iterator();
            additions = new LinkedList<OWLOntologyChange>();
            auxfactory = inowl.getOWLOntologyManager().getOWLDataFactory();

            while(importedontob.hasNext()){
                OWLImportsDeclaration  auxontob = importedontob.next();
                additions.add(new AddImport(toadd,auxontob));
            }
        }

        return additions;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLImportsDeclaration

            Iterator<OWLImportsDeclaration> importedontob = inowl.getImportsDeclarations().iterator();
            additions = new LinkedList<OWLOntologyChange>();
            auxfactory = inowl.getOWLOntologyManager().getOWLDataFactory();
     
            while(importedontob.hasNext()){
                OWLImportsDeclaration  auxontob = importedontob.next();
                additions.add(new AddImport(toadd,auxontob));
            }
        }
   
        return additions;
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.