Examples of AddImport


Examples of org.semanticweb.owlapi.model.AddImport

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