QueryBuilder allows for modular assembly of context graph queries.
Query assembly is performed by chaining a sequence of graph traversal and filtering operations together in order to select a particular set of the input node set's descendants.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Query | Returns: a newly constructed queryReturns a query that represents the currently assembled transformation. |
| public QueryBuilder | |
| public QueryBuilder | |
| public QueryBuilder | |
| public QueryBuilder | |
| public QueryBuilder | |
| public QueryBuilder | |
| public QueryBuilder | |
| public static QueryBuilder |
| current | back to summary |
|---|---|
| private Query current | |
| QueryBuilder | back to summary |
|---|---|
| private QueryBuilder() | |
| build | back to summary |
|---|---|
| public Query build() Returns a query that represents the currently assembled transformation.
| |
| chain | back to summary |
|---|---|
| public QueryBuilder chain(Query query) Applies the given query on the currently selected node set.
| |
| children | back to summary |
|---|---|
| public QueryBuilder children() Selects the union of the current node sets child nodes.
| |
| descendants | back to summary |
|---|---|
| public QueryBuilder descendants() Selects the merged descendant set of the current node set. More precisely this recursively merges the children of each member of the node-set in to the output node set until the set ceases to grow.
| |
| empty | back to summary |
|---|---|
| public QueryBuilder empty() Selects an empty node set.
| |
| ensureUnique | back to summary |
|---|---|
| public QueryBuilder ensureUnique() Asserts that the current node set is a singleton.
If the current node set is not of size 1 then the query will terminate with
an
| |
| filter | back to summary |
|---|---|
| public QueryBuilder filter(Matcher<? super TreeNode> filter) Filters the current node set using the supplied Nodes in the current node set that are not selected by the supplied matcher are removed.
| |
| parent | back to summary |
|---|---|
| public QueryBuilder parent() Selects the parent of the current node.
| |
| queryBuilder | back to summary |
|---|---|
| public static QueryBuilder queryBuilder() Creates a new query builder instance. A newly constructed query builder represents the identity query. It simply returns the input node set as the output node set.
| |