org.semanticweb.owlapi.model.OWLDisjointDataPropertiesAxiom Java Examples
The following examples show how to use
org.semanticweb.owlapi.model.OWLDisjointDataPropertiesAxiom.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractElkObjectConverter.java From elk-reasoner with Apache License 2.0 | 5 votes |
@Override public OWLDisjointDataPropertiesAxiom visit( ElkDisjointDataPropertiesAxiom axiom) { return owlFactory_ .getOWLDisjointDataPropertiesAxiom(toDataPropertyExpressionSet( axiom.getDataPropertyExpressions())); }
Example #2
Source File: AbstractOwlAxiomConverterVisitor.java From elk-reasoner with Apache License 2.0 | 5 votes |
@Override public T visit(OWLDisjointDataPropertiesAxiom axiom) { throw new IllegalArgumentException( OWLDisjointDataPropertiesAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
Example #3
Source File: NormalizedOWLQLTbox.java From quetzal with Eclipse Public License 2.0 | 5 votes |
/** * negative concept inclusion in the negative closure */ public Set<OWLSubClassOfAxiom> getNegativeInclInNegClosure() { if (negIncAxInNegClos ==null) { negIncAxInNegClos = new HashSet<OWLSubClassOfAxiom>(); negObjectSubPropAxInNegClos = new HashSet<OWLDisjointObjectPropertiesAxiom>(); negDataSubPropAxInNegClos = new HashSet<OWLDisjointDataPropertiesAxiom>(); organizeNegativeClosure(negativeInclClosure, negIncAxInNegClos, negObjectSubPropAxInNegClos, negDataSubPropAxInNegClos); } return negIncAxInNegClos; }
Example #4
Source File: NormalizedOWLQLTbox.java From quetzal with Eclipse Public License 2.0 | 5 votes |
/** * negative object property inclusion axioms in the negative closure */ protected Set<OWLDisjointObjectPropertiesAxiom> getNegativeObjectSubPropInNegClosure() { if (negObjectSubPropAxInNegClos ==null) { negIncAxInNegClos = new HashSet<OWLSubClassOfAxiom>(); negObjectSubPropAxInNegClos = new HashSet<OWLDisjointObjectPropertiesAxiom>(); negDataSubPropAxInNegClos = new HashSet<OWLDisjointDataPropertiesAxiom>(); organizeNegativeClosure(negativeInclClosure, negIncAxInNegClos, negObjectSubPropAxInNegClos, negDataSubPropAxInNegClos); } return negObjectSubPropAxInNegClos; }
Example #5
Source File: NormalizedOWLQLTbox.java From quetzal with Eclipse Public License 2.0 | 5 votes |
/** * negative data property inclusion axioms in the negative closure */ protected Set<OWLDisjointDataPropertiesAxiom> getNegativeDataSubPropAxInClosure() { if (negDataSubPropAxInNegClos == null) { negIncAxInNegClos = new HashSet<OWLSubClassOfAxiom>(); negObjectSubPropAxInNegClos = new HashSet<OWLDisjointObjectPropertiesAxiom>(); negDataSubPropAxInNegClos = new HashSet<OWLDisjointDataPropertiesAxiom>(); organizeNegativeClosure(negativeInclClosure, negIncAxInNegClos, negObjectSubPropAxInNegClos, negDataSubPropAxInNegClos); } return negDataSubPropAxInNegClos ; }
Example #6
Source File: NormalizedOWLQLTbox.java From quetzal with Eclipse Public License 2.0 | 5 votes |
private static void organizeNegativeClosure(Collection<OWLAxiom> normalizedNegClosureAxioms, Collection<OWLSubClassOfAxiom> negIncAxInNegClos, Collection<OWLDisjointObjectPropertiesAxiom> negObjectSubPropAxInNegClos, Collection<OWLDisjointDataPropertiesAxiom> negDataSubPropAxInNegClos) { organizeTboxAxioms(normalizedNegClosureAxioms, negIncAxInNegClos, negObjectSubPropAxInNegClos, negDataSubPropAxInNegClos, new HashSet<OWLSubClassOfAxiom>(), new HashSet<OWLSubPropertyAxiom>(), new HashSet<OWLObjectProperty>(), new HashSet<OWLObjectProperty>(), new HashMap<String, Set<OWLSubClassOfAxiom>>(), new HashMap<String, Set<OWLSubPropertyAxiom>>()); }
Example #7
Source File: OwlDataPropertyAxiomConverterVisitor.java From elk-reasoner with Apache License 2.0 | 4 votes |
@Override public ElkDataPropertyAxiom visit( OWLDisjointDataPropertiesAxiom owlDisjointDataPropertiesAxiom) { return CONVERTER.convert(owlDisjointDataPropertiesAxiom); }
Example #8
Source File: OwlConverter.java From elk-reasoner with Apache License 2.0 | 4 votes |
@SuppressWarnings("static-method") public ElkDisjointDataPropertiesAxiom convert( OWLDisjointDataPropertiesAxiom owlDisjointDataPropertiesAxiom) { return new ElkDisjointDataPropertiesAxiomWrap<OWLDisjointDataPropertiesAxiom>( owlDisjointDataPropertiesAxiom); }
Example #9
Source File: OwlAxiomConverterVisitor.java From elk-reasoner with Apache License 2.0 | 4 votes |
@Override public ElkAxiom visit( OWLDisjointDataPropertiesAxiom owlDisjointDataPropertiesAxiom) { return CONVERTER.convert(owlDisjointDataPropertiesAxiom); }
Example #10
Source File: FailingOwlAxiomVisitor.java From elk-reasoner with Apache License 2.0 | 4 votes |
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { defaultVisit(axiom); }
Example #11
Source File: AxiomAnnotationTools.java From owltools with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public OWLAxiom visit(OWLDisjointDataPropertiesAxiom axiom) { return factory.getOWLDisjointDataPropertiesAxiom(axiom.getProperties(), annotations); }
Example #12
Source File: CardinalityContraintsTools.java From owltools with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { }
Example #13
Source File: NormalizedOWLQLTbox.java From quetzal with Eclipse Public License 2.0 | 4 votes |
/** * negative data property inclusion axioms in the tbox */ public Set<OWLDisjointDataPropertiesAxiom> getNegativeDataSubPropertyAxioms() { return negDataSubPropAxInTbox; }
Example #14
Source File: NormalizedOWLQLTbox.java From quetzal with Eclipse Public License 2.0 | 4 votes |
protected Set<OWLAxiom> computeNegativeInclusionClosure(Set<OWLSubClassOfAxiom> deltaNegIncAx, Set<OWLDisjointObjectPropertiesAxiom> deltaNegObjSubPropAx,Set<OWLDisjointDataPropertiesAxiom> deltaNegDataSubPropAx, Set<OWLSubClassOfAxiom> deltaPosIncAx, Set<OWLSubPropertyAxiom> deltaPosSubPropAx) { return computeNegativeInclusionClosure(deltaNegIncAx, deltaNegObjSubPropAx, deltaNegDataSubPropAx, deltaPosIncAx, deltaPosSubPropAx, null); }
Example #15
Source File: NormalizedOWLQLTbox.java From quetzal with Eclipse Public License 2.0 | 4 votes |
private static void organizeTboxAxioms(Collection<OWLAxiom> normalizedAxioms, Collection<OWLSubClassOfAxiom> negIncAxInTbox, Collection<OWLDisjointObjectPropertiesAxiom> negObjectSubPropAxInTbox,Collection<OWLDisjointDataPropertiesAxiom> negDataSubPropAxInTbox, Collection<OWLSubClassOfAxiom> posIncAxInTbox, Collection<OWLSubPropertyAxiom> posSubPropAxInTbox, Collection<OWLObjectProperty> reflexivePropsInTbox, Collection<OWLObjectProperty> irreflexivePropsInTbox, Map<String, Set<OWLSubClassOfAxiom>> iri2PosIncAxInTbox, Map<String, Set<OWLSubPropertyAxiom>> iri2PosSubPropAxInTbox) { // organize Tbox axioms per type for (OWLAxiom ax: normalizedAxioms ) { if (ax.getAxiomType().equals(AxiomType.SUBCLASS_OF)) { OWLSubClassOfAxiom subax = (OWLSubClassOfAxiom) ax; OWLClassExpression sub = subax.getSubClass(); OWLClassExpression superclass = subax.getSuperClass(); if (!superclass.isAnonymous() || superclass.getClassExpressionType().equals(ClassExpressionType.OBJECT_SOME_VALUES_FROM) || superclass.getClassExpressionType().equals(ClassExpressionType.DATA_SOME_VALUES_FROM)) { posIncAxInTbox.add(subax); String key = getKey(superclass); Set<OWLSubClassOfAxiom> axs = iri2PosIncAxInTbox.get(key); if (axs==null) { axs = new HashSet<OWLSubClassOfAxiom>(); iri2PosIncAxInTbox.put(key, axs); } axs.add(subax); } else { assert superclass.getClassExpressionType().equals(ClassExpressionType.OBJECT_ALL_VALUES_FROM) || superclass.getClassExpressionType().equals(ClassExpressionType.DATA_ALL_VALUES_FROM) || superclass.getClassExpressionType().equals(ClassExpressionType.OBJECT_COMPLEMENT_OF) : ax; negIncAxInTbox.add(subax); } } else if (ax.getAxiomType().equals(AxiomType.SUB_DATA_PROPERTY) || ax.getAxiomType().equals(AxiomType.SUB_OBJECT_PROPERTY)) { OWLSubPropertyAxiom subax = (OWLSubPropertyAxiom) ax; OWLPropertyExpression superprop = subax.getSuperProperty(); posSubPropAxInTbox.add(subax); String key = getKey(superprop); Set<OWLSubPropertyAxiom> axs = iri2PosSubPropAxInTbox.get(key); if (axs==null) { axs = new HashSet<OWLSubPropertyAxiom>(); iri2PosSubPropAxInTbox.put(key, axs); } axs.add(subax); } else if (ax.getAxiomType().equals(AxiomType.DISJOINT_OBJECT_PROPERTIES)) { OWLDisjointObjectPropertiesAxiom dax = (OWLDisjointObjectPropertiesAxiom) ax; negObjectSubPropAxInTbox.add(dax); } else if (ax.getAxiomType().equals(AxiomType.DISJOINT_DATA_PROPERTIES)) { OWLDisjointDataPropertiesAxiom dax = (OWLDisjointDataPropertiesAxiom) ax; negDataSubPropAxInTbox.add(dax); } else if (ax.getAxiomType().equals(AxiomType.REFLEXIVE_OBJECT_PROPERTY)) { OWLReflexiveObjectPropertyAxiom rax = (OWLReflexiveObjectPropertyAxiom) ax; reflexivePropsInTbox.add(rax.getProperty().getNamedProperty()); } else if (ax.getAxiomType().equals(AxiomType.IRREFLEXIVE_OBJECT_PROPERTY)) { OWLIrreflexiveObjectPropertyAxiom irrax = (OWLIrreflexiveObjectPropertyAxiom) ax; irreflexivePropsInTbox.add(irrax.getProperty().getNamedProperty()); } else if (isAboxAxiom(ax)) { // abox assertions } else { assert false : "Unknown Normalized Axiom Type: " + ax; } } }
Example #16
Source File: NormalizedOWLQLTbox.java From quetzal with Eclipse Public License 2.0 | 4 votes |
public boolean isSubClass(OWLClassExpression sub, OWLClassExpression sup) { // if sup is equivalent to Top return true if (sup.isOWLThing()) { return true; } if (sup.getClassExpressionType().equals(ClassExpressionType.OBJECT_COMPLEMENT_OF) && ( ((OWLObjectComplementOf) sup).getOperand().isOWLNothing() || getUnsatisfiableNamedClasses().contains(((OWLObjectComplementOf) sup).getOperand()) ) ) { return true; } // // if sub is equivalent to Bottom return true if (sub.isOWLNothing() || getUnsatisfiableNamedClasses().contains(sub)) { return true; } if (sub.getClassExpressionType().equals(ClassExpressionType.OBJECT_COMPLEMENT_OF) && ((OWLObjectComplementOf) sub).getOperand().isOWLThing()) { return true; } if ( (sub.getClassExpressionType().equals(ClassExpressionType.OBJECT_SOME_VALUES_FROM) || sub.getClassExpressionType().equals(ClassExpressionType.DATA_SOME_VALUES_FROM)) && (((OWLQuantifiedRestriction) sub).getProperty().isOWLBottomObjectProperty() ||((OWLQuantifiedRestriction) sub).getProperty().isOWLBottomDataProperty() || getUnsatisfiableProperties().contains(((OWLQuantifiedRestriction) sub).getProperty()))) { return true; } // // check that tbox union {subclass(NC, sub), sublcass(NC, not(sup)), NC(Nind)} // is inconsistent. NC: new concept, Nind: new individual List<OWLAxiom> newAxioms = new LinkedList<OWLAxiom>(); NormalizedOWLQLTbox ret = this;//copy(); OWLClass newConcept = ret.getNormalizer().createNewNamedClass(); newAxioms.add(fac.getOWLSubClassOfAxiom(newConcept, sub.getNNF())); newAxioms.add(fac.getOWLSubClassOfAxiom(newConcept, sup.getComplementNNF())); List<OWLAxiom> newNonOWLQLAxioms = new LinkedList<OWLAxiom>(); Set<OWLAxiom> normalizedAxioms = ret.getNormalizer().toQLNormalForm(newAxioms, newNonOWLQLAxioms); if (!newNonOWLQLAxioms.isEmpty()) { throw new RuntimeException("Both concepts must be OWL QL valid concepts"); } List<OWLSubClassOfAxiom> deltaNegIncAx = new LinkedList<OWLSubClassOfAxiom>(); List<OWLDisjointObjectPropertiesAxiom> deltaNegObjSubPropAx = new LinkedList<OWLDisjointObjectPropertiesAxiom>(); List<OWLDisjointDataPropertiesAxiom> deltaNegDataSubPropAx = new LinkedList<OWLDisjointDataPropertiesAxiom>(); List<OWLSubClassOfAxiom> deltaPosIncAx = new LinkedList<OWLSubClassOfAxiom>(); List<OWLSubPropertyAxiom> deltaPosSubPropAx = new LinkedList<OWLSubPropertyAxiom>(); organizeTboxAxioms(normalizedAxioms, deltaNegIncAx, deltaNegObjSubPropAx, deltaNegDataSubPropAx,deltaPosIncAx, deltaPosSubPropAx, new HashSet<OWLObjectProperty>(), new HashSet<OWLObjectProperty>(), new HashMap<String, Set<OWLSubClassOfAxiom>>(), new HashMap<String, Set<OWLSubPropertyAxiom>>()); // inconsistent iff subclass(NC, not(NC)) is in the negative closure OWLAxiom inconsistencyWitness = fac.getOWLSubClassOfAxiom(newConcept, newConcept.getComplementNNF()); Set<OWLAxiom> newNegClos = ret.computeNegativeInclusionClosure(deltaNegIncAx, deltaNegObjSubPropAx, deltaNegDataSubPropAx, deltaPosIncAx, deltaPosSubPropAx, inconsistencyWitness); //assert newNegClos == null || !newNegClos.contains(inconsistencyWitness) : newNegClos; // return newNegClos == null; }