Examples of addAxioms()


Examples of org.semanticweb.owl.model.OWLOntologyManager.addAxioms()

          SimpleURIMapper mapper = new SimpleURIMapper(newAboxURI,
              newAboxPhysicalURI);
          manager.addURIMapper(mapper);

          modifiedAboxOntology = manager.createOntology(newAboxURI);
          manager.addAxioms(modifiedAboxOntology, aboxOntology
              .getAxioms());

          /*
           * System.out.println(newAboxPhysicalURI.toString() + ", " +
           * newAboxURI);
 
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.addAxioms()

        axioms.add(factory.getOWLDataPropertyAssertionAxiom(hasAge, mary, 8));
        // Now add all the axioms in one go - there is a convenience method on
        // OWLOntologyManager that will automatically generate the AddAxiom
        // change objects for us. We need to specify the ontology that the
        // axioms should be added to and the axioms to add.
        manager.addAxioms(ont, axioms);
        // Now specify the genders of John, Mary, Bill and Susan. To do this we
        // need the male and female individuals and the hasGender object
        // property.
        OWLIndividual male = factory.getOWLNamedIndividual(IRI
                .create(ontologyIRI + "#male"));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.addAxioms()

        genders.add(factory.getOWLObjectPropertyAssertionAxiom(hasGender, bill,
                male));
        genders.add(factory.getOWLObjectPropertyAssertionAxiom(hasGender,
                susan, female));
        // Add the facts about the genders
        manager.addAxioms(ont, genders);
        // Domain and Range Axioms //At this point, we have an ontology
        // containing facts about several individuals. We now want to specify
        // more information about the various properties that we have used. We
        // want to say that the domains and ranges of hasWife, hasSon and
        // hasDaughter are the class Person. To do this we need various domain
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.addAxioms()

                person));
        OWLDatatype integerDatatype = factory.getIntegerOWLDatatype();
        domainsAndRanges.add(factory.getOWLDataPropertyRangeAxiom(hasAge,
                integerDatatype));
        // Now add all of our domain and range axioms
        manager.addAxioms(ont, domainsAndRanges);
        // Class assertion axioms //We can also explicitly say than an
        // individual is an instance of a given class. To do this we use a Class
        // assertion axiom.
        OWLClassAssertionAxiom classAssertionAx = factory
                .getOWLClassAssertionAxiom(person, john);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.addAxioms()

                .getOWLInverseFunctionalObjectPropertyAxiom(hasWife));
        hasWifeAxioms
                .add(factory.getOWLIrreflexiveObjectPropertyAxiom(hasWife));
        hasWifeAxioms.add(factory.getOWLAsymmetricObjectPropertyAxiom(hasWife));
        // Add all of the axioms that specify the characteristics of hasWife
        manager.addAxioms(ont, hasWifeAxioms);
        // SubClass axioms //Now we want to start specifying something about
        // classes in our ontology. To begin with we will simply say something
        // about the relationship between named classes Besides the Person class
        // that we already have, we want to say something about the classes Man,
        // Woman and Parent. To say something about these classes, as usual, we
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.addAxioms()

        log.debug("Adding SWRL rules to the input ontology.");
        Set<SWRLRule> ruleSet = new HashSet<SWRLRule>();
        ruleSet.addAll(rules);
       
        manager.addAxioms(ontology, ruleSet);
        if(log.isDebugEnabled())
            for(OWLAxiom a:ontology.getAxioms()){
                log.debug("Axiom {}",a);
            }
        log.debug("Calling the run method.");
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.addAxioms()

        try {
            OWLOntologyManager manager = createOWLOntologyManager();
            input = manager.createOntology();
            Set<SWRLRule> ruleSet = new HashSet<SWRLRule>();
            ruleSet.addAll(rules);
            manager.addAxioms(input, ruleSet);
            input = manager.getOntology(input.getOntologyID());
            log.debug("Created ontology: {}", input);
            return getReasoner(ontology).isConsistent();

        } catch (OWLOntologyCreationException e) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.addAxioms()

        OWLOntologyManager manager = input.getOWLOntologyManager();
        try {
            OWLOntology output = manager.createOntology();
            Set<OWLAxiom> axioms = s.runTask(task, input, rules, filtered, parameters);
            log.debug("Prepare output: {} axioms", axioms.size());
            manager.addAxioms(output, axioms);
            if (targetGraphID == null) {
                return new ReasoningServiceResult<OWLOntology>(task, true, manager.getOntology(output
                        .getOntologyID()));
            } else {
                save(output, targetGraphID);
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.