@Override public Bool hasObviousPropertyValue(final ATermAppl s, final ATermAppl p, final ATermAppl o) { final Role prop = getRole(p); if (prop.isDatatypeRole()) try { final Object value = o == null ? null : _dtReasoner.getValue(o); return hasObviousDataPropertyValue(s, p, value); } catch (final UnrecognizedDatatypeException e) { _logger.warning(format("Returning false for property value check (%s,%s,%s) due to datatype problem with input literal: %s", s, p, o, e.getMessage())); return Bool.FALSE; } catch (final InvalidLiteralException e) { _logger.warning(format("Returning false for property value check (%s,%s,%s) due to problem with input literal: %s", s, p, o, e.getMessage())); return Bool.FALSE; } else return hasObviousObjectPropertyValue(s, p, o); }
@Override public Bool hasObviousPropertyValue(final ATermAppl s, final ATermAppl p, final ATermAppl o) { final Role prop = getRole(p); if (prop.isDatatypeRole()) try { final Object value = o == null ? null : _dtReasoner.getValue(o); return hasObviousDataPropertyValue(s, p, value); } catch (final UnrecognizedDatatypeException e) { _logger.warning(format("Returning false for property value check (%s,%s,%s) due to datatype problem with input literal: %s", s, p, o, e.getMessage())); return Bool.FALSE; } catch (final InvalidLiteralException e) { _logger.warning(format("Returning false for property value check (%s,%s,%s) due to problem with input literal: %s", s, p, o, e.getMessage())); return Bool.FALSE; } else return hasObviousObjectPropertyValue(s, p, o); }
try value = abox.getDatatypeReasoner().getValue(term);
try value = abox.getDatatypeReasoner().getValue(term);
try final Object value = dtReasoner.getValue(l); return dtReasoner.isSatisfiable(Collections.singleton(d), value);
try final Object value = dtReasoner.getValue(l); return dtReasoner.isSatisfiable(Collections.singleton(d), value);
try final Object value = dtReasoner.getValue(l); return dtReasoner.isSatisfiable(Collections.singleton(d), value);
@Ignore("Equal but not identical semantics is very counter-intuitive and currently Pellet treats equals values as identical") @Test public void equalbutNotIdenticalDateTimeOneOf() throws InvalidConstrainingFacetException, InvalidLiteralException, UnrecognizedDatatypeException { final ATermAppl d = oneOf(literal("1956-06-25T04:00:00-05:00", DATE_TIME)); assertTrue(reasoner.isSatisfiable(Collections.singleton(d))); assertTrue(reasoner.isSatisfiable(Collections.singleton(d), reasoner.getValue(literal("1956-06-25T04:00:00-05:00", DATE_TIME)))); assertFalse(reasoner.isSatisfiable(Collections.singleton(d), reasoner.getValue(literal("1956-06-25T10:00:00+01:00", DATE_TIME)))); } }
@Ignore("See ticket #524") @Test public void incomparableDateTime() throws InvalidConstrainingFacetException, InvalidLiteralException, UnrecognizedDatatypeException { final ATermAppl d = restrict(DATE_TIME, minInclusive(literal("1956-01-01T04:00:00-05:00", DATE_TIME))); assertTrue(reasoner.isSatisfiable(Collections.singleton(d))); assertTrue(reasoner.isSatisfiable(Collections.singleton(d), reasoner.getValue(literal("1956-01-01T10:00:00", DATE_TIME)))); assertFalse(reasoner.isSatisfiable(Collections.singleton(d), reasoner.getValue(literal("1956-01-01T10:00:00Z", DATE_TIME)))); }
@Ignore("Equal but not identical semantics is very counter-intuitive and currently Pellet treats equals values as identical") @Test public void equalbutNotIdenticalDateTime() throws InvalidConstrainingFacetException, InvalidLiteralException, UnrecognizedDatatypeException { final ATermAppl d = restrict(DATE_TIME, minInclusive(literal("1956-06-25T04:00:00-05:00", DATE_TIME)), maxInclusive(literal("1956-06-25T04:00:00-05:00", DATE_TIME))); assertTrue(reasoner.isSatisfiable(Collections.singleton(d))); assertTrue(reasoner.isSatisfiable(Collections.singleton(d), reasoner.getValue(literal("1956-06-25T04:00:00-05:00", DATE_TIME)))); assertFalse(reasoner.isSatisfiable(Collections.singleton(d), reasoner.getValue(literal("1956-06-25T10:00:00+01:00", DATE_TIME)))); }
@Test public void intersectIntegerNegatedIntegerValue() throws InvalidConstrainingFacetException, InvalidLiteralException, UnrecognizedDatatypeException { final Collection<ATermAppl> types = Arrays.asList(INTEGER, not(value(literal(3)))); assertTrue(reasoner.isSatisfiable(types)); assertTrue(reasoner.containsAtLeast(2, types)); assertTrue(reasoner.isSatisfiable(types, reasoner.getValue(literal(1)))); assertFalse(reasoner.isSatisfiable(types, reasoner.getValue(literal(3)))); }
try value = _kb.getDatatypeReasoner().getValue(node2term(filler));
try value = _kb.getDatatypeReasoner().getValue(node2term(filler));
try value = _kb.getDatatypeReasoner().getValue(node2term(filler));