Class DefaultCodeStoreRegistry

java.lang.Object
ca.uhn.hl7v2.conf.store.DefaultCodeStoreRegistry
All Implemented Interfaces:
CodeStoreRegistry

public class DefaultCodeStoreRegistry extends Object implements CodeStoreRegistry
Default Implementation of a CodeStoreRegistry
Author:
Christian Ohr
  • Constructor Details

  • Method Details

    • addCodeStore

      public void addCodeStore(CodeStore store)
      Description copied from interface: CodeStoreRegistry
      Registers a code store for use with all profiles.
      Specified by:
      addCodeStore in interface CodeStoreRegistry
    • addCodeStore

      public void addCodeStore(CodeStore store, String profileID)
      Description copied from interface: CodeStoreRegistry
      Registers a code store for use with certain profiles. The profiles with which the code store are used are determined by profileIdPattern, which is a regular expression that will be matched against profile IDs. For example suppose there are three profiles in the profile store, with the following IDs:
      1. ADT:confsig-UHN-2.4-profile-AL-NE-Immediate
      2. ADT:confsig-CIHI-2.4-profile-AL-NE-Immediate
      3. ADT:confsig-CIHI-2.3-profile-AL-NE-Immediate
      Then to use a code store with only the first profile, the profileIdPattern would be "ADT:confsig-UHN-2.4-profile-AL-NE-Immediate". To use a code store with both of the 2.4 profiles, the pattern would be ".*2\\.4.*". To use a code store with all profiles, the pattern would be '.*". Multiple stores can be registered for use with the same profile. If this happens, the first one that returned true for knowsCodes(codeSystem) will used. Stores are searched in the order they are added here.
      Specified by:
      addCodeStore in interface CodeStoreRegistry
    • getCodeStore

      public CodeStore getCodeStore(String profileID, String codeSystem)
      Description copied from interface: CodeStoreRegistry
      Returns the first code store that knows the codes in the given code system (as per CodeStore.knowsCodes) and is registered for the given profile. Code stores are checked in the order in which they are added (with addCodeStore()).
      Specified by:
      getCodeStore in interface CodeStoreRegistry
      Returns:
      null if none are found