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

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

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

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(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: 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: 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: 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: apache/jackrabbit

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-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: 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: org.apache.jackrabbit/jackrabbit-spi-commons

public Object visit(QueryRootNode node, Object data) throws RepositoryException {
  StringBuffer sb = (StringBuffer) data;
  node.getLocationNode().accept(this, data);
  Name[] selectProps = node.getSelectProperties();
  if (selectProps.length > 0) {
    sb.append('/');
    boolean union = selectProps.length > 1;
    if (union) {
      sb.append('(');
    }
    String pipe = "";
    for (int i = 0; i < selectProps.length; i++) {
      try {
        sb.append(pipe);
        sb.append('@');
        sb.append(resolver.getJCRName(encode(selectProps[i])));
        pipe = "|";
      } catch (NamespaceException e) {
        exceptions.add(e);
      }
    }
    if (union) {
      sb.append(')');
    }
  }
  if (node.getOrderNode() != null) {
    node.getOrderNode().accept(this, data);
  }
  return data;
}
origin: apache/jackrabbit

public Object visit(QueryRootNode node, Object data) throws RepositoryException {
  StringBuffer sb = (StringBuffer) data;
  node.getLocationNode().accept(this, data);
  Name[] selectProps = node.getSelectProperties();
  if (selectProps.length > 0) {
    sb.append('/');
    boolean union = selectProps.length > 1;
    if (union) {
      sb.append('(');
    }
    String pipe = "";
    for (int i = 0; i < selectProps.length; i++) {
      try {
        sb.append(pipe);
        sb.append('@');
        sb.append(resolver.getJCRName(encode(selectProps[i])));
        pipe = "|";
      } catch (NamespaceException e) {
        exceptions.add(e);
      }
    }
    if (union) {
      sb.append(')');
    }
  }
  if (node.getOrderNode() != null) {
    node.getOrderNode().accept(this, data);
  }
  return data;
}
origin: apache/jackrabbit

LocationStepQueryNode[] steps = node.getLocationNode().getPathSteps();
QueryNode[] predicates = steps[steps.length - 1].getPredicates();
    sb.append(" WHERE ");
  node.getLocationNode().accept(this, sb);
origin: org.apache.jackrabbit/jackrabbit-spi-commons

LocationStepQueryNode[] steps = node.getLocationNode().getPathSteps();
QueryNode[] predicates = steps[steps.length - 1].getPredicates();
    sb.append(" WHERE ");
  node.getLocationNode().accept(this, sb);
origin: org.apache.jackrabbit/jackrabbit-core

LocationStepQueryNode[] steps = root.getLocationNode().getPathSteps();
final Name[] ntName = new Name[1];
steps[steps.length - 1].acceptOperands(new DefaultQueryNodeVisitor() {
origin: apache/jackrabbit

LocationStepQueryNode[] steps = root.getLocationNode().getPathSteps();
final Name[] ntName = new Name[1];
steps[steps.length - 1].acceptOperands(new DefaultQueryNodeVisitor() {
origin: apache/jackrabbit

PathQueryNode pathNode = root.getLocationNode();
pathNode.setAbsolute(true);
if (pathConstraints.size() == 0) {
origin: org.apache.jackrabbit/jackrabbit-spi-commons

PathQueryNode pathNode = root.getLocationNode();
pathNode.setAbsolute(true);
if (pathConstraints.size() == 0) {
org.apache.jackrabbit.spi.commons.queryQueryRootNodegetLocationNode

Javadoc

Returns the PathQueryNode or null if this query does not have a location node.

Popular methods of QueryRootNode

  • accept
  • getOrderNode
    Returns the order node or null if no order is specified.
  • dump
  • 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)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JFrame (javax.swing)
  • JPanel (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top PhpStorm plugins
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