public CloseableIteration<? extends Resource, SailException> getContextIDs()
     throws SailException {
   if (config.logReadOperations) {
     queryHandler.handle(new GetContextIDsCall(id));
     return new RecorderIteration<Resource, SailException>(
         (CloseableIteration<Resource, SailException>) baseSailConnection.getContextIDs(),
         nextIterationId(),
         queryHandler);
   } else {
     return baseSailConnection.getContextIDs();
   }
 }
Beispiel #2
0
  protected boolean containsGraph(String graph) {
    connect();

    try {
      for (CloseableIteration<? extends Resource, SailException> res = connection.getContextIDs();
          res.hasNext(); ) {
        Resource r = res.next();
        if (r.stringValue().equals(graph.toString())) return true;
      }
    } catch (SailException e) {
      e.printStackTrace();
    }

    disconnect();

    return false;
  }
 public CloseableIteration<? extends Resource, SailException> getContextIDs()
     throws SailException {
   return baseSailConnection.getContextIDs();
 }