Example #1
0
 /**
  * Limit the root documents accessible to the query to the given list, overriding the any set
  * derived from the query's context. The query will still be able to access other documents
  * through bound variables or by naming them directly, though.
  *
  * @param rootDocs the list of root documents to limit the query to
  * @return this service, to chain calls
  */
 public QueryService limitRootDocuments(Collection<XMLDocument> rootDocs) {
   overrideDocs = new DefaultDocumentSet();
   for (XMLDocument doc : rootDocs) ((MutableDocumentSet) overrideDocs).add(doc.doc);
   return this;
 }