Class PathResolver


  • public class PathResolver
    extends Object
    Resolve the path corresponding to a symbol in a given context

    Path are resolved at runtime by performing a query on the CONTAINMENT table. For example to resolve the path of contained archetype 'openEHR_EHR_OBSERVATION_laboratory_test_v0' in composition 'openEHR_EHR_COMPOSITION_report_result_v1', the following query is executed

    
          select "ehr"."containment"."path"
              from "ehr"."containment"
              where (
                  "ehr"."containment"."comp_id" = 'b97e9fde-d994-4874-b671-8b1cd81b811c'
                  and (label ~ 'openEHR_EHR_COMPOSITION_report_result_v1.*.openEHR_EHR_OBSERVATION_laboratory_test_v0')
              )
          
    The found path is for example: /content[openEHR-EHR-OBSERVATION.laboratory_test.v0 and name/value='Laboratory test'] it is used then to build the actual path to a datavalue

    Created by christian on 5/3/2016.
    • Constructor Detail

      • PathResolver

        public PathResolver​(org.jooq.DSLContext context,
                            IdentifierMapper mapper)
    • Method Detail

      • resolvePaths

        public void resolvePaths​(String templateId,
                                 UUID comp_id)
        resolve all the paths in the current containment mapper for a composition
        Parameters:
        comp_id -
      • hasPathExpression

        public boolean hasPathExpression()
      • classNameOf

        public String classNameOf​(String identifier)