Class GroovyMappingLoader

java.lang.Object
org.openehealth.ipf.commons.map.GroovyMappingLoader
All Implemented Interfaces:
GroovyObject, MappingLoader

@Deprecated(since="6.0", forRemoval=true) public class GroovyMappingLoader extends Object implements MappingLoader, GroovyObject
Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Short, stable identifier of the format this loader reads, e.g.
    static String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    load(InputStream input, URI source, MappingFunctionRegistry functions)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads all mappings contained in one source document.
    load(InputStream input, URI source, MappingFunctionRegistry functions, Consumer<String> warnings)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads all mappings contained in one source document, reporting what the model cannot hold.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    supports(URI source)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Whether this loader claims a source that nobody named a format for.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface GroovyObject

    getProperty, invokeMethod, setProperty
  • Constructor Details

    • GroovyMappingLoader

      public GroovyMappingLoader()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getMetaClass

      public MetaClass getMetaClass()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getMetaClass in interface GroovyObject
    • setMetaClass

      public void setMetaClass(MetaClass mc)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setMetaClass in interface GroovyObject
    • getEXTENSION

      public static String getEXTENSION()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getFORMAT

      public static String getFORMAT()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • format

      public String format()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MappingLoader
      Short, stable identifier of the format this loader reads, e.g. xml, yaml or conceptmap-r4-json. It is what a caller names to select this loader regardless of the source's file extension, and it is compared case-insensitively.

      Two loaders on one classpath must not share a format id, since the id is what picks one of them; qualify it the way conceptmap-r4-json does when a format has versions or encodings that a second loader might read.

      Specified by:
      format in interface MappingLoader
      Returns:
      the format id, never null or blank
    • supports

      public boolean supports(URI source)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MappingLoader
      Whether this loader claims a source that nobody named a format for. Implementations decide by file extension: a source it cannot recognize from its name alone is not its own, even if it could read the content, because that is what keeps dispatch predictable.
      Specified by:
      supports in interface MappingLoader
      Parameters:
      source - location of the mapping source, used for its file extension
      Returns:
      whether this loader can read the given source
    • load

      public List<Mapping> load(InputStream input, URI source, MappingFunctionRegistry functions)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MappingLoader
      Reads all mappings contained in one source document.
      Specified by:
      load in interface MappingLoader
      Parameters:
      input - the source content; the caller closes the stream
      source - location of the source, for diagnostics
      functions - registry a loader may add functions to, and against which it should validate any Unmatched.Computed reference it produces
      Returns:
      the mappings read, in declaration order
    • load

      public List<Mapping> load(InputStream input, URI source, MappingFunctionRegistry functions, Consumer<String> warnings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MappingLoader
      Reads all mappings contained in one source document, reporting what the model cannot hold.

      A format that can state more than the model - the legacy Groovy DSL binds arbitrary objects where the model holds strings - reports each such loss to warnings, one message per mapping, starting with the mapping's name. MappingConverter collects them. The default implementation has nothing to report.

      Specified by:
      load in interface MappingLoader
      Parameters:
      input - the source content; the caller closes the stream
      source - location of the source, for diagnostics
      functions - registry a loader may add functions to
      warnings - receives a human-readable message for every loss the loader has to make
      Returns:
      the mappings read, in declaration order