org.apache.jackrabbit.spi.commons.query
Class DefaultQueryNodeFactory

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.query.DefaultQueryNodeFactory
All Implemented Interfaces:
QueryNodeFactory

public class DefaultQueryNodeFactory
extends Object
implements QueryNodeFactory

Default implementation of a QueryNodeFactory.


Constructor Summary
DefaultQueryNodeFactory(Collection<Name> validJcrSystemNodeTypeNames)
          Creates a DefaultQueryNodeFactory with the given node types under /jcr:system .
 
Method Summary
 AndQueryNode createAndQueryNode(QueryNode parent)
          Creates a AndQueryNode instance.
 DerefQueryNode createDerefQueryNode(QueryNode parent, Name nameTest, boolean descendants)
          Creates a DerefQueryNode instance.
 LocationStepQueryNode createLocationStepQueryNode(QueryNode parent)
          Creates a LocationStepQueryNode instance.
 NodeTypeQueryNode createNodeTypeQueryNode(QueryNode parent, Name nodeType)
          Creates a NodeTypeQueryNode instance.
 NotQueryNode createNotQueryNode(QueryNode parent)
          Creates a NotQueryNode instance.
 OrderQueryNode createOrderQueryNode(QueryNode parent)
          Creates a OrderQueryNode instance.
 OrQueryNode createOrQueryNode(QueryNode parent)
          Creates a OrQueryNode instance.
 PathQueryNode createPathQueryNode(QueryNode parent)
          Creates a PathQueryNode instance.
 PropertyFunctionQueryNode createPropertyFunctionQueryNode(QueryNode parent, String functionName)
          Creates a PropertyFunctionQueryNode instance.
 QueryRootNode createQueryRootNode()
          Creates a QueryRootNode instance.
 RelationQueryNode createRelationQueryNode(QueryNode parent, int operation)
          Creates a RelationQueryNode instance.
 TextsearchQueryNode createTextsearchQueryNode(QueryNode parent, String query)
          Creates a TextsearchQueryNode instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultQueryNodeFactory

public DefaultQueryNodeFactory(Collection<Name> validJcrSystemNodeTypeNames)
Creates a DefaultQueryNodeFactory with the given node types under /jcr:system .

Method Detail

createNodeTypeQueryNode

public NodeTypeQueryNode createNodeTypeQueryNode(QueryNode parent,
                                                 Name nodeType)
Creates a NodeTypeQueryNode instance.

Specified by:
createNodeTypeQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
nodeType - the name of the node type.
Returns:
a NodeTypeQueryNode.

createAndQueryNode

public AndQueryNode createAndQueryNode(QueryNode parent)
Creates a AndQueryNode instance.

Specified by:
createAndQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
Returns:
a AndQueryNode.

createLocationStepQueryNode

public LocationStepQueryNode createLocationStepQueryNode(QueryNode parent)
Creates a LocationStepQueryNode instance.

Specified by:
createLocationStepQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
Returns:
a LocationStepQueryNode.

createDerefQueryNode

public DerefQueryNode createDerefQueryNode(QueryNode parent,
                                           Name nameTest,
                                           boolean descendants)
Creates a DerefQueryNode instance.

Specified by:
createDerefQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
nameTest - the name test on the referenced target node.
descendants - if the axis is //
Returns:
a DerefQueryNode.

createNotQueryNode

public NotQueryNode createNotQueryNode(QueryNode parent)
Creates a NotQueryNode instance.

Specified by:
createNotQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
Returns:
a NotQueryNode.

createOrQueryNode

public OrQueryNode createOrQueryNode(QueryNode parent)
Creates a OrQueryNode instance.

Specified by:
createOrQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
Returns:
a OrQueryNode.

createRelationQueryNode

public RelationQueryNode createRelationQueryNode(QueryNode parent,
                                                 int operation)
Creates a RelationQueryNode instance.

Specified by:
createRelationQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
operation - the operation type.
Returns:
a RelationQueryNode.

createPathQueryNode

public PathQueryNode createPathQueryNode(QueryNode parent)
Creates a PathQueryNode instance.

Specified by:
createPathQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
Returns:
a PathQueryNode.

createOrderQueryNode

public OrderQueryNode createOrderQueryNode(QueryNode parent)
Creates a OrderQueryNode instance.

Specified by:
createOrderQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
Returns:
a OrderQueryNode.

createPropertyFunctionQueryNode

public PropertyFunctionQueryNode createPropertyFunctionQueryNode(QueryNode parent,
                                                                 String functionName)
Creates a PropertyFunctionQueryNode instance.

Specified by:
createPropertyFunctionQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
functionName - the name of the function.
Returns:
a PropertyFunctionQueryNode.

createQueryRootNode

public QueryRootNode createQueryRootNode()
Creates a QueryRootNode instance.

Specified by:
createQueryRootNode in interface QueryNodeFactory
Returns:
a QueryRootNode.

createTextsearchQueryNode

public TextsearchQueryNode createTextsearchQueryNode(QueryNode parent,
                                                     String query)
Creates a TextsearchQueryNode instance.

Specified by:
createTextsearchQueryNode in interface QueryNodeFactory
Parameters:
parent - the parent node.
query - the textsearch statement.
Returns:
a TextsearchQueryNode.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.