Examples of OWLObjectPropertyAssertionAxiom


Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

        OWLDeclarationAxiom daxiomsub = factory.getOWLDeclarationAxiom(sub); // subject
        OWLDeclarationAxiom daxiomobj = factory.getOWLDeclarationAxiom(obj); // object

        OWLClassAssertionAxiom axiomsub = factory.getOWLClassAssertionAxiom(cls, sub); // Istanza
        OWLClassAssertionAxiom axiomobj = factory.getOWLClassAssertionAxiom(cls, obj); // Istanza
        OWLObjectPropertyAssertionAxiom axiomop = factory.getOWLObjectPropertyAssertionAxiom(op, sub, obj); // Obj
                                                                                                            // prop
                                                                                                            // tra
                                                                                                            // individui
        OWLDataPropertyAssertionAxiom axiomvalue = factory
                .getOWLDataPropertyAssertionAxiom(dp, sub, literal1); // Dataprop all'istanza;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

    OWLDataFactory factory = manager.getOWLDataFactory();
//    PrefixManager pm = new DefaultPrefixManager(ontology.getOntologyID().getOntologyIRI().toString());

    // To specify that name1 is related to name2 via the prop property
    // we create an object property assertion and add it to the ontology
    OWLObjectPropertyAssertionAxiom propertyAssertion = factory.getOWLObjectPropertyAssertionAxiom(prop, name0, name1);
    manager.addAxiom(ontology, propertyAssertion);
   
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

    OWLDataFactory factory = manager.getOWLDataFactory();
//    PrefixManager pm = new DefaultPrefixManager(ontology.getOntologyID().getOntologyIRI().toString());

    // To specify that name1 is related to name2 via the prop property
    // we create an object property assertion and add it to the ontology
    OWLObjectPropertyAssertionAxiom propertyAssertion = factory.getOWLObjectPropertyAssertionAxiom(prop, name0, name1);
    manager.addAxiom(ontology, propertyAssertion);
   
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

    OWLDataFactory factory = manager.getOWLDataFactory();
//    PrefixManager pm = new DefaultPrefixManager(ontology.getOntologyID().getOntologyIRI().toString());

    // To specify that name1 is related to name2 via the prop property
    // we create an object property assertion and add it to the ontology
    OWLObjectPropertyAssertionAxiom propertyAssertion = factory.getOWLObjectPropertyAssertionAxiom(prop, name0, name1);
    manager.addAxiom(ontology, propertyAssertion);
   
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

       OWLDataProperty sequence = factory.getOWLDataProperty(IRI.create(owlIDrmi + "hasSequence"));
       OWLObjectProperty hasrule = factory.getOWLObjectProperty(IRI.create(owlIDrmi + "hasRule"));
       OWLObjectProperty start = factory.getOWLObjectProperty(IRI.create(owlIDrmi + "startWith"));
       OWLObjectProperty end = factory.getOWLObjectProperty(IRI.create(owlIDrmi + "endWith"));
       OWLObjectProperty precedes = factory.getOWLObjectProperty(IRI.create("http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"));
       OWLObjectPropertyAssertionAxiom objectPropAssertion;

       if (((recipeName != null) || !recipeName.toString().isEmpty()) && ((rules != null) || !rules.isEmpty())) {
           if (!owlmodel.containsAxiom(factory.getOWLClassAssertionAxiom(ontocls, ontoind))) {

               //Add the rule istance
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

       OWLDataProperty sequence = factory.getOWLDataProperty(IRI.create(owlIDrmi + "hasSequence"));
       OWLObjectProperty hasrule = factory.getOWLObjectProperty(IRI.create(owlIDrmi + "hasRule"));
       OWLObjectProperty start = factory.getOWLObjectProperty(IRI.create(owlIDrmi + "startWith"));
       OWLObjectProperty end = factory.getOWLObjectProperty(IRI.create(owlIDrmi + "endWith"));
       OWLObjectProperty precedes = factory.getOWLObjectProperty(IRI.create("http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"));
       OWLObjectPropertyAssertionAxiom objectPropAssertion;

       if (((recipeName != null) || !recipeName.toString().isEmpty()) && ((rules != null) || !rules.isEmpty())) {
           if (!owlmodel.containsAxiom(factory.getOWLClassAssertionAxiom(ontocls, ontoind))) {

               //Add the rule istance
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

        OWLObjectProperty precedes = factory.getOWLObjectProperty(IRI.create("http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"));

        Object[] keys = recipeMap.keySet().toArray();

        String recipeDescription = "";
        OWLObjectPropertyAssertionAxiom objectPropAssertion;

        for (int k = 0; k < keys.length; k++) {
            String recipeName = (String) keys[k];

            OWLNamedIndividual ontoind = factory.getOWLNamedIndividual(IRI.create(owlID + recipeName));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

        OWLObjectProperty precedes = factory.getOWLObjectProperty(IRI.create("http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"));

        Object[] keys = recipeMap.keySet().toArray();

        String recipeDescription = "";
        OWLObjectPropertyAssertionAxiom objectPropAssertion;


        for (int k = 0; k < keys.length; k++) {
            IRI recipeName = (IRI) keys[k];
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

                           objprop = factory.getOWLObjectProperty(IRI.create(owlIDrmi+"endWith"));
                           objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop,ontoind, ruleindf);
                           owlmanager.addAxiom(owlmodel, objectPropAssertion);
                           //Remove the previous endWith
                           if(seq.size()>2){
                                OWLObjectPropertyAssertionAxiom remove = factory.getOWLObjectPropertyAssertionAxiom(objprop,ontoind, ruleindp);
                                owlmanager.removeAxiom(owlmodel,remove);
                           }
                        }

                   }else{
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom

        owlmanager.addAxiom(owlmodel, dataPropAssertion);

        OWLObjectProperty objprop = factory.getOWLObjectProperty(IRI.create(ID + "hasRule"));

        OWLNamedIndividual ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleC"));
        OWLObjectPropertyAssertionAxiom objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(
            objprop, ontoind, ruleind);
        owlmanager.addAxiom(owlmodel, objectPropAssertion);

        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleB"));
        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
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.