Package org.semanticweb.owlapi.util

Examples of org.semanticweb.owlapi.util.AxiomSubjectProvider


            boolean anonRoot = true;
            Set<OWLAxiom> axioms = new HashSet<>();
            for (OWLAxiom ax : ontology.getReferencingAxioms(anonInd, EXCLUDED)) {
                if (!(ax instanceof OWLDifferentIndividualsAxiom)) {
                    assert ax != null;
                    AxiomSubjectProvider subjectProvider = new AxiomSubjectProvider();
                    OWLObject obj = subjectProvider.getSubject(ax);
                    if (!obj.equals(anonInd)) {
                        anonRoot = false;
                        break;
                    } else {
                        axioms.add(ax);
View Full Code Here


        for(OWLAnonymousIndividual anonInd : ontology.getReferencedAnonymousIndividuals()) {
            boolean anonRoot = true;
            Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();
            for(OWLAxiom ax : ontology.getReferencingAxioms(anonInd)) {
                if (!(ax instanceof OWLDifferentIndividualsAxiom)) {
                    AxiomSubjectProvider subjectProvider = new AxiomSubjectProvider();
                    OWLObject obj = subjectProvider.getSubject(ax);
                    if(!obj.equals(anonInd)) {
                        anonRoot = false;
                        break;
                    }
                    else {
View Full Code Here

        for(OWLAnonymousIndividual anonInd : ontology.getReferencedAnonymousIndividuals()) {
            boolean anonRoot = true;
            Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();
            for(OWLAxiom ax : ontology.getReferencingAxioms(anonInd)) {
                if (!(ax instanceof OWLDifferentIndividualsAxiom)) {
                    AxiomSubjectProvider subjectProvider = new AxiomSubjectProvider();
                    OWLObject obj = subjectProvider.getSubject(ax);
                    if(!obj.equals(anonInd)) {
                        anonRoot = false;
                        break;
                    }
                    else {
View Full Code Here

                    final OWLAxiom axiom = change.getAxiom();
                    handleAxiomChange(axiom);
                }

                private void handleAxiomChange(OWLAxiom axiom) {
                    AxiomSubjectProvider p = new AxiomSubjectProvider();
                    OWLObject subject = p.getSubject(axiom);
                    Set<OWLEntity> entities;
                    if (subject instanceof IRI) {
                        entities = project.getRootOntology().getEntitiesInSignature((IRI) subject);
                        if(axiom instanceof OWLAnnotationAssertionAxiom) {
                            if(((OWLAnnotationAssertionAxiom) axiom).isDeprecatedIRIAssertion()) {
View Full Code Here

        private AxiomEntitySubjectProvider(HasGetEntitiesWithIRI hasGetEntitiesWithIRI) {
            this.hasGetEntitiesWithIRI = hasGetEntitiesWithIRI;
        }

        public Set<OWLEntity> getSubject(OWLAxiom axiom) {
            OWLObject subject = new AxiomSubjectProvider().getSubject(axiom);
            if(subject instanceof OWLEntity) {
                return Collections.singleton((OWLEntity) subject);
            }
            else if(subject instanceof IRI) {
                return hasGetEntitiesWithIRI.getEntitiesWithIRI((IRI) subject);
View Full Code Here

        Set<OWLEntity> result = new HashSet<OWLEntity>();
        Set<IRI> iris = new HashSet<IRI>();
        for (OWLOntologyChangeRecord change : changes) {
            if (change.getData() instanceof AxiomChangeData) {
                OWLAxiom ax = ((AxiomChangeData) change.getData()).getAxiom();
                AxiomSubjectProvider axiomSubjectProvider = new AxiomSubjectProvider();
                OWLObject object = axiomSubjectProvider.getSubject(ax);
                if (object instanceof OWLEntity) {
                    result.add((OWLEntity) object);
                }
                else if (object instanceof IRI) {
                    iris.add((IRI) object);
View Full Code Here

        OWLObject changeSubject = getChangeSubject(change);
        return entity.equals(changeSubject) || entity.getIRI().equals(changeSubject);
    }

    private OWLObject getChangeSubject(AxiomChangeData change) {
        AxiomSubjectProvider subjectProvider = new AxiomSubjectProvider();

        return subjectProvider.getSubject(change.getAxiom());
    }
View Full Code Here

        for(OWLAnonymousIndividual anonInd : ontology.getReferencedAnonymousIndividuals()) {
            boolean anonRoot = true;
            Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();
            for(OWLAxiom ax : ontology.getReferencingAxioms(anonInd)) {
                if (!(ax instanceof OWLDifferentIndividualsAxiom)) {
                    AxiomSubjectProvider subjectProvider = new AxiomSubjectProvider();
                    OWLObject obj = subjectProvider.getSubject(ax);
                    if(!obj.equals(anonInd)) {
                        anonRoot = false;
                        break;
                    }
                    else {
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.util.AxiomSubjectProvider

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.