Package org.apache.xindice.core.data

Examples of org.apache.xindice.core.data.Key


                    while (aValueIterator.hasNext()) {
                        // iterate over locators for current value adding each to result
                        Iterator aLocatorIterator = ((TreeSet) ((Map.Entry) aValueIterator.next()).getValue()).iterator();
                        for (; aLocatorIterator.hasNext(); ++aResultIndex) {
                            ValueLocator aLocator = (ValueLocator) aLocatorIterator.next();
                            aResult[aResultIndex] = new IndexMatch(new Key(aLocator.getKey()), aLocator.getPosition(), aLocator.getLength(), aLocator.getElementID(), aLocator.getAttributeID());
                        }
                    }
                } else {
                    // allocate return array to include all locators except those attached to excluded value
                    aResult = new IndexMatch[itsValueLocatorCount - anExcludedLocatorSet.size()];

                    // iterate over the values adding locators for each to result
                    // must filter out the locator set for the excluded value while iterating values
                    while (aValueIterator.hasNext()) {
                        aLocatorSet = (TreeSet) ((Map.Entry) aValueIterator.next()).getValue();

                        // apply the exclusion filter for the matched value
                        if (aLocatorSet != anExcludedLocatorSet) {
                            // iterate over locators for current value adding each to result
                            Iterator aLocatorIterator = ((TreeSet) ((Map.Entry) aValueIterator.next()).getValue()).iterator();
                            for (; aLocatorIterator.hasNext(); ++aResultIndex) {
                                ValueLocator aLocator = (ValueLocator) aLocatorIterator.next();
                                aResult[aResultIndex] = new IndexMatch(new Key(aLocator.getKey()), aLocator.getPosition(), aLocator.getLength(), aLocator.getElementID(), aLocator.getAttributeID());
                            }
                        }
                    }
                }
View Full Code Here


        while (aValueIterator.hasNext()) {
            // iterate over locators for current value adding each to result
            Iterator aLocatorIterator = ((TreeSet) ((Map.Entry) aValueIterator.next()).getValue()).iterator();
            for (; aLocatorIterator.hasNext(); ++theStartIndex) {
                ValueLocator aLocator = (ValueLocator) aLocatorIterator.next();
                theArray[theStartIndex] = new IndexMatch(new Key(aLocator.getKey()), aLocator.getPosition(), aLocator.getLength(), aLocator.getElementID(), aLocator.getAttributeID());
            }
        }

        return theStartIndex;
    }
View Full Code Here

        }

        Iterator aLocatorIterator = theSet.iterator();
        for (; aLocatorIterator.hasNext(); ++theStartIndex) {
            ValueLocator aLocator = (ValueLocator) aLocatorIterator.next();
            theArray[theStartIndex] = new IndexMatch(new Key(aLocator.getKey()), aLocator.getPosition(), aLocator.getLength(), aLocator.getElementID(), aLocator.getAttributeID());
        }
        return theStartIndex;
    }
View Full Code Here

                                         "Error generating RecordSet", e);
            }
        }

        public synchronized boolean indexInfo(Value value, long pointer) {
            keys.add(new Key(value));
            return true;
        }
View Full Code Here

                if (rec == null) {
                    continue;
                }

                Key key = rec.getKey();
                // FIXME: What about inline metadata???
                Document doc = new DocumentImpl(rec.getValue().getData(), symbols, new NodeSource(collection, key));
                try {
                    new SAXHandler(key, doc, ACTION_CREATE, list);
                } catch (Exception e) {
View Full Code Here

        final IndexPattern pattern = query.getPattern();

        try {
            query(query, new BTreeCallback() {
                public boolean indexInfo(Value value, long pos) {
                    results.add(new IndexMatch(new Key(value), pattern));
                    return true;
                }
            });
        } catch (DBException e) {
            throw e;
View Full Code Here

        if (src != null) {
            final String prefix = sourcePrefix("src");

            setAttribute(XMLNS_PREFIX + ":" + prefix, NodeSource.SOURCE_NS);
            setAttribute(prefix + ":" + NodeSource.SOURCE_COL, src.getCollection().getCanonicalName());
            Key k = src.getKey();
            if (k != null) {
                setAttribute(prefix + ":" + NodeSource.SOURCE_KEY, k.toString());
            }
        }
    }
View Full Code Here

            return pos < files.length;
        }

        public synchronized Record getNextRecord() throws DBException {
            File file = files[pos++];
            return readRecord(new Key(file.getName()));
        }
View Full Code Here

        public synchronized Value getNextValue() throws DBException {
            return getNextRecord().getValue();
        }

        public synchronized Key getNextKey() {
            return new Key(files[pos++].getName());
        }
View Full Code Here

        if (key == null) {
            return createNewOID();
        } else if (key instanceof Key) {
            return (Key) key;
        } else {
            return new Key(key.toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.xindice.core.data.Key

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.