Examples of OWLSubClassOfAxiom


Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

    @Override
    public OWLClassExpression visit(OWLObjectPropertyAssertionAxiom axiom) {
        OWLClassExpression sub = oneOf(axiom.getSubject());
        OWLClassExpression sup = factory.getOWLObjectHasValue(
                axiom.getProperty(), axiom.getObject());
        OWLSubClassOfAxiom ax = factory.getOWLSubClassOfAxiom(sub, sup);
        return ax.accept(this);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

        if (!unsatClass.isAnonymous()) {
            expandWithDefiningAxioms((OWLClass) unsatClass, expansionLimit);
        } else {
            OWLClass owlThing = owlOntologyManager.getOWLDataFactory()
                    .getOWLThing();
            OWLSubClassOfAxiom axiom = owlOntologyManager.getOWLDataFactory()
                    .getOWLSubClassOfAxiom(unsatClass, owlThing);
            debuggingAxioms.add(axiom);
            expandAxioms();
            debuggingAxioms.remove(axiom);
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

    @Override
    public void visit(OWLObjectPropertyDomainAxiom axiom) {
        // prop some Thing subclassOf domain
        OWLClassExpression sub = dataFactory.getOWLObjectSomeValuesFrom(
                axiom.getProperty(), dataFactory.getOWLThing());
        OWLSubClassOfAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub,
                axiom.getDomain());
        ax.accept(this);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

    @Override
    public void visit(OWLObjectPropertyRangeAxiom axiom) {
        // Thing subclassOf prop only Range
        OWLClassExpression sup = dataFactory.getOWLObjectAllValuesFrom(
                axiom.getProperty(), axiom.getRange());
        OWLSubClassOfAxiom ax = dataFactory.getOWLSubClassOfAxiom(
                dataFactory.getOWLThing(), sup);
        ax.accept(this);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

                + "        <annotatedSource rdf:resource=\"urn:myClass\"/>\n"
                + "        <annotatedTarget rdf:resource=\"urn:test\"/>\n"
                + "    </Axiom>\n" + "    <Class rdf:about=\"urn:test\"/>\n"
                + "</rdf:RDF>\n" + "";
        OWLOntology o = loadOntologyFromString(s);
        OWLSubClassOfAxiom def = df.getOWLSubClassOfAxiom(
                df.getOWLClass(IRI.create("urn:myClass")),
                df.getOWLClass(IRI.create("urn:test")),
                singleton(df.getOWLAnnotation(df.getRDFSLabel(),
                        df.getOWLLiteral("datatype definition", ""))));
        assertTrue(o.getAxioms().contains(def));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

    OWLDataProperty theprop = factory.getOWLDataProperty(IRI.create(rel));
    OWLLiteral valueconstant = factory.getOWLTypedLiteral(value);

    OWLClassExpression propdesc = factory.getOWLDataHasValue(theprop,
        valueconstant);
    OWLSubClassOfAxiom axiom = factory.getOWLSubClassOfAxiom(cls, propdesc);
    AddAxiom addAxiom = new AddAxiom(ont, axiom);
    manager.applyChange(addAxiom);
//    SBMLreactionCollector.logfilewriter.println("[" + cls.toString() + "->"
//        + theprop.toString() + "->" + valueconstant.toString()
//        + "] asserted");
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

   
            OWLObjectProperty prop = factory
                .getOWLObjectProperty(IRI.create(rel));
            OWLClassExpression prop_val = factory
                .getOWLObjectSomeValuesFrom(prop, value);
            OWLSubClassOfAxiom axiom = factory
                .getOWLSubClassOfAxiom(cls, prop_val);
            AddAxiom addAxiom = new AddAxiom(ont, axiom);
            manager.applyChange(addAxiom);
           

            if (applyinverse) {
              OWLObjectProperty invprop = factory
                  .getOWLObjectProperty(IRI.create(invrel));
              OWLClassExpression invprop_cls = factory
                  .getOWLObjectSomeValuesFrom(invprop, cls);
              OWLSubClassOfAxiom invaxiom = factory
                  .getOWLSubClassOfAxiom(value, invprop_cls);
              AddAxiom invAddAxiom = new AddAxiom(ont, invaxiom);
              manager.applyChange(invAddAxiom);
            }
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

            } else if (axiom instanceof OWLTransitiveObjectPropertyAxiom) {
                OWLTransitiveObjectPropertyAxiom a = (OWLTransitiveObjectPropertyAxiom) axiom;
                res.add(transformOWLTransitiveObjectPropertyAxiom(a));
                monitor.step(++workDone, totalAxioms);
            } else if (axiom instanceof OWLSubClassOfAxiom) {
                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;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

    return (IClass) convertOWLObject(ch);
  }

  public void addNecessaryRestriction(IRestriction restriction) {
    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLSubClassOfAxiom ax = getOWLDataFactory().getOWLSubClassOfAxiom(getOWLClass(),r);
      addAxiom(ax);
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLSubClassOfAxiom

    OWLSubClassOfAxiom ax = getOWLDataFactory().getOWLSubClassOfAxiom(getOWLClass(),r);
      addAxiom(ax);
  }
  public void removeNecessaryRestriction(IRestriction restriction) {
    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLSubClassOfAxiom ax = getOWLDataFactory().getOWLSubClassOfAxiom(getOWLClass(),r);
      removeAxiom(ax);
   
  }
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.