Examples of AtomicValue


Examples of xbird.xquery.dm.value.AtomicValue

    [138] IntegerLiteral ::= Digits
    [139] DecimalLiteral ::= ("." Digits) | (Digits "." [0-9]*)
    [140] DoubleLiteral  ::= (("." Digits) | (Digits ("." [0-9]*)?)) [eE] [+-]? Digits
    ************************************************************************/
    final public LiteralExpr parseLiteral() throws ParseException, XQueryException {
        final AtomicValue value;
        switch(jj_nt.kind) {
            case IntegerLiteral:
                // IntegerLiteral
                currentToken = jj_consume_token(IntegerLiteral);
                value = new XInteger(currentToken.image);
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

                handler.endItem(true);
                break;
            }
            switch(ev) {
                case XQEventEncoder.EV_ATOM: {
                    final AtomicValue atom;
                    try {
                        atom = AtomicValue.readAtomicValue(input);
                    } catch (ClassNotFoundException e) {
                        throw new IllegalStateException(e);
                    }
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

        final ObjectInput input = _input;
        while(true) {
            final byte ev = input.readByte();
            switch(ev) {
                case XQEventEncoder.EV_ATOM: {
                    final AtomicValue atom;
                    try {
                        atom = AtomicValue.readAtomicValue(input);
                    } catch (ClassNotFoundException e) {
                        throw new IllegalStateException(e);
                    }
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

            if(ev == XQEventEncoder.EV_EOF) {
                return;
            }
            switch(ev) {
                case XQEventEncoder.EV_ATOM: {
                    final AtomicValue atom;
                    try {
                        atom = AtomicValue.readAtomicValue(input);
                    } catch (ClassNotFoundException e) {
                        throw new IllegalStateException(e);
                    }
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

     */
    @Override
    public <T extends AtomicValue> T castAs(AtomicType trgType, DynamicContext dynEnv)
            throws XQueryException {
        final int ttid = trgType.getTypeId();
        final AtomicValue v;
        switch(ttid) {
            case TypeTable.BOOLEAN_TID:
                final boolean ebv = (value != 0.0 && !Float.isNaN(value));
                v = new BooleanValue(ebv);
                break;
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

    @Override
    public <T extends AtomicValue> T castAs(AtomicType trgType, DynamicContext dynEnv)
            throws XQueryException {
        final int ttid = trgType.getTypeId();
        final AtomicValue v;
        switch(ttid) {
            case TypeTable.BOOLEAN_TID:
                v = new BooleanValue(value.signum() != 0);
                break;
            case TypeTable.DECIMAL_TID:
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

    @Override
    public <T extends AtomicValue> T castAs(AtomicType trgType, DynamicContext dynEnv)
            throws XQueryException {
        final int ttid = trgType.getTypeId();
        final AtomicValue v;
        switch(ttid) {
            case TypeTable.BOOLEAN_TID:
                v = new BooleanValue(value != 0);
                break;
            case TypeTable.INTEGER_TID:
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

    @Override
    public <T extends AtomicValue> T castAs(AtomicType trgType, DynamicContext dynEnv)
            throws XQueryException {
        final int ttid = trgType.getTypeId();
        final AtomicValue v;
        switch(ttid) {
            case TypeTable.BOOLEAN_TID:
                v = this;
                break;
            case TypeTable.NUMERIC_TID:
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

            }
            final Type t = _keyTypes.get(index);
            if(t == StringType.STRING) {
                return new XString(item.stringValue());
            }
            final AtomicValue it = (item instanceof AtomicValue) ? (AtomicValue) item
                    : new XString(item.stringValue());
            if(t instanceof AtomicType) {
                final AtomicType trgType = (AtomicType) t;
                final AtomicValue converted = it.castAs(trgType, dynEnv);
                return converted;
            }
            return it;
        }
View Full Code Here

Examples of xbird.xquery.dm.value.AtomicValue

    @Override
    public <T extends AtomicValue> T castAs(AtomicType type, DynamicContext dynEnv)
            throws XQueryException {
        assert (type != null);
        final int tid = type.getTypeId();
        final AtomicValue atomv;
        switch(tid) {
            case TypeTable.UNTYPED_ATOMIC_TID:
                atomv = new UntypedAtomicValue(stringValue());
                break;
            case TypeTable.STRING_TID:
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.