} else { iter = new PeekingCloseableIteration<RyaStatement, RyaDAOException>( ryaQueryEngine.query(new RyaStatement(new RyaIRIRange(earliest_subject, RyaIRIRange.LAST_IRI), predicate, object), conf));
/** * Converts a {@link IRI} into a {@link RyaIRI} representation of the * {@code iri}. * @param iri the {@link IRI} to convert. * @return the {@link RyaIRI} representation of the {@code iri}. */ public static RyaIRI convertIRI(final IRI iri) { if (iri == null) { return null; } if (iri instanceof RangeIRI) { final RangeIRI riri = (RangeIRI) iri; return new RyaIRIRange(convertIRI(riri.getStart()), convertIRI(riri.getEnd())); } return new RyaIRI(iri.stringValue()); }
/** * Converts a {@link Value} into a {@link RyaType} representation of the * {@code value}. * @param value the {@link Value} to convert. * @return the {@link RyaType} representation of the {@code value}. */ public static RyaType convertValue(final Value value) { if (value == null) { return null; } //assuming either IRI or Literal here if (value instanceof Resource) { return convertResource((Resource) value); } if (value instanceof Literal) { return convertLiteral((Literal) value); } if (value instanceof RangeValue) { final RangeValue<?> rv = (RangeValue<?>) value; if (rv.getStart() instanceof IRI) { return new RyaIRIRange(convertIRI((IRI) rv.getStart()), convertIRI((IRI) rv.getEnd())); } else { //literal return new RyaTypeRange(convertLiteral((Literal) rv.getStart()), convertLiteral((Literal) rv.getEnd())); } } return null; }