Examples of AtomicValue


Examples of xbird.xquery.dm.value.AtomicValue

        }
        int paramlen = params.size();
        assert (paramlen == 1);
        XQExpression locExpr = params.get(0);
        if(locExpr instanceof LiteralExpr) {
            AtomicValue atomv = ((LiteralExpr) locExpr).getValue();
            String locStr = atomv.stringValue();
            assert (locStr != null);
            Reader qr = readQuery(locStr, context);
            XQExpression resolved = resolveExpression(qr, context);
            return resolved;
        }
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

        }
        Type baseType = _srcExpr.getType();
        for(int i = 0; i < _predicates.size(); i++) {
            XQExpression e = _predicates.get(i);
            if(e instanceof LiteralExpr) {
                AtomicValue literal = ((LiteralExpr) e).getValue();
                if(literal instanceof XNumber) {
                    DynamicContext probe = DynamicContext.PROBE;
                    probe.setStaticContext(statEnv);
                    XNumber xnum = (XNumber) literal;
                    double xdouble = xnum.asDouble();
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

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

Examples of xbird.xquery.dm.value.AtomicValue

        final IFocus<AtomicValue> qnameItor = qnameSeq.iterator();
        if(!qnameItor.hasNext()) {
            qnameItor.closeQuietly();
            reportError("err:XPTY0004", "Conversion of the atomized name expression to an expanded QName was not successful.");
        }
        final AtomicValue it = qnameItor.next();
        if(qnameItor.hasNext()) {
            qnameItor.closeQuietly();
            reportError("err:XPTY0004", "Conversion of the atomized name expression to an expanded QName was not successful.");
        }
        qnameItor.closeQuietly();
        final QualifiedName namev;
        final Type t = it.getType();
        if(TypeUtil.subtypeOf(t, QNameType.QNAME)) {
            final QNameValue qname = ((AtomicValue) it).castAs(QNameType.QNAME, dynEnv);
            namev = qname.getValue();
        } else if(TypeUtil.subtypeOf(t, StringType.STRING) || t == UntypedAtomicType.UNTYPED_ATOMIC) {
            final StaticContext sc = dynEnv.getStaticContext();
            try {
                final CharSequence namecs = it.stringValue();
                final String namestr = (namecs == null) ? null : namecs.toString();
                namev = QNameUtil.parse(namestr, sc.getStaticalyKnownNamespaces(), sc.getDefaultElementNamespace());
            } catch (Exception e) {
                throw new DynamicError("err:XQDY0074", e);
            }
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.