Examples of ParserContext


Examples of com.sun.xml.xsom.impl.parser.ParserContext

    *
    * @param   parser
    *      This parser will be called to parse XML Schema documents.
    */
    public XSOMParser(XMLParser parser) {
        context = new ParserContext(this,parser);
    }
View Full Code Here

Examples of nz.govt.natlib.fx.ParserContext

   
    //holder for the transformed adapter output
    //ByteArrayOutputStream tAdapterOutput = new ByteArrayOutputStream(2048);
   
    // Set up the parser context and listener to hold the adapter output
    ParserContext pContext = new ParserContext();
   
    ParserListener listener= new DTDXmlParserListener(adapterOutput, outDTD == null ? null
        : Config.getInstance().getXMLBaseURL() + "/" + outDTD);
    pContext.addListener(listener);
   
    // Attempt to harvest the metadata.
    try {       
      // Extract the metadata.
      adapter.adapt(file, pContext);
View Full Code Here

Examples of org.elasticsearch.common.mvel2.ParserContext

    @Override public String[] extensions() {
        return new String[]{"mvel"};
    }

    @Override public Object compile(String script) {
        return MVEL.compileExpression(script, new ParserContext(parserConfiguration));
    }
View Full Code Here

Examples of org.hibernate.hql.ast.common.ParserContext

public class ParsingTest {

  @Test
  public void testFromAnimal() {
    ParserContext context = new TestingParserContext( "Animal" );
    //generated alias:
    assertTreeParsed( context, "from Animal",
      "(QUERY (QUERY_SPEC (SELECT_FROM (from (PERSISTER_SPACE (ENTITY_PERSISTER_REF Animal <gen:0>))) (SELECT (SELECT_LIST (SELECT_ITEM <gen:0>))))))");
  }
View Full Code Here

Examples of org.jbake.parser.ParserContext

        } finally {
          IOUtils.closeQuietly(is);
        }

        boolean hasHeader = hasHeader(fileContents);
        ParserContext context = new ParserContext(
                file,
                fileContents,
                config,
                contentPath,
                hasHeader,
View Full Code Here

Examples of org.mule.mvel2.ParserContext

            .build(new CacheLoader<String, Serializable>()
            {
                @Override
                public Serializable load(String key) throws Exception
                {
                    return MVEL.compileExpression(key, new ParserContext(parserConfiguration));
                }
            });
    }
View Full Code Here

Examples of org.mvel.ParserContext

                      errors.add( new RuleFlowProcessValidationErrorImpl( RuleFlowProcessValidationError.ACTION_NODE_WITHOUT_ACTION, "name = " + actionNode.getName() ) );
                    } else {
                        try {
                          ExpressionCompiler compiler = new ExpressionCompiler(actionString);
                          compiler.setVerifying(true);
                        ParserContext parserContext = new ParserContext();
                        //parserContext.setStrictTypeEnforcement(true);
                        compiler.compile(parserContext);
                        List mvelErrors = parserContext.getErrorList();
                        if (mvelErrors != null) {
                          for (Iterator iterator = mvelErrors.iterator(); iterator.hasNext(); ) {
                            Object error = iterator.next();
                            errors.add( new RuleFlowProcessValidationErrorImpl( RuleFlowProcessValidationError.ACTION_NODE_WITH_INVALID_ACTION, "name = " + actionNode.getName() + " " + error ) );
                          }
View Full Code Here

Examples of org.mvel2.ParserContext

      pconf.addPackageImport("org.jbpm.task.query");
      pconf.addPackageImport("java.util");
      for(String entry : getInputs().keySet()){
        pconf.addImport(entry, getInputs().get(entry));
        }
      ParserContext context = new ParserContext(pconf);
        Serializable s = MVEL.compileExpression(str.trim(), context);
        return MVEL.executeExpression(s, vars);
    }
View Full Code Here

Examples of org.mvel2.ParserContext

                                "Action node '" + node.getName() + "' [" + node.getId() + "] has empty action."));
                        } else if( "mvel".equals( droolsAction.getDialect() ) ) {
                            try {
                                ExpressionCompiler compiler = new ExpressionCompiler(actionString);
                                compiler.setVerifying(true);
                                ParserContext parserContext = new ParserContext();
                                //parserContext.setStrictTypeEnforcement(true);
                                compiler.compile(parserContext);
                                List<ErrorDetail> mvelErrors = parserContext.getErrorList();
                                if (mvelErrors != null) {
                                    for (Iterator<ErrorDetail> iterator = mvelErrors.iterator(); iterator.hasNext(); ) {
                                        ErrorDetail error = iterator.next();
                                        errors.add(new ProcessValidationErrorImpl(process,
                                            "Action node '" + node.getName() + "' [" + node.getId() + "] has invalid action: " + error.getMessage() + "."));
View Full Code Here

Examples of org.mvel2.ParserContext

  }

  public Object eval(String str, Map<String, Object> vars) {
    ExpressionCompiler compiler = new ExpressionCompiler(str.trim());

    ParserContext context = new ParserContext();
    context.addPackageImport("org.drools.task");
    context.addPackageImport("org.drools.task.service");
    context.addPackageImport("org.drools.task.query");
    context.addPackageImport("java.util");

    vars.put("now", new Date());
    return MVEL.executeExpression(compiler.compile(context), vars);
  }
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.