@Override public CloseableIterator<STMT> findStatements(ID sub, UID pre, NODE obj, UID con, boolean includeInferred) { Resource subject = convert(sub); URI predicate = convert(pre); Value object = convert(obj); URI context = convert(con); return new ModelResultIterator(dialect,findStatements(subject, predicate, object, includeInferred, context), includeInferred); }
@Override public CloseableIterator<STMT> findStatements(ID sub, UID pre, NODE obj, UID con, boolean includeInferred) { Resource subject = convert(sub); URI predicate = convert(pre); Value object = convert(obj); URI context = convert(con); return new ModelResultIterator(dialect, findStatements(subject, predicate, object, includeInferred, context), includeInferred); }
@Override public CloseableIterator<STMT> findStatements(ID sub, UID pre, NODE obj, UID con, boolean includeInferred) { Resource subject = convert(sub); URI predicate = convert(pre); Value object = convert(obj); URI context = convert(con); // default results return new RepositoryResultIterator(dialect, findStatements(subject, predicate, object, includeInferred, context), includeInferred); }
@Override public boolean exists(@Nullable ID sub, @Nullable UID pre, @Nullable NODE obj, @Nullable UID con, boolean includeInferred) { Resource subject = convert(sub); URI predicate = convert(pre); Value object = convert(obj); URI context = convert(con); try { if (context == null){ return connection.hasMatch(subject, predicate, object, includeInferred); }else{ return connection.hasMatch(subject, predicate, object, includeInferred, context); } } catch (StoreException e) { throw new RepositoryException(e); } }
@Override public boolean exists(@Nullable ID sub, @Nullable UID pre, @Nullable NODE obj, @Nullable UID con, boolean includeInferred) { Resource subject = convert(sub); URI predicate = convert(pre); Value object = convert(obj); URI context = convert(con); try { if (context == null) { return connection.hasStatement(subject, predicate, object, includeInferred); } else { return connection .hasStatement(subject, predicate, object, includeInferred, context); } } catch (org.openrdf.repository.RepositoryException e) { throw new RepositoryException(e); } }
@Override public boolean exists(@Nullable ID sub, @Nullable UID pre, @Nullable NODE obj, @Nullable UID con, boolean includeInferred) { Resource subject = convert(sub); URI predicate = convert(pre); Value object = convert(obj); URI context = convert(con); try { if (context == null) { return connection.hasMatch(subject, predicate, object, includeInferred); } else { return connection.hasMatch(subject, predicate, object, includeInferred, context); } } catch (StoreException e) { throw new RepositoryException(e); } }
@Override public void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements) { if (!readonlyTnx){ try { if (removedStatements != null && !removedStatements.isEmpty()) { connection.remove(convert(removedStatements)); } if (addedStatements != null && !addedStatements.isEmpty()) { connection.add(convert(addedStatements)); } } catch (StoreException e) { throw new RepositoryException(e); } } }
@Override public void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements) { if (!readonlyTnx) { try { if (localTxn == null) { connection.begin(); } if (removedStatements != null && !removedStatements.isEmpty()) { connection.remove(convert(removedStatements)); } if (addedStatements != null && !addedStatements.isEmpty()) { connection.add(convert(addedStatements)); } if (localTxn == null) { connection.commit(); } } catch (org.openrdf.repository.RepositoryException e) { try { connection.rollback(); } catch (org.openrdf.repository.RepositoryException e1) { throw new RepositoryException(e); } throw new RepositoryException(e); } } }
@Override public void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements) { if (!readonlyTnx) { try { if (localTxn == null) { connection.begin(); } if (removedStatements != null && !removedStatements.isEmpty()) { connection.remove(convert(removedStatements)); } if (addedStatements != null && !addedStatements.isEmpty()) { connection.add(convert(addedStatements)); } if (localTxn == null) { connection.commit(); } } catch (StoreException e) { try { connection.rollback(); } catch (StoreException e1) { throw new RepositoryException(e1); } throw new RepositoryException(e); } } }