Examples of OWLEquivalentClassesAxiom


Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

        OWLClass clsB = Class(iri("B"));
        OWLClass clsC = Class(iri("C"));
        OWLClass clsD = Class(iri("D"));
        OWLObjectProperty prop = ObjectProperty(iri("prop"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLEquivalentClassesAxiom ax = EquivalentClasses(clsA, clsB, clsC,
                ObjectSomeValuesFrom(prop, clsD));
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getEquivalentClassesAxioms(clsA).contains(ax));
        assertTrue(ont.getEquivalentClassesAxioms(clsB).contains(ax));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

                @Nonnull OWLObjectPropertyExpression p) {
            OWLClassExpression gciRHS = expandObject(filler, p);
            if (gciRHS != null) {
                OWLClassExpression gciLHS = dataFactory
                        .getOWLObjectSomeValuesFrom(p, filler);
                OWLEquivalentClassesAxiom ax = dataFactory
                        .getOWLEquivalentClassesAxiom(gciLHS, gciRHS);
                output(ax);
            }
            return gciRHS;
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

                @Nonnull OWLObjectPropertyExpression p) {
            OWLClassExpression gciRHS = expandObject(filler, p);
            if (gciRHS != null) {
                OWLClassExpression gciLHS = dataFactory.getOWLObjectHasValue(p,
                        filler);
                OWLEquivalentClassesAxiom ax = dataFactory
                        .getOWLEquivalentClassesAxiom(gciLHS, gciRHS);
                output(ax);
            }
            return gciRHS;
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

                OWLSubClassOfAxiom a = (OWLSubClassOfAxiom) axiom;
                Axiom ax = transformOWLSubClassOfAxiom(a);
                if(ax != null) res.add(ax);
                monitor.step(++workDone, totalAxioms);
            } else if (axiom instanceof OWLEquivalentClassesAxiom) {
                OWLEquivalentClassesAxiom a = (OWLEquivalentClassesAxiom) axiom;
                res.addAll(transformOWLEquivalentClassesAxiom(a));
                monitor.step(++workDone, totalAxioms);
            } else if (axiom instanceof OWLDisjointClassesAxiom) {
                OWLDisjointClassesAxiom a = (OWLDisjointClassesAxiom) axiom;
                Axiom ax = transformOWLDisjointClassesAxiom(a);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

      removeAxiom(ax);
   
  }
  public void addEquivalentRestriction(IRestriction restriction) {
    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLEquivalentClassesAxiom ax = getOWLDataFactory().getOWLEquivalentClassesAxiom(getOWLClass(),r);
      addAxiom(ax);
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

    OWLEquivalentClassesAxiom ax = getOWLDataFactory().getOWLEquivalentClassesAxiom(getOWLClass(),r);
      addAxiom(ax);
  }
  public void removeEquivalentRestriction(IRestriction restriction) {
    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLEquivalentClassesAxiom ax = getOWLDataFactory().getOWLEquivalentClassesAxiom(getOWLClass(),r);
      removeAxiom(ax);
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

      removeAxiom(ax);
   
  }
  public void addEquivalentRestriction(IRestriction restriction) {
    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLEquivalentClassesAxiom ax = getOWLDataFactory().getOWLEquivalentClassesAxiom(getOWLClass(),r);
      addAxiom(ax);
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

    OWLEquivalentClassesAxiom ax = getOWLDataFactory().getOWLEquivalentClassesAxiom(getOWLClass(),r);
      addAxiom(ax);
  }
  public void removeEquivalentRestriction(IRestriction restriction) {
    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLEquivalentClassesAxiom ax = getOWLDataFactory().getOWLEquivalentClassesAxiom(getOWLClass(),r);
      removeAxiom(ax);
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

                                result.add(sca.getSubClass().asOWLClass());
                            }
                        }
                    }
                    else if (ax instanceof OWLEquivalentClassesAxiom) {
                        OWLEquivalentClassesAxiom eca = (OWLEquivalentClassesAxiom) ax;
                        for (OWLClassExpression ce : eca.getClassExpressions()) {
                            if (ce.containsConjunct(parent)) {
                                for (OWLClassExpression sub : eca.getClassExpressions()) {
                                    if (!sub.isAnonymous() && !sub.equals(ce)) {
                                        result.add(sub.asOWLClass());
                                    }
                                }
                            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom

 
  public void shouldAddEquivalentClassAxiom(OWLOntologyManager manager, OWLClass cls1, OWLClass cls2){
    OWLOntology ontology = manager.getOntology(currentOntologyID)//get the ontology
    OWLDataFactory factory = manager.getOWLDataFactory()//get a factory
   
    OWLEquivalentClassesAxiom axiom = factory.getOWLEquivalentClassesAxiom(cls1, cls2); //say the classes are equal
        manager.addAxiom(ontology, axiom); //add the axiom...do i need to apply the chage?
       
  }
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.