Class MappingProcessor

java.lang.Object
com.regnosys.rosetta.common.translation.MappingProcessor
All Implemented Interfaces:
MappingDelegate
Direct Known Subclasses:
FlatFileMappingProcessor

public abstract class MappingProcessor extends Object implements MappingDelegate
Base implementation does not do any mapping, but each mapping method can be overridden.
  • Constructor Details

    • MappingProcessor

      public MappingProcessor(com.rosetta.model.lib.path.RosettaPath modelPath, List<Path> synonymPaths, MappingContext context)
  • Method Details

    • map

      public void map(Path synonymPath, Optional<com.rosetta.model.lib.RosettaModelObjectBuilder> builder, com.rosetta.model.lib.RosettaModelObjectBuilder parent)
      Specified by:
      map in interface MappingDelegate
    • map

      public void map(Path synonymPath, com.rosetta.model.lib.RosettaModelObjectBuilder builder, com.rosetta.model.lib.RosettaModelObjectBuilder parent)
    • map

      public void map(Path synonymPath, List<? extends com.rosetta.model.lib.RosettaModelObjectBuilder> builder, com.rosetta.model.lib.RosettaModelObjectBuilder parent)
      Specified by:
      map in interface MappingDelegate
    • mapBasic

      public <T> void mapBasic(Path synonymPath, Optional<T> instance, com.rosetta.model.lib.RosettaModelObjectBuilder parent)
      Specified by:
      mapBasic in interface MappingDelegate
    • mapBasic

      public <T> void mapBasic(Path synonymPath, T instance, com.rosetta.model.lib.RosettaModelObjectBuilder parent)
    • mapBasic

      public <T> void mapBasic(Path synonymPath, Collection<? extends T> instance, com.rosetta.model.lib.RosettaModelObjectBuilder parent)
      Specified by:
      mapBasic in interface MappingDelegate
    • getModelPath

      public com.rosetta.model.lib.path.RosettaPath getModelPath()
      Specified by:
      getModelPath in interface MappingDelegate
    • getSynonymPaths

      public List<Path> getSynonymPaths()
      Specified by:
      getSynonymPaths in interface MappingDelegate
    • getMappings

      protected List<Mapping> getMappings()
    • getContext

      protected MappingContext getContext()
    • addInvokedTask

      protected void addInvokedTask(CompletableFuture<?> invokedTask)
      Collect any mapping tasks invoked during mapping so we can wait until they're complete before continuing.
    • setValueAndUpdateMappings

      protected void setValueAndUpdateMappings(String synonymPath, Consumer<String> setter)
    • setValueAndUpdateMappings

      protected void setValueAndUpdateMappings(Path synonymPath, Consumer<String> setter)
    • getValueAndUpdateMappings

      protected Optional<String> getValueAndUpdateMappings(Path synonymPath)
    • getSynonymToEnumMap

      protected SynonymToEnumMap getSynonymToEnumMap()