Package xbird.xquery.dm.value.sequence

Examples of xbird.xquery.dm.value.sequence.ValueSequence.addItem()


                    }
                    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;
View Full Code Here


                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;
View Full Code Here

        secondItor.closeQuietly();
        final ValueSequence newSeq = new ValueSequence(dynEnv);
        final int from = ((XInteger) firstItem).getNumber().intValue();
        final int to = ((XInteger) secondItem).getNumber().intValue();
        for(int i = from; i <= to; i++) {
            newSeq.addItem(new XInteger(i));
        }
        return newSeq;
    }

}
View Full Code Here

            FunctionSignature sign = func.getFunctionSignature(arity);
            for(int i = 0; i < arity; i++) {
                XQExpression p = _params.get(i);
                Sequence seq = p.eval(contextSeq, dynEnv);
                Sequence converted = mapFunctionArgument(seq, sign.getArgumentType(i), dynEnv);
                argv.addItem(SingleCollection.wrap(converted, dynEnv));
            }
        }
        return func.eval(contextSeq, argv, dynEnv);
    }
View Full Code Here

            for(Item it : atomizedItor) {
                final Type actualType = it.getType();
                // apply fs:ConvertSimpleOperand
                if(actualType == UntypedAtomicType.UNTYPED_ATOMIC && expected.getTypeId() >= 0) {
                    final AtomicValue casted = ((AtomicValue) it).castAs(expected, dynEnv);
                    res.addItem(casted);
                } else {
                    res.addItem(it);
                }
            }
            atomizedItor.closeQuietly();
View Full Code Here

                // apply fs:ConvertSimpleOperand
                if(actualType == UntypedAtomicType.UNTYPED_ATOMIC && expected.getTypeId() >= 0) {
                    final AtomicValue casted = ((AtomicValue) it).castAs(expected, dynEnv);
                    res.addItem(casted);
                } else {
                    res.addItem(it);
                }
            }
            atomizedItor.closeQuietly();
            return res.atomize(dynEnv);
        }
View Full Code Here

            FunctionSignature sign = func.getFunctionSignature(arity);
            for(int i = 0; i < arity; i++) {
                XQExpression p = _params.get(i);
                Sequence seq = p.eval(contextSeq, dynEnv);
                Sequence converted = mapFunctionArgument(seq, sign.getArgumentType(i), dynEnv);
                argv.addItem(SingleCollection.wrap(converted, dynEnv));
            }
        }
        return func.eval(contextSeq, argv, dynEnv);
    }
View Full Code Here

            for(Item it : atomizedItor) {
                final Type actualType = it.getType();
                // apply fs:ConvertSimpleOperand
                if(actualType == UntypedAtomicType.UNTYPED_ATOMIC && expected.getTypeId() >= 0) {
                    final AtomicValue casted = ((AtomicValue) it).castAs(expected, dynEnv);
                    res.addItem(casted);
                } else {
                    res.addItem(it);
                }
            }
            atomizedItor.closeQuietly();
View Full Code Here

                // apply fs:ConvertSimpleOperand
                if(actualType == UntypedAtomicType.UNTYPED_ATOMIC && expected.getTypeId() >= 0) {
                    final AtomicValue casted = ((AtomicValue) it).castAs(expected, dynEnv);
                    res.addItem(casted);
                } else {
                    res.addItem(it);
                }
            }
            atomizedItor.closeQuietly();
            return res.atomize(dynEnv);
        }
View Full Code Here

                    }
                    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;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.