/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param path - the FHIR Path statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Base base, String path) throws FHIRException { ExpressionNode exp = parse(path); List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(null, base.isResource() ? base : null, base, null, base), list, exp, true); }
private List<Base> funcAliasAs(ExecutionContext context, List<Base> focus, ExpressionNode exp) throws FHIRException { List<Base> nl = execute(context, focus, exp.getParameters().get(0), true); String name = nl.get(0).primitiveValue(); context.addAlias(name, focus); return focus; }
private List<Base> funcAlias(ExecutionContext context, List<Base> focus, ExpressionNode exp) throws FHIRException { List<Base> nl = execute(context, focus, exp.getParameters().get(0), true); String name = nl.get(0).primitiveValue(); List<Base> res = new ArrayList<Base>(); Base b = context.getAlias(name); if (b != null) res.add(b); return res; }
case Name: if (atEntry && exp.getName().equals("$this")) work.add(context.getThisItem()); else if (atEntry && exp.getName().equals("$total")) work.addAll(context.getTotal()); else for (Base item : focus) {
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param path - the FHIR Path statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Base base, String path) throws FHIRException { ExpressionNode exp = parse(path); List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(null, base.isResource() ? base : null, base, null, base), list, exp, true); }
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param ExpressionNode - the parsed ExpressionNode statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Base base, ExpressionNode ExpressionNode) throws FHIRException { List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base, null, base), list, ExpressionNode, true); }
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param ExpressionNode - the parsed ExpressionNode statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Object appContext, Base resource, Base base, ExpressionNode ExpressionNode) throws FHIRException { List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(appContext, resource, base, null, base), list, ExpressionNode, true); }
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param ExpressionNode - the parsed ExpressionNode statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Object appContext, Resource resource, Base base, ExpressionNode ExpressionNode) throws FHIRException { List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(appContext, resource, base, null, base), list, ExpressionNode, true); }
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param path - the FHIR Path statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Object appContext, Resource resource, Base base, String path) throws FHIRException { ExpressionNode exp = parse(path); List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(appContext, resource, base, null, base), list, exp, true); }
private ExecutionContext changeThis(ExecutionContext context, Base newThis) { return new ExecutionContext(context.appInfo, context.resource, context.context, context.aliases, newThis); }
private List<Base> funcAlias(ExecutionContext context, List<Base> focus, ExpressionNode exp) throws FHIRException { List<Base> nl = execute(context, focus, exp.getParameters().get(0), true); String name = nl.get(0).primitiveValue(); List<Base> res = new ArrayList<Base>(); Base b = context.getAlias(name); if (b != null) res.add(b); return res; }
private List<Base> funcAliasAs(ExecutionContext context, List<Base> focus, ExpressionNode exp) throws FHIRException { List<Base> nl = execute(context, focus, exp.getParameters().get(0), true); String name = nl.get(0).primitiveValue(); context.addAlias(name, focus); return focus; }
case Name: if (atEntry && exp.getName().equals("$this")) work.add(context.getThisItem()); else if (atEntry && exp.getName().equals("$total")) work.addAll(context.getTotal()); else for (Base item : focus) {
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param path - the FHIR Path statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Object appContext, Resource resource, Base base, String path) throws FHIRException { ExpressionNode exp = parse(path); List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(appContext, resource, base, null, base), list, exp, true); }
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param ExpressionNode - the parsed ExpressionNode statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Object appContext, Base resource, Base base, ExpressionNode ExpressionNode) throws FHIRException { List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(appContext, resource, base, null, base), list, ExpressionNode, true); }
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param ExpressionNode - the parsed ExpressionNode statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Object appContext, Resource resource, Base base, ExpressionNode ExpressionNode) throws FHIRException { List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(appContext, resource, base, null, base), list, ExpressionNode, true); }
/** * evaluate a path and return the matching elements * * @param base - the object against which the path is being evaluated * @param ExpressionNode - the parsed ExpressionNode statement to use * @return * @throws FHIRException * @ */ public List<Base> evaluate(Base base, ExpressionNode ExpressionNode) throws FHIRException { List<Base> list = new ArrayList<Base>(); if (base != null) list.add(base); log = new StringBuilder(); return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base, null, base), list, ExpressionNode, true); }
private ExecutionContext changeThis(ExecutionContext context, Base newThis) { return new ExecutionContext(context.appInfo, context.resource, context.context, context.aliases, newThis); }