Examples of ExpressionParser


Examples of jsynoptic.parser.ExpressionParser

                }
            }
        }
        ExpressionNode node = null;
        try {
            ExpressionParser ep = new ExpressionParser(expression);
            // Add the data sources as variables, once conflicts are resolved
            for (int i = 0; i < clm.size(); ++i) {
                VariableConflict vc = (VariableConflict) clm.get(i);
                ep.addVariable(new VariableAssociation(vc.ds, vc.var));
            }
            // Add known plugins => may bring in more mathematical functions
            for (Iterator it = Run.plugins.iterator(); it.hasNext();) {
                ep.addClass(it.next().getClass());
            }
            node = ep.parse();
        } catch (ParseException pe) {
            // Also catches duplicate variable names
            JOptionPane.showMessageDialog(JSynoptic.gui.getOwner(), pe.getLocalizedMessage(), resources
                    .getString("CantRestoreExpression")
                    + expression, JOptionPane.ERROR_MESSAGE);
View Full Code Here

Examples of net.sf.jxls.parser.ExpressionParser

     */
    final StopWatch clock = new StopWatch("Performance");
    clock.start("jexl2");
    for(int i=0;i<count;i++){
      Configuration conf = new Configuration();
      ExpressionParser exprParser = new ExpressionParser( test, beans, conf );
          Expression testExpr = exprParser.parse();
          try {
              result = (Boolean) testExpr.evaluate();
          } catch (Exception e) {
            e.printStackTrace();
          }
View Full Code Here

Examples of net.sf.saxon.expr.ExpressionParser

    * @return The pattern object
    */

    public static Pattern make(String pattern, StaticContext env, Executable exec) throws XPathException {

        Pattern pat = (new ExpressionParser()).parsePattern(pattern, env).simplify(env);
        pat.setSystemId(env.getSystemId());
        pat.setLineNumber(env.getLineNumber());
        // System.err.println("Simplified [" + pattern + "] to " + pat.getClass() + " default prio = " + pat.getDefaultPriority());
        // set the pattern text for use in diagnostics
        pat.setOriginalText(pattern);
View Full Code Here

Examples of org.apache.cayenne.exp.parser.ExpressionParser

            throw new NullPointerException("Null expression string.");
        }

        Reader reader = new StringReader(expressionString);
        try {
            return new ExpressionParser(reader).expression();
        }
        catch (ParseException ex) {
            throw new ExpressionException(ex.getMessage(), ex);
        }
        catch (Throwable th) {
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.ExpressionParser

                JDBCFetchConfiguration.EAGER_JOIN);
        return paged;
    }

    public StoreQuery newQuery(String language) {
        ExpressionParser ep = QueryLanguages.parserForLanguage(language);
        if (ep != null)
            return new JDBCStoreQuery(this, ep);
        if (QueryLanguages.LANG_SQL.equals(language))
            return new SQLStoreQuery(this);
        return null;
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.ExpressionParser

        beginOperation(false);
        try {
            StoreQuery sq = _store.newQuery(lang);
            if (sq == null) {
                ExpressionParser ep = QueryLanguages.parserForLanguage(lang);
                if (ep != null)
                    sq = new ExpressionStoreQuery(ep);
                else if (QueryLanguages.LANG_METHODQL.equals(lang))
                    sq = new MethodStoreQuery();
                else
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.ExpressionParser

            for (SliceStoreManager slice : _slices) {
                ret.add(slice.newQuery(language));
            }
            return ret;
      }
        ExpressionParser parser = QueryLanguages.parserForLanguage(language);
        if (parser == null) {
        throw new UnsupportedOperationException("Language [" + language + "] not supported");
        }

        DistributedStoreQuery ret = new DistributedStoreQuery(this, parser);
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.ExpressionParser

        beginOperation(false);
        try {
            StoreQuery sq = _store.newQuery(lang);
            if (sq == null) {
                ExpressionParser ep = QueryLanguages.parserForLanguage(lang);
                if (ep != null)
                    sq = new ExpressionStoreQuery(ep);
                else if (QueryLanguages.LANG_METHODQL.equals(lang))
                    sq = new MethodStoreQuery();
                else
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.ExpressionParser

                JDBCFetchConfiguration.EAGER_JOIN);
        return paged;
    }

    private StoreQuery newStoreQuery(String language) {
        ExpressionParser ep = QueryLanguages.parserForLanguage(language);
        if (ep != null) {
            return new JDBCStoreQuery(this, ep);
        }
        if (QueryLanguages.LANG_SQL.equals(language)) {
            return new SQLStoreQuery(this);
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.ExpressionParser

        beginOperation(false);
        try {
            StoreQuery sq = _store.newQuery(lang);
            if (sq == null) {
                ExpressionParser ep = QueryLanguages.parserForLanguage(lang);
                if (ep != null)
                    sq = new ExpressionStoreQuery(ep);
                else if (QueryLanguages.LANG_METHODQL.equals(lang))
                    sq = new MethodStoreQuery();
                else
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.