Package xbird.xquery.type

Examples of xbird.xquery.type.Type


    ************************************************************************/
    final public List<Binding> parseLetClause() throws ParseException, XQueryException {
        final List<Binding> lets;
        LetVariable var;
        LetClause clause;
        Type varType = null;
        XQExpression expr = null;
        currentToken = jj_consume_token(LetVariable);
        currentToken = jj_consume_token(VarName);
        QualifiedName varName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
        var = new LetVariable(varName);
View Full Code Here


    }

    public XQExpression staticAnalysis(StaticContext statEnv) throws XQueryException {
        if(!_analyzed) {
            this._analyzed = true;
            final Type primeType = _targetType.prime();
            if(primeType == NOTATIONType.NOTATION || primeType == AtomicType.ANY_ATOMIC_TYPE) {
                throw new StaticError("err:XPST0080", "Illegal target type: " + _targetType);
            }
            this._inputExpr = _inputExpr.staticAnalysis(statEnv);
            this._type = BooleanType.BOOLEAN;
View Full Code Here

    final public QuantifiedExpr parseQuantifiedExpr() throws ParseException, XQueryException {
        final QuantifiedExpr outermost;
        boolean isEveryQuantifier = false;
        QualifiedName varName;
        QuantifiedVariable var;
        Type varType = null;
        XQExpression valueExpr;
        final XQExpression condExpr;
        currentModule.pushVarScope();
        switch(jj_nt.kind) {
            case Some:
View Full Code Here

    [44] CaseClause   ::= "case" ("$" VarName "as")? SequenceType "return" ExprSingle
    ************************************************************************/
    final public CaseClause parseCaseClause() throws ParseException, XQueryException {
        QualifiedName varName = null;
        CaseVariable caseVar = null;
        final Type varType;
        final XQExpression retExpr;
        currentModule.pushVarScope();
        currentToken = jj_consume_token(Case);
        switch(jj_nt.kind) {
            case VariableIndicator:
View Full Code Here

            ncnameItor.closeQuietly();
            reportError("err:XPTY0004", "The result of atomization was not a single atomic value.");
        }
        ncnameItor.closeQuietly();
        final String ncname;
        final Type t = it.getType();
        if(t == UntypedAtomicType.UNTYPED_ATOMIC || TypeUtil.subtypeOf(t, StringType.STRING)
                || TypeUtil.subtypeOf(t, NCNameType.NCNAME)) {
            ncname = it.stringValue();
            if(!XMLUtils.isNCName(ncname)) {
                throw new DynamicError("XQDY0041", "Illegal target name as xs:NCName: " + _target);
View Full Code Here

    /************************************************************************
    [54] InstanceofExpr ::= TreatExpr ( "instance" "of" SequenceType )?
    ************************************************************************/
    final public XQExpression parseInstanceofExpr() throws ParseException, XQueryException {
        XQExpression expr;
        Type type = null;
        expr = parseTreatExpr();
        switch(jj_nt.kind) {
            case Instanceof:
                currentToken = jj_consume_token(Instanceof);
                type = parseSequenceType();
View Full Code Here

    /************************************************************************
    [55] TreatExpr ::= CastableExpr ( "treat" "as" SequenceType )?
    ************************************************************************/
    final public XQExpression parseTreatExpr() throws ParseException, XQueryException {
        XQExpression expr;
        Type type = null;
        expr = parseCastableExpr();
        switch(jj_nt.kind) {
            case TreatAs:
                currentToken = jj_consume_token(TreatAs);
                type = parseSequenceType();
View Full Code Here

                        jj_la1[108] = jj_gen;
                        jj_consume_token(-1);
                        throw new ParseException();
                }
                QualifiedName typeName = QNameUtil.parse(currentToken.image, namespaceContext, staticContext.getDefaultElementNamespace());
                Type type = TypeFactory.createAtomicType(typeName, staticContext);
                switch(jj_nt.kind) {
                    case OccurrenceZeroOrOne:
                        currentToken = jj_consume_token(OccurrenceZeroOrOne);
                        type = TypeFactory.createSequenceType((AtomicType) type, Occurrence.OCC_ZERO_OR_ONE);
                        break;
View Full Code Here

                        jj_la1[111] = jj_gen;
                        jj_consume_token(-1);
                        throw new ParseException();
                }
                QualifiedName typeName = QNameUtil.parse(currentToken.image, namespaceContext, staticContext.getDefaultElementNamespace());
                Type type = TypeFactory.createAtomicType(typeName, staticContext);
                switch(jj_nt.kind) {
                    case OccurrenceZeroOrOne:
                        currentToken = jj_consume_token(OccurrenceZeroOrOne);
                        type = TypeFactory.createSequenceType((AtomicType) type, Occurrence.OCC_ZERO_OR_ONE);
                        break;
View Full Code Here

    @Override
    public XQExpression staticAnalysis(StaticContext statEnv) throws XQueryException {
        if(!_analyzed) {
            this._analyzed = true;
            final Type targetType = _targetType;
            final Type primeType = targetType.prime();
            if(primeType == NOTATIONType.NOTATION || primeType == AtomicType.ANY_ATOMIC_TYPE) {
                throw new StaticError("err:XPST0080", "Illegal target type: " + _targetType);
            }
            this._inputExpr = _inputExpr.staticAnalysis(statEnv);
            final Type inputType = _inputExpr.getType();
            if(inputType == targetType) {
                return _inputExpr;
            }
            this._type = targetType;
        }
View Full Code Here

TOP

Related Classes of xbird.xquery.type.Type

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.