Пример #1
0
 @Override
 public void performDelete(Triple t) {
   try {
     connection.remove(Convert.tripleToStatement(valueFactory, t), contexts);
   } catch (RepositoryException ex) {
     LOG.error("Repository exception in performDelete", ex);
     throw new JenaException(ex);
   }
 }
Пример #2
0
  @Override
  protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) {
    Node s = m.getMatchSubject();
    Node p = m.getMatchPredicate();
    Node o = m.getMatchObject();

    Resource subj = (s == null ? null : Convert.nodeToValueResource(valueFactory, s));
    URI pred = (p == null ? null : Convert.nodeURIToValue(valueFactory, p));
    Value obj = (o == null ? null : Convert.nodeToValue(valueFactory, o));

    try {
      RepositoryResult<Statement> iter1 = connection.getStatements(subj, pred, obj, true, contexts);
      return new RepositoryResultIterator(iter1);
    } catch (RepositoryException ex) {
      LOG.error("Repository exception in graphBaseFind", ex);
      throw new JenaException(ex);
    }
  }
Пример #3
0
 @Override
 public Triple next() {
   try {
     Statement stmt = iter.next();
     return Convert.statementToTriple(stmt);
   } catch (RepositoryException ex) {
     throw new JenaException(ex);
   }
 }