| java.lang.Object org.mmbase.bridge.util.xml.query.QueryReader
QueryReader | abstract public class QueryReader (Code) | | This class contains static methods related to creating a Query object using a (fragment of an) XML.
author: Pierre van Rooden version: $Id: QueryReader.java,v 1.16 2008/01/29 10:06:22 pierre Exp $ since: MMBase-1.8 |
Method Summary | |
protected static void | addConstraint(Element constraintElement, QueryDefinition queryDefinition, CompositeConstraint parentConstraint) | protected static void | addDistinct(Element distinctElement, QueryDefinition queryDefinition) | protected static void | addField(Element fieldElement, QueryDefinition queryDefinition, QueryConfigurer configurer) | protected static void | addSortOrder(Element sortOrderElement, QueryDefinition queryDefinition) | protected static Constraint | getAgeConstraint(Element constraintElement, QueryDefinition queryDefinition) | protected static Integer | getAlias(Cloud cloud, String name) | protected static Constraint | getAliasConstraint(Element constraintElement, QueryDefinition queryDefinition) | protected static SortedSet<Integer> | getAliases(Cloud cloud, List<String> names) | public static String | getAttribute(Element element, String localName) | protected static Constraint | getCompositeConstraint(Element constraintElement, QueryDefinition queryDefinition) | protected static Constraint | getConstraint(Element constraintElement, QueryDefinition queryDefinition) | protected static int | getDayMark(Cloud cloud, int age) | protected static String | getFullFieldName(QueryDefinition queryDefinition, String fieldName) | protected static SortedSet<Integer> | getOTypes(Cloud cloud, List<String> names, boolean descendants) | protected static Constraint | getTypeConstraint(Element constraintElement, QueryDefinition queryDefinition) | public static boolean | hasAttribute(Element element, String localName) | public static QueryDefinition | parseQuery(Element queryElement, Cloud cloud, String relateFrom) | public static QueryDefinition | parseQuery(Element queryElement, QueryConfigurer configurer, Cloud cloud, String relateFrom) Creates a Query object from an Element. | public static void | registerSystemIDs() Register the namespace and XSD used by QueryReader
This method is called by XMLEntityResolver. |
NAMESPACE_SEARCHQUERY | final public static String NAMESPACE_SEARCHQUERY(Code) | | most recent version
|
NAMESPACE_SEARCHQUERY_1_0 | final public static String NAMESPACE_SEARCHQUERY_1_0(Code) | | |
XSD_SEARCHQUERY_1_0 | final public static String XSD_SEARCHQUERY_1_0(Code) | | |
getAttribute | public static String getAttribute(Element element, String localName)(Code) | | Returns the value of a certain attribute, either an unqualified attribute or an attribute that fits in the
searchquery namespace
|
getDayMark | protected static int getDayMark(Cloud cloud, int age)(Code) | | |
hasAttribute | public static boolean hasAttribute(Element element, String localName)(Code) | | Returns whether an element has a certain attribute, either an unqualified attribute or an attribute that fits in the
searchquery namespace
|
parseQuery | public static QueryDefinition parseQuery(Element queryElement, QueryConfigurer configurer, Cloud cloud, String relateFrom) throws SearchQueryException(Code) | | Creates a Query object from an Element. The query is wrapped in a
QueryDefinition and
you can simply access the
QueryDefinition.query member to have the actual Query.
Parameters: queryElement - Any XML element which query sub-tags and attributes. Parameters: configurer - The configure which is responsible for instantiating the QueryDefinition Parameters: cloud - Cloud, needed to make Query objects. Parameters: relateFrom - (optional) name of a node manager which can be used to base the query on, as the first element of the path (can be null ) |
registerSystemIDs | public static void registerSystemIDs()(Code) | | Register the namespace and XSD used by QueryReader
This method is called by XMLEntityResolver.
|
|
|