Examples of XDouble


Examples of xbird.xquery.dm.value.literal.XDouble

    }

    public void testLookupFunction() throws XQueryException, IllegalAccessException,
            NoSuchFieldException, NoSuchMethodException, InvocationTargetException {
        // params
        Variable v1 = new Variable.GlobalVariable(QNameTable.instantiate("", "p1"), new LiteralExpr(new XDouble(4)));
        v1.setType(DoubleType.DOUBLE);
        VarRef p1 = new VarRef(v1);
        List<VarRef> params = new LinkedList<VarRef>();
        params.add(p1);
        // function
View Full Code Here

Examples of xbird.xquery.dm.value.literal.XDouble

            if(it.isEmpty()) {
                return XDouble.valueOf(Double.NaN);
            }
            candidate = (AtomicValue) it;
        }
        final XDouble converted;
        try {
            converted = ((AtomicValue) candidate).castAs(DoubleType.DOUBLE, dynEnv);
        } catch (XQueryException xqe) {
            return XDouble.valueOf(Double.NaN);
        } catch (XQRTException rte) {
View Full Code Here

Examples of xbird.xquery.dm.value.literal.XDouble

    }

    public XDouble createInstance(String literal, AtomicType srcType, DynamicContext dynEnv)
            throws XQueryException {
        try {
            return new XDouble(literal);
        } catch (NumberFormatException e) {
            throw new DynamicError("err:FORG0001", e);
        }
    }
View Full Code Here

Examples of xbird.xquery.dm.value.literal.XDouble

                currentToken = jj_consume_token(DecimalLiteral);
                value = new XDecimal(currentToken.image);
                break;
            case DoubleLiteral:
                currentToken = jj_consume_token(DoubleLiteral);
                value = new XDouble(currentToken.image);
                break;
            case StringLiteral:
                currentToken = jj_consume_token(StringLiteral);
                String s = unescape(unquote(currentToken.image));
                if(s.indexOf('&') != -1) {
View Full Code Here

Examples of xbird.xquery.dm.value.literal.XDouble

                currentToken = jj_consume_token(DecimalLiteral);
                value = new XDecimal(currentToken.image);
                break;
            case DoubleLiteral:
                currentToken = jj_consume_token(DoubleLiteral);
                value = new XDouble(currentToken.image);
                break;
            case StringLiteral:
                currentToken = jj_consume_token(StringLiteral);
                String s = unescape(unquote(currentToken.image));
                if(s.indexOf('&') != -1) {
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.