public static ATermAppl some(ATermAppl r, ATermAppl c) { return ATermUtils.makeSomeValues( r, c ); }
public static ATermAppl some(ATermAppl r, ATermAppl c) { return ATermUtils.makeSomeValues( r, c ); }
public Set<Set<OWLClassExpression>> getDomains(OWLObjectProperty p) { ATermAppl some = ATermUtils.makeSomeValues( loader.term( p ), ATermUtils.TOP ); return toOWLEntitySetOfSet( kb.getSuperClasses( some ), DESC_MAPPER ); }
public Set<Set<OWLClassExpression>> getDomains(OWLDataProperty p) { ATermAppl some = ATermUtils.makeSomeValues( loader.term( p ), ATermUtils.TOP_LIT ); return toOWLEntitySetOfSet( kb.getSuperClasses( some ), DESC_MAPPER ); }
public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { refreshCheck(); try { ATermAppl some = ATermUtils.makeSomeValues(term(pe), ATermUtils.TOP_LIT); Set<ATermAppl> equivalents = kb.getEquivalentClasses(some); if (direct && !equivalents.isEmpty()) { return toClassNodeSet(Collections.singleton(equivalents)); } Set<Set<ATermAppl>> result = kb.getSuperClasses( some, direct ); if (!equivalents.isEmpty()) { result.add(equivalents); } return toClassNodeSet(result); } catch( PelletRuntimeException e ) { throw convert( e ); } }
public NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { refreshCheck(); try { ATermAppl some = ATermUtils.makeSomeValues(term(pe), ATermUtils.TOP); Set<ATermAppl> equivalents = kb.getEquivalentClasses(some); if (direct && !equivalents.isEmpty()) { return toClassNodeSet(Collections.singleton(equivalents)); } Set<Set<ATermAppl>> result = kb.getSuperClasses( some, direct ); if (!equivalents.isEmpty()) { result.add(equivalents); } return toClassNodeSet(result); } catch( PelletRuntimeException e ) { throw convert( e ); } }
@Override public void visit(OWLObjectSomeValuesFrom restriction) { restriction.getProperty().accept( this ); ATerm p = term; restriction.getFiller().accept( this ); ATerm c = term; term = ATermUtils.makeSomeValues( p, c ); }
@Override public void visit(OWLDataSomeValuesFrom restriction) { restriction.getProperty().accept( this ); ATerm p = term; restriction.getFiller().accept( this ); ATerm c = term; term = ATermUtils.makeSomeValues( p, c ); }
public NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { refreshCheck(); try { ATermAppl some = ATermUtils.makeSomeValues(term(pe), ATermUtils.TOP); Set<ATermAppl> equivalents = kb.getEquivalentClasses(some); if (direct && !equivalents.isEmpty()) { return toClassNodeSet(Collections.singleton(equivalents)); } Set<Set<ATermAppl>> result = kb.getSuperClasses( some, direct ); if (!equivalents.isEmpty()) { result.add(equivalents); } return toClassNodeSet(result); } catch( PelletRuntimeException e ) { throw convert( e ); } }
public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { refreshCheck(); try { ATermAppl some = ATermUtils.makeSomeValues(term(pe), ATermUtils.TOP_LIT); Set<ATermAppl> equivalents = kb.getEquivalentClasses(some); if (direct && !equivalents.isEmpty()) { return toClassNodeSet(Collections.singleton(equivalents)); } Set<Set<ATermAppl>> result = kb.getSuperClasses( some, direct ); if (!equivalents.isEmpty()) { result.add(equivalents); } return toClassNodeSet(result); } catch( PelletRuntimeException e ) { throw convert( e ); } }
public void visit(OWLDataSomeValuesFrom restriction) { restriction.getProperty().accept( this ); ATerm p = term; restriction.getFiller().accept( this ); ATerm c = term; term = ATermUtils.makeSomeValues( p, c ); }
public void visit(OWLObjectSomeValuesFrom restriction) { restriction.getProperty().accept( this ); ATerm p = term; restriction.getFiller().accept( this ); ATerm c = term; term = ATermUtils.makeSomeValues( p, c ); }
public NodeSet<OWLClass> getObjectPropertyRanges(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { refreshCheck(); try { ATermAppl some = ATermUtils.makeSomeValues(ATermUtils.makeInv(term(pe)), ATermUtils.TOP); Set<ATermAppl> equivalents = kb.getEquivalentClasses(some); if (direct && !equivalents.isEmpty()) { return toClassNodeSet(Collections.singleton(equivalents)); } Set<Set<ATermAppl>> result = kb.getSuperClasses( some, direct ); if (!equivalents.isEmpty()) { result.add(equivalents); } return toClassNodeSet(result); } catch( PelletRuntimeException e ) { throw convert( e ); } }
public NodeSet<OWLClass> getObjectPropertyRanges(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { refreshCheck(); try { ATermAppl some = ATermUtils.makeSomeValues(ATermUtils.makeInv(term(pe)), ATermUtils.TOP); Set<ATermAppl> equivalents = kb.getEquivalentClasses(some); if (direct && !equivalents.isEmpty()) { return toClassNodeSet(Collections.singleton(equivalents)); } Set<Set<ATermAppl>> result = kb.getSuperClasses( some, direct ); if (!equivalents.isEmpty()) { result.add(equivalents); } return toClassNodeSet(result); } catch( PelletRuntimeException e ) { throw convert( e ); } }
protected void addRoleRangeRule(ATermAppl p, ATermAppl range) { List<TermTuple> body = CollectionUtils.makeList(); List<TermTuple> head = CollectionUtils.makeList(); FreeVariableStore freeVar = new FreeVariableStore(); ATermAppl var0 = freeVar.next(); ATermAppl var1 = freeVar.next(); body.add(makeSubOfSomeTuple(var0, p, var1)); ATermAppl someOfRange = ATermUtils.makeSomeValues(p, range); translateSuper(head, someOfRange, freeVar, var0); m_Rules.add(new Rule(body, head)); }
/** * {@inheritDoc} */ protected void addRoleRangeRule(ATermAppl p, ATermAppl range) { List<ClauseEntry> body = CollectionUtils.makeList(); List<ClauseEntry> head = CollectionUtils.makeList(); FreeVariableStore freeVar = new FreeVariableStore(); Node var0 = freeVar.next(); Node var1 = freeVar.next(); body.add(makeSubOfSomeTriple(var0, p, var1)); ATermAppl someOfRange = ATermUtils.makeSomeValues(p, range); translateSuper(head, someOfRange, freeVar, var0); m_Rules.add(new Rule(head, body)); }
/** * {@inheritDoc} */ protected void addRoleRangeRule(ATermAppl p, ATermAppl range) { List<ClauseEntry> body = CollectionUtils.makeList(); List<ClauseEntry> head = CollectionUtils.makeList(); FreeVariableStore freeVar = new FreeVariableStore(); Node var0 = freeVar.next(); Node var1 = freeVar.next(); body.add(makeSubOfSomeTriple(var0, p, var1)); ATermAppl someOfRange = ATermUtils.makeSomeValues(p, range); translateSuper(head, someOfRange, freeVar, var0); m_Rules.add(new Rule(head, body)); }
public boolean hasDomain(ATermAppl p, ATermAppl c) { Role r = rbox.getRole( p ); if( r == null ) { handleUndefinedEntity( p + " is not a property!" ); return false; } if( !isClass( c ) ) { handleUndefinedEntity( c + " is not a valid class expression" ); return false; } ATermAppl someP = ATermUtils.makeSomeValues( p, ATermUtils.getTop( r ) ); return isSubClassOf( someP, c ); }
public boolean hasDomain(ATermAppl p, ATermAppl c) { Role r = rbox.getRole( p ); if( r == null ) { handleUndefinedEntity( p + " is not a property!" ); return false; } if( !isClass( c ) ) { handleUndefinedEntity( c + " is not a valid class expression" ); return false; } ATermAppl someP = ATermUtils.makeSomeValues( p, ATermUtils.getTop( r ) ); return isSubClassOf( someP, c ); }
public boolean isTransitiveProperty(ATermAppl r) { Role role = getRole( r ); if( role == null ) { handleUndefinedEntity( r + " is not a known property" ); return false; } if( role.isTransitive() ) { if( doExplanation() ) abox.setExplanation( role.getExplainTransitive() ); return true; } else if( !role.isObjectRole() || role.isFunctional() || role.isInverseFunctional() ) return false; ensureConsistency(); ATermAppl c = ATermUtils.makeTermAppl( "_C_" ); ATermAppl notC = ATermUtils.makeNot( c ); ATermAppl test = ATermUtils.makeAnd( ATermUtils.makeSomeValues( r, ATermUtils .makeSomeValues( r, c ) ), ATermUtils.makeAllValues( r, notC ) ); return !abox.isSatisfiable( test ); }