Examples of ValueSequence


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

            if(!(expectedArgType instanceof AtomicType)) {
                throw new TypeError("expectedArgType must be built-in atomic type, but was "
                        + expectedArgType);
            }
            final AtomicType expected = (AtomicType) expectedArgType;
            final ValueSequence res = new ValueSequence(dynEnv);
            final IFocus<? extends Item> atomizedItor = argv.atomize(dynEnv).iterator();
            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();
            return res.atomize(dynEnv);
        }
        return argv;
    }
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.