Package org.apache.vxquery.types

Examples of org.apache.vxquery.types.AtomicType


    private boolean itemSequenceTypeMatch(TaggedValuePointable tvp, ItemType it) {
        byte tag = tvp.getTag();
        if (it instanceof AnyItemType) {
            return true;
        } else if (it.isAtomicType()) {
            AtomicType ait = (AtomicType) it;
            if (BuiltinTypeRegistry.INSTANCE.isBuiltinTypeId(tag)) {
                SchemaType vType = BuiltinTypeRegistry.INSTANCE.getSchemaTypeById(tag);
                while (vType != null && vType.getTypeId() != ait.getTypeId()) {
                    vType = vType.getBaseType();
                }
                return vType != null;
            }
        } else if (it instanceof NodeType && tag == ValueTag.NODE_TREE_TAG) {
View Full Code Here


        ItemType it = sequenceType.getItemType();
        if (stq.isSubQuantifier(testST.getQuantifier())) {
            if (it instanceof AnyItemType) {
                return true;
            } else if (it.isAtomicType() && testST.getItemType().isAtomicType()) {
                AtomicType ait = (AtomicType) it;
                AtomicType testIT = (AtomicType) testST.getItemType();
                if (BuiltinTypeRegistry.INSTANCE.isBuiltinTypeId(testIT.getTypeId())) {
                    SchemaType vType = BuiltinTypeRegistry.INSTANCE.getSchemaTypeById(testIT.getTypeId());
                    while (vType != null && vType.getTypeId() != ait.getTypeId()) {
                        vType = vType.getBaseType();
                    }
                    return vType != null;
                }
View Full Code Here

    private ILogicalExpression ce(SequenceType type, Object value) throws SystemException {
        try {
            ItemType it = type.getItemType();
            if (it.isAtomicType()) {
                AtomicType at = (AtomicType) it;
                byte[] bytes = null;
                switch (at.getTypeId()) {
                    case BuiltinTypeConstants.XS_BOOLEAN_TYPE_ID: {
                        baaos.reset();
                        dOut.write((byte) ValueTag.XS_BOOLEAN_TAG);
                        dOut.writeByte(((Boolean) value).booleanValue() ? 1 : 0);
                        break;
View Full Code Here

    private ILogicalExpression normalize(ILogicalExpression expr, SequenceType type) throws SystemException {
        if (type.getItemType().isAtomicType()) {
            ILogicalExpression atomizedExpr = new ScalarFunctionCallExpression(BuiltinFunctions.FN_DATA_1,
                    Collections.singletonList(mutable(expr)));
            AtomicType aType = (AtomicType) type.getItemType();
            if (TypeUtils.isSubtypeTypeOf(aType, BuiltinTypeRegistry.XS_BOOLEAN)) {
                return new ScalarFunctionCallExpression(BuiltinFunctions.FN_BOOLEAN_1,
                        Collections.singletonList(mutable(atomizedExpr)));
            }
            return promote(atomizedExpr, type);
View Full Code Here

    private ILogicalExpression ce(SequenceType type, Object value) throws SystemException {
        try {
            ItemType it = type.getItemType();
            if (it.isAtomicType()) {
                AtomicType at = (AtomicType) it;
                byte[] bytes = null;
                switch (at.getTypeId()) {
                    case BuiltinTypeConstants.XS_BOOLEAN_TYPE_ID: {
                        baaos.reset();
                        dOut.write((byte) ValueTag.XS_BOOLEAN_TAG);
                        dOut.writeByte(((Boolean) value).booleanValue() ? 1 : 0);
                        break;
View Full Code Here

    private ILogicalExpression normalize(ILogicalExpression expr, SequenceType type) throws SystemException {
        if (type.getItemType().isAtomicType()) {
            ILogicalExpression atomizedExpr = new ScalarFunctionCallExpression(BuiltinFunctions.FN_DATA_1,
                    Collections.singletonList(mutable(expr)));
            AtomicType aType = (AtomicType) type.getItemType();
            if (TypeUtils.isSubtypeTypeOf(aType, BuiltinTypeRegistry.XS_BOOLEAN)) {
                return new ScalarFunctionCallExpression(BuiltinFunctions.FN_BOOLEAN_1,
                        Collections.singletonList(mutable(atomizedExpr)));
            }
            return promote(atomizedExpr, type);
View Full Code Here

    private boolean itemSequenceTypeMatch(TaggedValuePointable tvp, ItemType it) {
        byte tag = tvp.getTag();
        if (it instanceof AnyItemType) {
            return true;
        } else if (it.isAtomicType()) {
            AtomicType ait = (AtomicType) it;
            if (BuiltinTypeRegistry.INSTANCE.isBuiltinTypeId(tag)) {
                SchemaType vType = BuiltinTypeRegistry.INSTANCE.getSchemaTypeById(tag);
                while (vType != null && vType.getTypeId() != ait.getTypeId()) {
                    vType = vType.getBaseType();
                }
                return vType != null;
            }
        } else if (it instanceof NodeType && tag == ValueTag.NODE_TREE_TAG) {
View Full Code Here

    private ILogicalExpression ce(SequenceType type, Object value) throws SystemException {
        try {
            ItemType it = type.getItemType();
            if (it.isAtomicType()) {
                AtomicType at = (AtomicType) it;
                byte[] bytes = null;
                switch (at.getTypeId()) {
                    case BuiltinTypeConstants.XS_BOOLEAN_TYPE_ID: {
                        baaos.reset();
                        dOut.write((byte) ValueTag.XS_BOOLEAN_TAG);
                        dOut.writeByte(((Boolean) value).booleanValue() ? 1 : 0);
                        break;
View Full Code Here

    private ILogicalExpression normalize(ILogicalExpression expr, SequenceType type) throws SystemException {
        if (type.getItemType().isAtomicType()) {
            ILogicalExpression atomizedExpr = new ScalarFunctionCallExpression(BuiltinFunctions.FN_DATA_1,
                    Collections.singletonList(mutable(expr)));
            AtomicType aType = (AtomicType) type.getItemType();
            if (TypeUtils.isSubtypeTypeOf(aType, BuiltinTypeRegistry.XS_BOOLEAN)) {
                return new ScalarFunctionCallExpression(BuiltinFunctions.FN_BOOLEAN_1,
                        Collections.singletonList(mutable(atomizedExpr)));
            }
            return promote(atomizedExpr, type);
View Full Code Here

TOP

Related Classes of org.apache.vxquery.types.AtomicType

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.