Package org.semanticweb.owlapi.model

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


            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

            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

        // 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

            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

            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

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

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.