Example #1
0
 /**
  * Default constructor.
  *
  * @param query query string
  * @param uri base uri (can be {@code null})
  * @param ctx database context
  */
 public QueryProcessor(final String query, final String uri, final Context ctx) {
   this.query = query;
   qc = pushJob(new QueryContext(ctx));
   sc = new StaticContext(qc);
   sc.baseURI(uri);
 }
Example #2
0
 /**
  * Declares a namespace. A namespace is undeclared if the {@code uri} is an empty string. The
  * default element namespaces is set if the {@code prefix} is empty.
  *
  * @param prefix namespace prefix
  * @param uri namespace uri
  * @return self reference
  * @throws QueryException query exception
  */
 public QueryProcessor namespace(final String prefix, final String uri) throws QueryException {
   sc.namespace(prefix, uri);
   return this;
 }
Example #3
0
 /**
  * Assigns a URI resolver.
  *
  * @param resolver resolver
  * @return self reference
  */
 public QueryProcessor uriResolver(final UriResolver resolver) {
   sc.resolver = resolver;
   return this;
 }