Interface MappingFunctionProvider

All Known Implementing Classes:
AtnaMappingFunctions

public interface MappingFunctionProvider
Contributes named functions that an Unmatched.Computed fallback can refer to.

A module that ships a mapping file whose fallback is computed also ships the function it names, so that the file works wherever it is loaded from without the application having to know about it. Providers are discovered with ServiceLoader and applied before any mapping source is read; register one by listing it in META-INF/services/org.openehealth.ipf.commons.map.MappingFunctionProvider.

Function names share one namespace per Mappings instance. Names contributed by a provider should therefore be specific enough not to collide - qualify them if in doubt. A name registered explicitly through Mappings.Builder.function(String, Function) wins over a provider's.

Since:
6.0
  • Method Details

    • register

      void register(MappingFunctionRegistry registry)
      Parameters:
      registry - the registry to add functions to
    • registerAll

      static void registerAll(MappingFunctionRegistry registry)
      Applies every discovered provider to the given registry.