b3801e7f361759d6748a661df75c01c084299c67Francisc Nicolae Bungiupackage de.unibremen.informatik.FactProver;
b3801e7f361759d6748a661df75c01c084299c67Francisc Nicolae Bungiuimport org.semanticweb.owlapi.apibinding.OWLManager;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLAnnotationAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLAnnotationPropertyDomainAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLAnnotationPropertyRangeAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLAsymmetricObjectPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLClassAssertionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLClassAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLClassExpression;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDataProperty;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDataPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDataPropertyCharacteristicAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDataPropertyDomainAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDataPropertyExpression;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDataPropertyRangeAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDatatypeDefinitionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDeclarationAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDifferentIndividualsAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDisjointClassesAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDisjointDataPropertiesAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLDisjointUnionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLEquivalentDataPropertiesAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLFunctionalDataPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLIndividual;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLIndividualAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLInverseFunctionalObjectPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLIrreflexiveObjectPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLLogicalAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLNamedIndividual;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLNaryAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLNaryClassAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLNaryIndividualAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLNaryPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLNegativeDataPropertyAssertionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLObjectProperty;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLObjectPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLObjectPropertyCharacteristicAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLObjectPropertyExpression;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLOntologyCreationException;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLOntologyManager;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLPropertyAssertionAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLPropertyDomainAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLPropertyRangeAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLReflexiveObjectPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLSameIndividualAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLSubClassOfAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLSubDataPropertyOfAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLSubPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLSubPropertyChainOfAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLSymmetricObjectPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLTransitiveObjectPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.model.OWLUnaryPropertyAxiom;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.reasoner.BufferingMode;
b3801e7f361759d6748a661df75c01c084299c67Francisc Nicolae Bungiuimport org.semanticweb.owlapi.reasoner.Node;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport org.semanticweb.owlapi.reasoner.SimpleConfiguration;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport uk.ac.manchester.cs.factplusplus.FaCTPlusPlusException;
53680982da7898ae889870da416205a85f0bffadJens Elknerimport uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasoner;
b3801e7f361759d6748a661df75c01c084299c67Francisc Nicolae Bungiu private FaCTPlusPlusReasoner reasoner;
53680982da7898ae889870da416205a85f0bffadJens Elkner throws OWLOntologyCreationException, FaCTPlusPlusException
b3801e7f361759d6748a661df75c01c084299c67Francisc Nicolae Bungiu OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
53680982da7898ae889870da416205a85f0bffadJens Elkner manager.loadOntologyFromOntologyDocument(this.iri);
53680982da7898ae889870da416205a85f0bffadJens Elkner this.reasoner = new FaCTPlusPlusReasoner(ontology,
53680982da7898ae889870da416205a85f0bffadJens Elkner new SimpleConfiguration(), BufferingMode.BUFFERING);
53680982da7898ae889870da416205a85f0bffadJens Elkner public void loadGoal(IRI giri) throws OWLOntologyCreationException {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLOntology ontology = manager.loadOntologyFromOntologyDocument(giri);
53680982da7898ae889870da416205a85f0bffadJens Elkner for (Iterator<OWLAxiom> i = axioms.iterator(); i.hasNext();) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new OWLOntologyCreationException("Too many axioms for conjecture");
53680982da7898ae889870da416205a85f0bffadJens Elkner public boolean prove() throws FaCTPlusPlusException {
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLObjectPropertyAssertionAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectPropertyExpression prop = g.getProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner .getObjectPropertyValues(object.asOWLNamedIndividual(), prop);
53680982da7898ae889870da416205a85f0bffadJens Elkner return ind.containsEntity(subject.asOWLNamedIndividual());
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLClassAssertionAxiom g = (OWLClassAssertionAxiom) goal;
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLClassExpression cls = g.getClassExpression();
53680982da7898ae889870da416205a85f0bffadJens Elkner reasoner.getTypes(indi.asOWLNamedIndividual(), true);
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLDataPropertyAssertionAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLDataProperty prop = g.getProperty().asOWLDataProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner .getDataPropertyValues(sub.asOWLNamedIndividual(), prop);
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLEquivalentClassesAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLEquivalentClassesAxiom g = (OWLEquivalentClassesAxiom) goal;
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLClassExpression[] cls = g.getClassExpressions()
53680982da7898ae889870da416205a85f0bffadJens Elkner .toArray(new OWLClassExpression[g.getClassExpressions().size()]);
53680982da7898ae889870da416205a85f0bffadJens Elkner boolean res = true;
53680982da7898ae889870da416205a85f0bffadJens Elkner if (i != j) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLSubClassOfAxiom g = (OWLSubClassOfAxiom) goal;
53680982da7898ae889870da416205a85f0bffadJens Elkner NodeSet<OWLClass> c = reasoner.getSubClasses(top, true);
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLDataPropertyRangeAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("Fact++ cannot determine data ranges!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLDataPropertyDomainAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLDataPropertyDomainAxiom g = (OWLDataPropertyDomainAxiom) goal;
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLDataProperty prop = g.getProperty().asOWLDataProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner boolean res = false;
53680982da7898ae889870da416205a85f0bffadJens Elkner NodeSet<OWLClass> dom = reasoner.getDataPropertyDomains(prop, true);
53680982da7898ae889870da416205a85f0bffadJens Elkner Node<OWLClass> cl = reasoner.getEquivalentClasses(c);
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLSubDataPropertyOfAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLSubDataPropertyOfAxiom g = (OWLSubDataPropertyOfAxiom) goal;
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLDataProperty sub = g.getSubProperty().asOWLDataProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLDataProperty sup = g.getSuperProperty().asOWLDataProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner boolean res = false;
53680982da7898ae889870da416205a85f0bffadJens Elkner Iterator<Node<OWLDataProperty>> it = sups.iterator();
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLAsymmetricObjectPropertyAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("Fact++ cannot determine antisymmetry!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLAnnotationAssertionAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLAnnotationAssertionAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLAnnotationAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLAnnotationPropertyDomainAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLAnnotationPropertyDomainAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLAnnotationPropertyRangeAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLAnnotationPropertyRangeAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLClassAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLDataPropertyAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLDataPropertyCharacteristicAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLDataPropertyCharacteristicAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLDatatypeDefinitionAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLDatatypeDefinitionAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner return true;
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLDifferentIndividualsAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLDifferentIndividualsAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLDisjointClassesAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLDisjointDataPropertiesAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLDisjointDataPropertiesAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLDisjointObjectPropertiesAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLDisjointObjectPropertiesAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLDisjointUnionAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLIndividualAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLLogicalAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLNaryAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLNaryClassAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLNaryIndividualAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLNaryPropertyAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLObjectPropertyAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLObjectPropertyCharacteristicAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLObjectPropertyCharacteristicAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLPropertyAssertionAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLPropertyAssertionAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLPropertyAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLPropertyDomainAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLPropertyRangeAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLSameIndividualAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLSubAnnotationPropertyOfAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLSubAnnotationPropertyOfAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLSubPropertyAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLSubPropertyChainOfAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLSubPropertyChainOfAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process OWLUnaryPropertyAxiom!");
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("FaCT++ cannot process SWRLRule!");
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLEquivalentDataPropertiesAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner Set<OWLDataPropertyExpression> props = g.getProperties();
53680982da7898ae889870da416205a85f0bffadJens Elkner TreeSet<OWLDataProperty> p = new TreeSet<OWLDataProperty>();
53680982da7898ae889870da416205a85f0bffadJens Elkner Iterator<OWLDataPropertyExpression> it = props.iterator();
53680982da7898ae889870da416205a85f0bffadJens Elkner boolean res = true;
53680982da7898ae889870da416205a85f0bffadJens Elkner reasoner.getEquivalentDataProperties(itt.next());
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLEquivalentObjectPropertiesAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner Set<OWLObjectPropertyExpression> props = g.getProperties();
53680982da7898ae889870da416205a85f0bffadJens Elkner Iterator<OWLObjectPropertyExpression> it = props.iterator();
53680982da7898ae889870da416205a85f0bffadJens Elkner boolean res = true;
53680982da7898ae889870da416205a85f0bffadJens Elkner Iterator<OWLObjectPropertyExpression> itt = p.iterator();
53680982da7898ae889870da416205a85f0bffadJens Elkner reasoner.getEquivalentObjectProperties(itt.next());
53680982da7898ae889870da416205a85f0bffadJens Elkner Set<OWLObjectPropertyExpression> scur = cur.getEntities();
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLFunctionalDataPropertyAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLDataProperty prop = g.getProperty().asOWLDataProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner return prop.isFunctional(reasoner.getRootOntology());
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLFunctionalObjectPropertyAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectProperty prop = g.getProperty().asOWLObjectProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner return prop.isFunctional(reasoner.getRootOntology());
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLInverseFunctionalObjectPropertyAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectProperty prop = g.getProperty().asOWLObjectProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner return prop.isInverseFunctional(reasoner.getRootOntology());
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLInverseObjectPropertiesAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectPropertyExpression fst = g.getFirstProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectPropertyExpression snd = g.getSecondProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner boolean res = false;
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLIrreflexiveObjectPropertyAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLNegativeDataPropertyAssertionAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLDataProperty p = g.getProperty().asOWLDataProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner reasoner.getDataPropertyValues(sub.asOWLNamedIndividual(), p);
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLNegativeObjectPropertyAssertionAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectProperty p = g.getProperty().asOWLObjectProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner reasoner.getObjectPropertyValues(obj.asOWLNamedIndividual(), p);
53680982da7898ae889870da416205a85f0bffadJens Elkner return ind.containsEntity(sub.asOWLNamedIndividual());
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLObjectPropertyAssertionAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectProperty p = g.getProperty().asOWLObjectProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner reasoner.getObjectPropertyValues(obj.asOWLNamedIndividual(), p);
53680982da7898ae889870da416205a85f0bffadJens Elkner return ind.containsEntity(sub.asOWLNamedIndividual());
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLObjectPropertyDomainAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectPropertyExpression prop = g.getProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner boolean res = false;
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLObjectPropertyRangeAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectPropertyRangeAxiom g = (OWLObjectPropertyRangeAxiom) goal;
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectPropertyExpression prop = g.getProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLSubObjectPropertyOfAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLSubObjectPropertyOfAxiom g = (OWLSubObjectPropertyOfAxiom) goal;
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectPropertyExpression sub = g.getSubProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectPropertyExpression sup = g.getSuperProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner boolean res = false;
53680982da7898ae889870da416205a85f0bffadJens Elkner Iterator<Node<OWLObjectPropertyExpression>> it = subs.iterator();
53680982da7898ae889870da416205a85f0bffadJens Elkner Node<OWLObjectPropertyExpression> cur = it.next();
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLReflexiveObjectPropertyAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectProperty prop = g.getProperty().asOWLObjectProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner return prop.isReflexive(reasoner.getRootOntology());
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLSymmetricObjectPropertyAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectProperty prop = g.getProperty().asOWLObjectProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner return prop.isSymmetric(reasoner.getRootOntology());
53680982da7898ae889870da416205a85f0bffadJens Elkner if (goal instanceof OWLTransitiveObjectPropertyAxiom) {
53680982da7898ae889870da416205a85f0bffadJens Elkner OWLObjectProperty prop = g.getProperty().asOWLObjectProperty();
53680982da7898ae889870da416205a85f0bffadJens Elkner return prop.isTransitive(reasoner.getRootOntology());
53680982da7898ae889870da416205a85f0bffadJens Elkner throw new FaCTPlusPlusException("No reasoner found, sorry!");