Package xbird.xquery.dm.value.sequence

Examples of xbird.xquery.dm.value.sequence.ValueSequence


                } else {
                    skvItor = new NestedIterator<Item>(skvItor, skv.iterator());
                }
            }
            JoinTable joinTable = _joinTable;
            final ValueSequence vs = new ValueSequence(dynEnv);
            while(skvItor.hasNext()) {
                final Comparable searchKey;
                if(searchKeyLen == 1) {
                    final Item fsv = skvItor.next();
                    searchKey = mapArgument(fsv, 0, dynEnv);
                } else {
                    final Comparable[] searchKeys = new Comparable[searchKeyLen];
                    for(int i = 0; i < searchKeyLen; i++) {
                        Item fsv = skvItor.next();
                        searchKeys[i] = mapArgument(fsv, i, dynEnv);
                    }
                    searchKey = new JoinTable.Key(searchKeys, _opr);
                }
                final IFocus<Item> jsItor = joinTable.entrySequence(searchKey, dynEnv).iterator();
                for(Item entry : jsItor) {
                    vs.addItem(entry);
                }
                jsItor.closeQuietly();
            }
            if(vs.isEmpty()) {
                return ValueSequence.EMPTY_SEQUENCE;
            }
            return vs;
        }
View Full Code Here


                    skvItor = itor;
                } else {
                    skvItor = new NestedIterator<Item>(skvItor, itor);
                }
            }
            final ValueSequence vs = new ValueSequence(dynEnv);
            while(skvItor.hasNext()) {
                final Comparable searchKey;
                if(searchKeyLen == 1) {
                    final Item fsv = skvItor.next();
                    searchKey = mapArgument(fsv, 0, dynEnv);
                } else {
                    final Comparable[] searchKeys = new Comparable[searchKeyLen];
                    for(int i = 0; i < searchKeyLen; i++) {
                        Item fsv = skvItor.next();
                        searchKeys[i] = mapArgument(fsv, i, dynEnv);
                    }
                    searchKey = new JoinTable.Key(searchKeys, _opr);
                }
                if(_joinTable == null) {
                    this._joinTable = future.get();
                }
                final IFocus<Item> js = _joinTable.entrySequence(searchKey, dynEnv).iterator();
                for(Item entry : js) {
                    vs.addItem(entry);
                }
                js.closeQuietly();
            }
            if(vs.isEmpty()) {
                return ValueSequence.EMPTY_SEQUENCE;
            }
            return vs;
        }
View Full Code Here

                final Entry entry = find(key);
                if(entry == null) {
                    return ValueSequence.EMPTY_SEQUENCE;
                }
                Item[] items = entry.getItems();
                return new ValueSequence(Arrays.asList(items), dynEnv);
            }
            assert (_orderedKey != null);
            final SortedSet<Comparable> sorted;
            if(_opr.indexOf('<') != -1) { // <
                SortedSet<Comparable> heads = _orderedKey.headSet(key); // note that headSet contains key itself.
View Full Code Here

TOP

Related Classes of xbird.xquery.dm.value.sequence.ValueSequence

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.