Examples of TypeError


Examples of xbird.xquery.TypeError

                            prevText = null;
                        }
                        nodes.addItem(c);
                    }
                } else if(nodekind == NodeKind.ATTRIBUTE) {
                    throw new TypeError("err:XPTY0004", "An attribute node in the content sequence is not allowed: "
                            + i);
                } else {
                    DMNode c = dmnode.clone();
                    if(nodekind == NodeKind.TEXT) {
                        String curText = c.getContent();
View Full Code Here

Examples of xbird.xquery.TypeError

            this._analyzed = true;
            this._leftOperand = _leftOperand.staticAnalysis(statEnv);
            this._rightOperand = _rightOperand.staticAnalysis(statEnv);
            final Type ltype = _leftOperand.getType();
            if(!TypeUtil.subtypeOf(ltype, _type)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _leftOperand.getType());
            }
            if(!TypeUtil.subtypeOf(_rightOperand.getType(), _type)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _rightOperand.getType());
            }
            this._type = ltype;
        }
        return this;
View Full Code Here

Examples of xbird.xquery.TypeError

            this._analyzed = true;
            this._leftOperand = _leftOperand.staticAnalysis(statEnv);
            this._rightOperand = _rightOperand.staticAnalysis(statEnv);
            final Type ltype = _leftOperand.getType();
            if(!TypeUtil.subtypeOf(ltype, _type)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _leftOperand.getType());
            }
            if(!TypeUtil.subtypeOf(_rightOperand.getType(), _type)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _rightOperand.getType());
            }
            this._type = ltype;
        }
        return this;
View Full Code Here

Examples of xbird.xquery.TypeError

            this._analyzed = true;
            this._leftOperand = _leftOperand.staticAnalysis(statEnv);
            this._rightOperand = _rightOperand.staticAnalysis(statEnv);
            final Type ltype = _leftOperand.getType();
            if(!TypeUtil.subtypeOf(ltype, _type)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _leftOperand.getType());
            }
            final Type rtype = _rightOperand.getType();
            if(!TypeUtil.subtypeOf(rtype, _type)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _rightOperand.getType());
            }
            this._type = TypeUtil.union(ltype, rtype);
        }
        return this;
View Full Code Here

Examples of xbird.xquery.TypeError

            this._analyzed = true;
            this._leftOperand = _leftOperand.staticAnalysis(statEnv);
            this._rightOperand = _rightOperand.staticAnalysis(statEnv);
            final Type integerType = TypeRegistry.safeGet("xs:integer?");
            if(!TypeUtil.subtypeOf(_leftOperand.getType(), integerType)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _leftOperand.getType());
            }
            if(!TypeUtil.subtypeOf(_rightOperand.getType(), integerType)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _rightOperand.getType());
            }
        }
        return this;
    }
View Full Code Here

Examples of xbird.xquery.TypeError

        if(!_analyzed) {
            this._analyzed = true;
            this._leftOperand = _leftOperand.staticAnalysis(statEnv);
            this._rightOperand = _rightOperand.staticAnalysis(statEnv);
            if(!TypeUtil.subtypeOf(_leftOperand.getType(), _type)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _leftOperand.getType());
            }
            if(!TypeUtil.subtypeOf(_rightOperand.getType(), _type)) {
                throw new TypeError("Inferred type of left operand is invalid: "
                        + _rightOperand.getType());
            }
        }
        return this;
    }
View Full Code Here

Examples of xbird.xquery.TypeError

        if(expr == null) {
            throw new IllegalArgumentException();
        }
        if(expr instanceof AttributeConstructorBase) {
            if(!contents.isEmpty()) {
                throw new TypeError("err:XQTY0024", "an attribute node following a node that is not an attribute node");
            }
            AttributeConstructorBase att = (AttributeConstructorBase) expr;
            if(att instanceof NamespaceConstructor) {
                attributes.add(0, att);
                ++_attslen;
View Full Code Here

Examples of xbird.xquery.TypeError

            // the expected SequenceType of the corresponding parameters.
            if(expectedArgType instanceof SequenceType) {
                expectedArgType = ((SequenceType) expectedArgType).prime();
            }
            if(!(expectedArgType instanceof AtomicType)) {
                throw new TypeError("expectedArgType must be built-in atomic type, but was "
                        + expectedArgType);
            }
            final AtomicType expected = (AtomicType) expectedArgType;
            final ValueSequence res = new ValueSequence(dynEnv);
            final IFocus<? extends Item> atomizedItor = argv.atomize(dynEnv).iterator();
View Full Code Here

Examples of xbird.xquery.TypeError

            // the expected SequenceType of the corresponding parameters.
            if(expectedArgType instanceof SequenceType) {
                expectedArgType = ((SequenceType) expectedArgType).prime();
            }
            if(!(expectedArgType instanceof AtomicType)) {
                throw new TypeError("expectedArgType must be built-in atomic type, but was "
                        + expectedArgType);
            }
            final AtomicType expected = (AtomicType) expectedArgType;
            final ValueSequence res = new ValueSequence(dynEnv);
            final IFocus<? extends Item> atomizedItor = argv.atomize(dynEnv).iterator();
View Full Code Here

Examples of xbird.xquery.TypeError

        for(int i = 0; i < arity; i++) {
            Type expected = expectedTypes[i];
            XQExpression expr = params.get(i);
            Type actual = expr.getType();
            if(!TypeUtil.subtypeOf(actual, expected)) {// REVIEWME ok
                throw new TypeError("err:XPTY0004", i + "th parameter type '" + actual
                        + "' does not match to the expected argument type '" + expected + '\'');
            }
        }
        return this;
    }
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.