return this;
}
+ /**
+ * Convenience method, to search below this absolute path, with depth
+ * {@link Depth#INFINITTY}.
+ */
+ public BasicSearch from(String path) {
+ return from(URI.create(path), Depth.INFINITTY);
+ }
+
+ /** Search below this URI, with depth {@link Depth#INFINITTY}. */
public BasicSearch from(URI uri) {
return from(uri, Depth.INFINITTY);
}
+ /** Search below this URI, with this {@link Depth}. */
public BasicSearch from(URI uri, Depth depth) {
Objects.requireNonNull(uri);
Objects.requireNonNull(depth);
}
public BasicSearch where(Consumer<AndFilter> and) {
- if (where != null)
- throw new IllegalStateException("A where clause is already set");
- AndFilter subFilter = new AndFilter();
- and.accept(subFilter);
- where = subFilter;
+// if (where != null)
+// throw new IllegalStateException("A where clause is already set");
+// AndFilter subFilter = new AndFilter();
+ and.accept((AndFilter) getWhere());
+// where = subFilter;
return this;
}
}
public ContentFilter<? extends Composition> getWhere() {
+ if (where == null)
+ where = new AndFilter();
return where;
}