Examples of NewContext()


Examples of org.exist.xquery.XQuery.newContext()

                final XQueryPool xqpool = xquery.getXQueryPool();
                CompiledXQuery compiled = xqpool.borrowCompiledXQuery(broker, source);
                XQueryContext context;
                if (compiled == null)
                    {context = xquery.newContext(AccessContext.REST);}
                else
                    {context = compiled.getContext();}
                context.setStaticallyKnownDocuments(new XmldbURI[] { pathUri });
                context.setBaseURI(new AnyURIValue(pathUri.toString()));
View Full Code Here

Examples of org.exist.xquery.XQuery.newContext()

 
          if (source == null) return null;
 
          XQuery xquery = broker.getXQueryService();
     
          XQueryContext queryContext = xquery.newContext(AccessContext.REST);
 
      // Find correct script load path
      queryContext.setModuleLoadPath(XmldbURI.create(uri).removeLastSegment().toString());
 
      CompiledXQuery compiled;
View Full Code Here

Examples of org.exist.xquery.XQuery.newContext()

                XQueryContext context;
                CompiledXQuery compiled = pool.borrowCompiledXQuery(serializer.broker, source);
                if (compiled != null)
                    {context = compiled.getContext();}
                else
                    {context = xquery.newContext(AccessContext.XINCLUDE);}
                context.declareNamespaces(namespaces);
                context.declareNamespace("xinclude", XINCLUDE_NS);
               
                //setup the http context if known
                if(serializer.httpContext != null)
View Full Code Here

Examples of org.mvel2.MVELInterpretedRuntime.newContext()

        if (parseBoolean(env.get("$USE_OPTIMIZER_ALWAYS"))) {
          outputBuffer = executeExpression(compileExpression(inBuffer.toString()), ctxObject, lvrf);
        }
        else {
          MVELInterpretedRuntime runtime = new MVELInterpretedRuntime(inBuffer.toString(), ctxObject, lvrf);
          runtime.newContext(pCtx);
          outputBuffer = runtime.parse();
        }
      }
      catch (Exception e) {
        if ("true".equals(env.get("$COMMAND_PASSTHRU"))) {
View Full Code Here

Examples of org.mvel2.compiler.ExpressionCompiler.newContext()

        try {
            Serializable template = this.templateCache.get(expression);
            if (template == null) {
                LOG.debug("Compiled template not found in cache, compiling template and caching.");
                ExpressionCompiler compiler = new ExpressionCompiler(expression);
                compiler.newContext(context);
                template = compiler.compile();
                this.templateCache.put(expression, template);
            }
            return MVEL.executeExpression(template, root, evaluationContext);
        } catch (Exception e) {
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.