Tabnine Logo
QueryRootNode
Code IndexAdd Tabnine to your IDE (free)

How to use
QueryRootNode
in
org.apache.jackrabbit.spi.commons.query

Best Java code snippets using org.apache.jackrabbit.spi.commons.query.QueryRootNode (Showing top 20 results out of 315)

origin: org.apache.jackrabbit/jackrabbit-core

/**
 * Starts the tree traversal and returns the lucene
 * {@link org.apache.lucene.search.Query}.
 *
 * @return the lucene <code>Query</code>.
 * @throws RepositoryException if an error occurs while building the lucene
 *                             query.
 */
private Query createLuceneQuery() throws RepositoryException {
  return (Query) root.accept(this, null);
}
origin: org.apache.jackrabbit/jackrabbit-spi-commons

public Object visit(QueryRootNode node, Object data) throws RepositoryException {
  StringBuffer buffer = (StringBuffer) data;
  buffer.append("+ Root node");
  buffer.append("\n");
  // select properties
  Name[] select = node.getSelectProperties();
  buffer.append("+ Select properties: ");
  if (select.length == 0) {
    buffer.append("*");
  } else {
    String comma = "";
    for (int i = 0; i < select.length; i++) {
      buffer.append(comma);
      buffer.append(select[i].toString());
      comma = ", ";
    }
  }
  buffer.append("\n");
  // path
  traverse(new QueryNode[]{node.getLocationNode()}, buffer);
  // order by
  OrderQueryNode order = node.getOrderNode();
  if (order != null) {
    traverse(new QueryNode[]{order}, buffer);
  }
  return buffer;
}
origin: org.apache.jackrabbit/jackrabbit-core

/**
 * Returns <code>true</code> if this query node needs items under
 * /jcr:system to be queried.
 *
 * @return <code>true</code> if this query node needs content under
 *         /jcr:system to be queried; <code>false</code> otherwise.
 */
public boolean needsSystemTree() {
  return this.root.needsSystemTree();
}
origin: org.apache.jackrabbit/jackrabbit-spi-commons

/**
 * Creates the primary path query node.
 *
 * @param node xpath node representing the root of the parsed tree.
 * @return the path query node
 */
private PathQueryNode createPathQueryNode(SimpleNode node) {
  root.setLocationNode(factory.createPathQueryNode(root));
  node.childrenAccept(this, root.getLocationNode());
  return root.getLocationNode();
}
origin: org.apache.jackrabbit/jackrabbit-spi-commons

public Object visit(QueryRootNode node, Object data) throws RepositoryException {
  PathQueryNode pathNode = node.getLocationNode();
  if (pathNode != null) {
    pathNode.accept(this, data);
  }
  OrderQueryNode orderNode = node.getOrderNode();
  if (orderNode != null) {
    orderNode.accept(this, data);
  }
  return data;
}
origin: org.onehippo.cms7/hippo-repository-engine

@Override
public QueryResult execute(long offset, long limit) throws RepositoryException {
  if (log.isDebugEnabled()) {
    log.debug("Executing query: \n" + root.dump());
      index.getIndexFormatVersion(), cache);
  OrderQueryNode orderNode = root.getOrderNode();
origin: org.apache.jackrabbit/jackrabbit-spi-commons

  ((RelationQueryNode) queryNode).addPathElement(element);
} else if (queryNode.getType() == QueryNode.TYPE_PATH) {
  root.addSelectProperty(name);
} else if (queryNode.getType() == QueryNode.TYPE_ORDER) {
  root.getOrderNode().addOrderSpec(name, true);
} else if (queryNode.getType() == QueryNode.TYPE_TEXTSEARCH) {
  TextsearchQueryNode ts = (TextsearchQueryNode) queryNode;
origin: org.apache.jackrabbit/jackrabbit-core

for (Name name : root.getSelectProperties()) {
  String pn = sessionContext.getJCRName(name);
  ColumnImpl col = (ColumnImpl) qomFactory.column(
  LocationStepQueryNode[] steps = root.getLocationNode().getPathSteps();
  final Name[] ntName = new Name[1];
  steps[steps.length - 1].acceptOperands(new DefaultQueryNodeVisitor() {
origin: apache/jackrabbit

  break;
case JJTORDERBYCLAUSE:
  root.setOrderNode(factory.createOrderQueryNode(root));
  queryNode = root.getOrderNode();
  node.childrenAccept(this, queryNode);
  break;
origin: org.onehippo.cms7/hippo-repository-engine

if(root.getOrderNode() != null) {
  OrderQueryNode.OrderSpec[] orderSpecs = root.getOrderNode().getOrderSpecs();
  Path[] orderProperties = new Path[orderSpecs.length];
  boolean[] ascSpecs = new boolean[orderSpecs.length];
origin: org.apache.jackrabbit/jackrabbit-core

public Object visit(QueryRootNode node, Object data) throws RepositoryException {
  BooleanQuery root = new BooleanQuery();
  Query wrapped = root;
  if (node.getLocationNode() != null) {
    wrapped = (Query) node.getLocationNode().accept(this, root);
  }
  return wrapped;
}
origin: apache/jackrabbit

public Object visit(ASTIdentifier node, Object data) {
  root.addSelectProperty(node.getName());
  return data;
}
origin: apache/jackrabbit

/**
 * {@inheritDoc}
 */
public QueryRootNode createQueryRootNode() {
  return new QueryRootNode();
}
origin: apache/jackrabbit

  log.debug("Executing query: \n" + root.dump());
    cache);
OrderQueryNode orderNode = root.getOrderNode();
origin: apache/jackrabbit

public Object visit(QueryRootNode node, Object data) throws RepositoryException {
  PathQueryNode pathNode = node.getLocationNode();
  if (pathNode != null) {
    pathNode.accept(this, data);
  }
  OrderQueryNode orderNode = node.getOrderNode();
  if (orderNode != null) {
    orderNode.accept(this, data);
  }
  return data;
}
origin: apache/jackrabbit

/**
 * Creates the primary path query node.
 *
 * @param node xpath node representing the root of the parsed tree.
 * @return the path query node
 */
private PathQueryNode createPathQueryNode(SimpleNode node) {
  root.setLocationNode(factory.createPathQueryNode(root));
  node.childrenAccept(this, root.getLocationNode());
  return root.getLocationNode();
}
origin: apache/jackrabbit

  ((RelationQueryNode) queryNode).addPathElement(element);
} else if (queryNode.getType() == QueryNode.TYPE_PATH) {
  root.addSelectProperty(name);
} else if (queryNode.getType() == QueryNode.TYPE_ORDER) {
  root.getOrderNode().addOrderSpec(name, true);
} else if (queryNode.getType() == QueryNode.TYPE_TEXTSEARCH) {
  TextsearchQueryNode ts = (TextsearchQueryNode) queryNode;
origin: apache/jackrabbit

for (Name name : root.getSelectProperties()) {
  String pn = sessionContext.getJCRName(name);
  ColumnImpl col = (ColumnImpl) qomFactory.column(
  LocationStepQueryNode[] steps = root.getLocationNode().getPathSteps();
  final Name[] ntName = new Name[1];
  steps[steps.length - 1].acceptOperands(new DefaultQueryNodeVisitor() {
origin: org.apache.jackrabbit/jackrabbit-spi-commons

  break;
case JJTORDERBYCLAUSE:
  root.setOrderNode(factory.createOrderQueryNode(root));
  queryNode = root.getOrderNode();
  node.childrenAccept(this, queryNode);
  break;
origin: apache/jackrabbit

public Object visit(QueryRootNode node, Object data) throws RepositoryException {
  BooleanQuery root = new BooleanQuery();
  Query wrapped = root;
  if (node.getLocationNode() != null) {
    wrapped = (Query) node.getLocationNode().accept(this, root);
  }
  return wrapped;
}
org.apache.jackrabbit.spi.commons.queryQueryRootNode

Javadoc

Implements the root node of a query tree.

Most used methods

  • accept
  • getOrderNode
    Returns the order node or null if no order is specified.
  • dump
  • getLocationNode
    Returns the PathQueryNode or null if this query does not have a location node.
  • getSelectProperties
    Returns an array of select properties.
  • needsSystemTree
  • <init>
    Creates a new QueryRootNode instance.
  • addSelectProperty
    Adds a new select property to the query.
  • setLocationNode
    Sets the location node.
  • setOrderNode
    Sets a new order node.

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • JPanel (javax.swing)
  • Option (scala)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now