|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for implementing QueryBuilder utility class. Allows the building of XML based queries
All methods use a default search profile if one has been set in ZClient.
Some getNode() methods allow the default search profile to be altered for that query.
(The value of the term supplied to each method cannot be null or an empty String).
| Method Summary | |
org.w3c.dom.Node |
and(org.w3c.dom.Node leftNode,
org.w3c.dom.Node rightNode)
Produces an AND node from 2 nodes, which can be query nodes, or AND, OR or NOT nodes. |
org.w3c.dom.Node |
getNode(int[][] attTypesValues,
java.lang.String term)
Creates a basic query node incorporating the attributes and term supplied. |
org.w3c.dom.Node |
getNode(int[] attributes,
java.lang.String term)
Creates a basic query node incorporating the attributes and term supplied. |
org.w3c.dom.Node |
getNode(int useAttribute,
java.lang.String term)
Creates a basic query node incorporating the attribute and term supplied. |
org.w3c.dom.Node |
getNode(java.lang.String useAttribute,
java.lang.String term)
Creates a basic query node incorporating the attribute and term supplied. |
org.w3c.dom.Node |
not(org.w3c.dom.Node inputNode)
Produces a NOT node from a query node, or an AND or OR node. |
org.w3c.dom.Node |
or(org.w3c.dom.Node leftNode,
org.w3c.dom.Node rightNode)
Produces an OR node from 2 nodes, which can be query nodes, or AND, OR or NOT nodes. |
| Method Detail |
public org.w3c.dom.Node getNode(java.lang.String useAttribute,
java.lang.String term)
throws QueryException
Attribute supplied must be a Use attribute.
Attribute value is checked against lookup table in org.jafer.util.Bib1Attributes.
useAttribute - represents the Use attribute to be used in the query, e.g. "title".term - the term to be used in the query.
getNode(int[] attributes, String term)
org.jafer.zclient.QueryException - if useAttribute parameter is not found in lookup table.
QueryException
public org.w3c.dom.Node getNode(int useAttribute,
java.lang.String term)
throws QueryException
Attribute supplied can only be a Use attribute.
useAttribute parameter is checked against lookup table in
org.jafer.util.Bib1Attributes.java.
useAttribute - represents the Use attribute to be used in the query.term - the term to be used in the query.
getNode(int[] attributes, String term)
org.jafer.zclient.QueryException - if useAttribute parameter
is not within the ranges in the look-up table.
QueryException
public org.w3c.dom.Node getNode(int[] attributes,
java.lang.String term)
throws QueryException
The int[] parameter values are used in order for:
{Use, Relation, Position, Structure, Truncation, Completeness}
e.g. { 4, 3, 3, 2, 100, 1 }
A smaller sized array can be used, in which case the values given will be interpreted in order, following the pattern above.
If a default search profile has been set, it will be altered for this query: any values given in the parameter will replace corresponding default values.
(A parameter value of 0 will result in the corresponding attribute type to be excluded from the query.)
attributes - represents the attribute values to be used in the query.term - the term to be used in the query.
buildConstraintModelNode(int[] attributes, String term)
org.jafer.zclient.QueryException - if attributes array size
is smaller than 1, or larger than 6.
Also if the first attributes element is 0, or term is an empty String or null.
QueryException
public org.w3c.dom.Node getNode(int[][] attTypesValues,
java.lang.String term)
throws QueryException
The int[][] parameter holds the attribute type and corresponding value.
e.g. {{1,1003}, {2,3}, {4,2}} would set:
Use = 1003, Relation = 3 and Structure = 2.
If a default search profile has been set, the parameter values supplied will override the corresponding default values, for this query.
(A value of 0 will cause that attribute type to be ignored for this query, even if a default search profile has been set.)
attTypesValues - represents the attribute types and their corresponding
values to be used in the query.term - the term to be used in the query.
buildConstraintModelNode(int[] attributes, String term)
org.jafer.zclient.QueryException - if attTypesValues array size is smaller than 1, or larger than 6.
Also if the first attributes element is 0, or not supplied.
Also if term is an empty String or null.
QueryException
public org.w3c.dom.Node and(org.w3c.dom.Node leftNode,
org.w3c.dom.Node rightNode)
throws QueryException
leftNode - a query, AND, OR or NOT node.rightNode - a query, AND, OR or NOT node.
QueryException
public org.w3c.dom.Node or(org.w3c.dom.Node leftNode,
org.w3c.dom.Node rightNode)
throws QueryException
leftNode - a query, AND, OR or NOT node.rightNode - a query, AND, OR or NOT node.
QueryException
public org.w3c.dom.Node not(org.w3c.dom.Node inputNode)
throws QueryException
inputNode - a query, AND or OR node.
QueryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||