Package org.objectweb.medor.query.api

Examples of org.objectweb.medor.query.api.QueryTreeField


                newsplitted[0] = "this";
                System.arraycopy(splitted, 0, newsplitted, 1, splitted.length);
                splitted = newsplitted;
            }
        }
        QueryTreeField qtf = (QueryTreeField) fields.get(path);
        if (qtf == null) {
            try {
                qtf = qb.project(define(qb, path, null));
            } catch (Exception e) {
                throw new SpeedoException(e);
View Full Code Here


     */
    private Nest addAggregateNode() throws SpeedoException, MedorException {
        Map old2newFields = new HashMap();
        //project used fields on the QueryNode #top
        for (int i = 0; i < usedFields.size(); i++) {
            QueryTreeField qtf = (QueryTreeField) usedFields.get(i);
            Field newf = top.addPropagatedField(qtf.getName(), qtf
                        .getType(), new QueryTreeField[] { qtf });
                old2newFields.put(qtf, newf);
        }
        //replace the use of old fields in 'grouped' by the new projected
        replaceFieldsInList(groupedFields, old2newFields);
View Full Code Here

            }
            String[] spli = splitPath(pathset);
            String rest = mergePath(spli, 1, spli.length - 1);
            QueryBuilder subquery = new QueryBuilder(qb);
            subquery.define("", qb.navigate(spli[0]));
            QueryTreeField setField = subquery.project(subquery.navigate(rest));
            Expression e = new MemberOf(
                    Collections.singletonList(((Object[]) params.get(name))[1]),
                    Collections.singletonList(new BasicFieldOperand(setField)));
            if (debug) {
                logger.log(BasicLevel.DEBUG, tab + "push(" + ExpressionPrinter.e2str(e) + ")");
View Full Code Here

                    //The variable definition is managed by the Variable visitor
                    //thus forget the expression
                    if ((nbNot % 2) == 0) {
                        stack.push(REMOVER);
                    } else {
                        QueryTreeField f = (QueryTreeField) fields.get(name);
                      stack.push(new Not(new IsEmpty(new BasicFieldOperand(f))));
                    }
                } else {
                    //x.y.bs.contains(u.v.b)
                    String rest = mergePath(spli, 1, spli.length - 2);
                    QueryBuilder subquery = new QueryBuilder(qb);
                    subquery.define("", qb.navigate(spli[0]));
                    QueryTreeField setField = subquery.project(subquery.navigate(rest));
                    QueryTreeField f = (QueryTreeField) fields.get(name);

                    stack.push(new MemberOf(
                            Collections.singletonList(
                                    new BasicFieldOperand(f)),
                            Collections.singletonList(
View Full Code Here

TOP

Related Classes of org.objectweb.medor.query.api.QueryTreeField

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.