Package xbird.xquery.dm.value

Examples of xbird.xquery.dm.value.AtomicValue


                    Sequence atomized = result.atomize(dynEnv);
                    IFocus atomizedItor = atomized.iterator();

                    final Item groupKey;
                    if(atomizedItor.hasNext()) {
                        AtomicValue atom = (AtomicValue) atomizedItor.next();
                        if(atomizedItor.hasNext()) {
                            atomizedItor.closeQuietly();
                            throw new DynamicError("err:XQDY0095", "Illegal resulting value for a grouping variable: "
                                    + atomized);
                        }
                        groupKey = atom.asGroupingValue();
                    } else {
                        groupKey = ValueSequence.EMPTY_SEQUENCE;
                    }
                    atomizedItor.closeQuietly();
View Full Code Here


     */
    @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 && !Double.isNaN(value));
                v = new BooleanValue(ebv);
                break;
View Full Code Here

    [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

                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

        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

            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

     */
    @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

    @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

    @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

    @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

TOP

Related Classes of xbird.xquery.dm.value.AtomicValue

Copyright © 2018 www.massapicom. 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.