Package org.exoplatform.services.jcr.impl.core.query

Examples of org.exoplatform.services.jcr.impl.core.query.TextsearchQueryNode


                    } 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;
                       ts.addPathElement(new QPathEntry(name, 0));
                       if (isAttributeNameTest(node))
                       {
                          ts.setReferencesProperty(true);
                       }
                    }
                } catch (RepositoryException e) {
                    exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue()));
                }
View Full Code Here


                // check number of arguments
                if (node.jjtGetNumChildren() == 3) {
                    if (queryNode instanceof NAryQueryNode) {
                        SimpleNode literal = (SimpleNode) node.jjtGetChild(2).jjtGetChild(0);
                        if (literal.getId() == JJTSTRINGLITERAL) {
                            TextsearchQueryNode contains = factory.createTextsearchQueryNode(
                                    queryNode, unescapeQuotes(literal.getValue()));
                            // assign property name
                            SimpleNode path = (SimpleNode) node.jjtGetChild(1);
                            path.jjtAccept(this, contains);
                            ((NAryQueryNode) queryNode).addOperand(contains);
View Full Code Here

      QPath relPath = null;
      if (node.getPropertyName() != null)
      {
         relPath = new QPath(new QPathEntry[]{new QPathEntry(node.getPropertyName(), 0)});
      }
      TextsearchQueryNode tsNode = factory.createTextsearchQueryNode(parent, node.getQuery());
      tsNode.setRelativePath(relPath);
      tsNode.setReferencesProperty(true);
      parent.addOperand(tsNode);
      return parent;
   }
View Full Code Here

      if (node.getPropertyName() != null)
      {
         relPath = new QPath(new QPathEntry[]
         {new QPathEntry(node.getPropertyName(), 0)});
      }
      TextsearchQueryNode tsNode = factory.createTextsearchQueryNode(parent, node.getQuery());
      tsNode.setRelativePath(relPath);
      tsNode.setReferencesProperty(true);
      parent.addOperand(tsNode);
      return parent;
   }
View Full Code Here

               {
                  root.getOrderNode().addOrderSpec(name, true);
               }
               else if (queryNode.getType() == QueryNode.TYPE_TEXTSEARCH)
               {
                  TextsearchQueryNode ts = (TextsearchQueryNode) queryNode;
                  ts.addPathElement(new QPathEntry(name, 0));
                  if (isAttributeNameTest(node))
                  {
                     ts.setReferencesProperty(true);
                  }
               }
            }
            catch (RepositoryException e)
            {
View Full Code Here

               if (queryNode instanceof NAryQueryNode)
               {
                  SimpleNode literal = (SimpleNode) node.jjtGetChild(2).jjtGetChild(0);
                  if (literal.getId() == JJTSTRINGLITERAL)
                  {
                     TextsearchQueryNode contains =
                              factory.createTextsearchQueryNode(queryNode, unescapeQuotes(literal.getValue()));
                     // assign property name
                     SimpleNode path = (SimpleNode) node.jjtGetChild(1);
                     path.jjtAccept(this, contains);
                     ((NAryQueryNode) queryNode).addOperand(contains);
View Full Code Here

                    } 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;
                       ts.addPathElement(new QPathEntry(name, 0));
                       if (isAttributeNameTest(node))
                       {
                          ts.setReferencesProperty(true);
                       }
                    }
                } catch (RepositoryException e) {
                    exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue()));
                }
View Full Code Here

                // check number of arguments
                if (node.jjtGetNumChildren() == 3) {
                    if (queryNode instanceof NAryQueryNode) {
                        SimpleNode literal = (SimpleNode) node.jjtGetChild(2).jjtGetChild(0);
                        if (literal.getId() == JJTSTRINGLITERAL) {
                            TextsearchQueryNode contains = factory.createTextsearchQueryNode(
                                    queryNode, unescapeQuotes(literal.getValue()));
                            // assign property name
                            SimpleNode path = (SimpleNode) node.jjtGetChild(1);
                            path.jjtAccept(this, contains);
                            ((NAryQueryNode) queryNode).addOperand(contains);
View Full Code Here

      QPath relPath = null;
      if (node.getPropertyName() != null)
      {
         relPath = new QPath(new QPathEntry[]{new QPathEntry(node.getPropertyName(), 0)});
      }
      TextsearchQueryNode tsNode = factory.createTextsearchQueryNode(parent, node.getQuery());
      tsNode.setRelativePath(relPath);
      tsNode.setReferencesProperty(true);
      parent.addOperand(tsNode);
      return parent;
   }
View Full Code Here

                    } 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;
                       ts.addPathElement(new QPathEntry(name, 0));
                       if (isAttributeNameTest(node))
                       {
                          ts.setReferencesProperty(true);
                       }
                    }
                } catch (RepositoryException e) {
                    exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue()));
                }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.core.query.TextsearchQueryNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.