Class Interpreter
- java.lang.Object
-
- org.ehrbase.webtemplate.interpreter.Interpreter
-
public class Interpreter extends Object
- Author:
- Stefan Spiska
-
-
Constructor Summary
Constructors Constructor Description Interpreter(TemplateProvider templateProvider, List<String> resolveTo)
-
Method Summary
-
-
-
Constructor Detail
-
Interpreter
public Interpreter(TemplateProvider templateProvider, List<String> resolveTo)
- Parameters:
templateProvider- UsedTemplateProviderresolveTo- To wichRMObjectshould the part be resolved
-
-
Method Detail
-
interpret
public Set<InterpreterOutput> interpret(SelectFieldDto selectFieldDto, ContainmentExpresionDto contains, String templateId)
-
interpret
protected Set<InterpreterOutput> interpret(Set<InterpreterInput> inputs, String templateId)
Called frominterpret(SelectFieldDto, ContainmentExpresionDto, String). Can be overwritten to take advantage of caching.- Parameters:
inputs-templateId-- Returns:
- See Also:
interpret(SelectFieldDto, ContainmentExpresionDto, String)
-
findPathToValue
protected Set<List<InterpreterPathNode>> findPathToValue(WebTemplateNode parent, AqlPath path, WebTemplateNode node)
- Parameters:
path-node-- Returns:
-
findPathToValue
protected Optional<InterpreterPathNode> findPathToValue(WebTemplateNode parent, AqlPath path, WebTemplateInput input)
- Parameters:
path-input-- Returns:
-
findContainment
protected Set<org.apache.commons.lang3.tuple.Pair<Containment[],Containment>> findContainment(Integer id, ContainmentExpresionDto containmentDto)
Finds all direct contain path containing theContainmentwith givenid.- Parameters:
id- Might be null to indicate to find all direct paths without the condition to matchid.containmentDto-- Returns:
- The set of all direct contain path.
Pair.getLeft()is the path andPair.getRight()is the containment in the path matching the givenid.
-
resolve
protected static Set<List<org.apache.commons.lang3.tuple.Pair<WebTemplateNode,Deque<WebTemplateNode>>>> resolve(List<Containment> contains, WebTemplateNode node)
- Parameters:
contains-node-- Returns:
- The set of all matching parts. Each
Pairin the list correspond to an Element ofcontains. wherePair.getLeft()is the matchingWebTemplateNodeandPair.getRight()is the path to this node from the previous.
-
findRmAttributeInfo
public static com.nedap.archie.rminfo.RMAttributeInfo findRmAttributeInfo(WebTemplateNode parent, WebTemplateNode child)
-
-