private Path compile() { RootPathToken root = readContextToken(); return new CompiledPath(root, root.getPathFragment().equals("$")); }
@Override public EvaluationContext evaluate(Object document, Object rootDocument, Configuration configuration){ return evaluate(document, rootDocument, configuration, false); }
@Override public EvaluationContext evaluate(Object document, Object rootDocument, Configuration configuration, boolean forUpdate) { if (logger.isDebugEnabled()) { logger.debug("Evaluating path: {}", toString()); } EvaluationContextImpl ctx = new EvaluationContextImpl(this, rootDocument, configuration, forUpdate); try { PathRef op = ctx.forUpdate() ? PathRef.createRoot(rootDocument) : PathRef.NO_OP; root.evaluate("", op, document, ctx); } catch (EvaluationAbortException abort) {} return ctx; }
public CompiledPath(RootPathToken root, boolean isRootPath) { this.root = invertScannerFunctionRelationship(root); this.isRootPath = isRootPath; }
public CompiledPath(RootPathToken root, boolean isRootPath) { this.root = invertScannerFunctionRelationship(root); this.isRootPath = isRootPath; }
private static Path path() { return new CompiledPath(PathTokenFactory.createRootPathToken('$'), true); }
@Override public EvaluationContext evaluate(Object document, Object rootDocument, Configuration configuration, boolean forUpdate) { if (logger.isDebugEnabled()) { logger.debug("Evaluating path: {}", toString()); } EvaluationContextImpl ctx = new EvaluationContextImpl(this, rootDocument, configuration, forUpdate); try { PathRef op = ctx.forUpdate() ? PathRef.createRoot(rootDocument) : PathRef.NO_OP; root.evaluate("", op, document, ctx); } catch (EvaluationAbortException abort){}; return ctx; }
@Override public EvaluationContext evaluate(Object document, Object rootDocument, Configuration configuration){ return evaluate(document, rootDocument, configuration, false); }
parameter.setPath(new CompiledPath(path, true)); parameter.setType(ParamType.PATH); ((FunctionPathToken)token).setParameters(Arrays.asList(parameter));
@Override public EvaluationContext evaluate(Object document, Object rootDocument, Configuration configuration, boolean forUpdate) { if (logger.isDebugEnabled()) { logger.debug("Evaluating path: {}", toString()); } EvaluationContextImpl ctx = new EvaluationContextImpl(this, rootDocument, configuration, forUpdate); try { PathRef op = ctx.forUpdate() ? PathRef.createRoot(rootDocument) : PathRef.NO_OP; root.evaluate("", op, document, ctx); } catch (EvaluationAbortException abort){}; return ctx; }
@Override public EvaluationContext evaluate(Object document, Object rootDocument, Configuration configuration){ return evaluate(document, rootDocument, configuration, false); }
private Path compile() { RootPathToken root = readContextToken(); return new CompiledPath(root, root.getPathFragment().equals("$")); }
@Override public EvaluationContextImpl evaluate(Object rootObj, Object document, Object rootDocument, Configuration configuration) { if (logger.isDebugEnabled()) { logger.debug("Evaluating path: {}", toString()); } EvaluationContextImpl ctx = new EvaluationContextImpl(this, rootDocument, configuration, true); if (null != rootObj) { ctx.setRoot(rootObj); } try { PathRef op = ctx.forUpdate() ? PathRef.createRoot(rootDocument) : PathRef.NO_OP; root.evaluate("", op, document, ctx); } catch (EvaluationAbortException abort) { } return ctx; }
private Path compile() { RootPathToken root = readContextToken(); return new CompiledPath(root, root.getPathFragment().equals("$")); }
parameter.setPath(new CompiledPath(path, true)); parameter.setType(ParamType.PATH); ((FunctionPathToken)token).setParameters(Arrays.asList(parameter));