Package xbird.xquery.expr

Examples of xbird.xquery.expr.LiteralExpr


    public void testEval() throws XQueryException {
        SequenceExpression seq = new SequenceExpression();
        AtomicValue it1 = new XString("1");
        AtomicValue it2 = new XString("2");
        seq.addExpression(new LiteralExpr(it1));
        seq.addExpression(new LiteralExpr(it2));
        Sequence<Item> res = (Sequence<Item>) seq.eval(null, new DynamicContext(new StaticContext()));
        Iterator<Item> resItor = res.iterator();
        assertTrue(resItor.hasNext());
        assertSame(it1, resItor.next());
        assertTrue(resItor.hasNext());
View Full Code Here


    }

    public void testLookupFunction() throws XQueryException, IllegalAccessException,
            NoSuchFieldException, NoSuchMethodException, InvocationTargetException {
        // params
        Variable v1 = new Variable.GlobalVariable(QNameTable.instantiate("", "p1"), new LiteralExpr(new XDouble(4)));
        v1.setType(DoubleType.DOUBLE);
        VarRef p1 = new VarRef(v1);
        List<VarRef> params = new LinkedList<VarRef>();
        params.add(p1);
        // function
View Full Code Here

            default:
                jj_la1[138] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
        }
        final LiteralExpr ve = new LiteralExpr(value);
        locate(ve);
        {
            if(true)
                return ve;
        }
View Full Code Here

            ParametricVariableDetector detector = new ParametricVariableDetector(shippedVars, statEnv);
            detector.visit(_queryExpr, null);

            final XQExpression compiledExpr;
            if(analyzedEndpoint instanceof LiteralExpr) {// distributed compile                
                LiteralExpr epLiteral = (LiteralExpr) analyzedEndpoint;
                String endpoint = epLiteral.getValue().stringValue();

                final XQEngineClient client = new XQEngineClient(endpoint);
                final CompileRequest request = new CompileRequest(_queryExpr);

                if(LOG.isInfoEnabled()) {
View Full Code Here

            default:
                jj_la1[133] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
        }
        final LiteralExpr ve = new LiteralExpr(value);
        locate(ve);
        {
            if(true)
                return ve;
        }
View Full Code Here

TOP

Related Classes of xbird.xquery.expr.LiteralExpr

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.