Package org.apache.xindice.core.indexer

Examples of org.apache.xindice.core.indexer.IndexPattern


               }
               if ( nk.keys != null )
                  ks.add(nk.keys);
               else if ( name != null ) {
                  // Try to use a NameIndex to resolve the path component
                  IndexPattern pattern = new IndexPattern(symbols, name, nsMap);
                  Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODENAME, pattern);
                  if ( idx != null ) {
                     IndexMatch[] matches = idx.queryMatches(new IndexQueryANY(pattern));
                     Key[] keys = QueryEngine.getUniqueKeys(matches);
                     ks.add(keys);
View Full Code Here


               if ( nk.attribute && nk.name.indexOf('@') == -1 )
                  ps = owner+"@"+nk.name;
               else
                  ps = nk.name;

               IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);

               XObject obj = (XObject)s;
               Value val1 = new Value(obj.str());

               IndexQuery iq = new IndexQuerySW(pattern, val1);
View Full Code Here

            // TODO: Add logic to use an EmptyKeySet if a name doesn't already
            //       exist in the SymbolTable.  This will eliminate the need
            //       to do a collection scan in those cases where somebody
            //       typed an element or attribute name incorrectly.

            IndexPattern pattern = iq.getPattern();

            Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODEVALUE, pattern);
            if ( idx != null )
               return new NamedKeys(nk.name, nk.attribute, QueryEngine.getUniqueKeys(idx.queryMatches(iq)));
            else if ( autoIndex ) {
View Full Code Here

            ps = owner+"@"+nk.name;
         else
            ps = nk.name;

         IndexQuery iq;
         IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);
         String value = obj.str();

         switch ( op ) {
            case IndexQuery.NEQ: iq = new IndexQueryNEQ(pattern, value); break;
            case IndexQuery.EQ:  iq = new IndexQueryEQ(pattern, value)break;
View Full Code Here

              ks.add(set.toArray(EMPTY_KEYS));
            }
            else
            {
              // Try to use a NameIndex to resolve the path component
              IndexPattern pattern = new IndexPattern(symbols, name, nsMap);
              Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODENAME, pattern);
              if (idx != null)
              {
                IndexMatch[] matches = idx.queryMatches(new IndexQueryANY(pattern));
                Key[] keys = QueryEngine.getUniqueKeys(matches);
View Full Code Here

          else
          {
            ps = nk.name;
          }

          IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);

          XObject obj = (XObject) s;
          Value val1 = new Value(obj.str());

          IndexQuery iq = new IndexQuerySW(pattern, val1);
View Full Code Here

        // TODO: Add logic to use an EmptyKeySet if a name doesn't already
        //       exist in the SymbolTable.  This will eliminate the need
        //       to do a collection scan in those cases where somebody
        //       typed an element or attribute name incorrectly.

        IndexPattern pattern = iq.getPattern();

        Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODEVALUE, pattern);
        if (idx != null)
        {
          return new NamedKeys(nk.name, nk.attribute, QueryEngine.getUniqueKeys(idx.queryMatches(iq)));
View Full Code Here

      {
        ps = nk.name;
      }

      IndexQuery iq;
      IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);
      String value = obj.str();

      switch (op)
      {
        case IndexQuery.NEQ :
View Full Code Here

                                set.add(rs.getNextKey());
                            }
                            ks.add(set.toArray(EMPTY_KEYS));
                        } else {
                            // Try to use a NameIndex to resolve the path component
                            IndexPattern pattern = new IndexPattern(symbols, name, nsMap);
                            Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODENAME, pattern);
                            if (idx != null) {
                                IndexMatch[] matches = idx.queryMatches(new IndexQueryANY(pattern));
                                Key[] keys = QueryEngine.getUniqueKeys(matches);
                                ks.add(keys);
View Full Code Here

                        ps = owner + "@" + nk.name;
                    } else {
                        ps = nk.name;
                    }

                    IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);

                    XObject obj = (XObject) s;
                    Value val1 = new Value(obj.str());

                    IndexQuery iq = new IndexQuerySW(pattern, val1);
View Full Code Here

TOP

Related Classes of org.apache.xindice.core.indexer.IndexPattern

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.