Function makeDefaultMappingStrategyContext

Creating a context for the mapping requires a lot of boilerplate code. Thus, this function is provided to facilitate the creation of the context.

the strategy context is a collection of functions and values that are used by the mapping strategies.

  • Parameters

    • dataStore: MappingStoreProbe

      the data store to use

    • createEntityIRI: (typeIRI: string) => string

      a function that creates a new IRI for an entity of a given type

    • typeIRIToTypeName: IRIToStringFn
    • primaryFields: Partial

      the primary fields for all types that are used in the mapping

    • OptionalnormDataMappings: NormDataMappings<DeclarativeMapping>

      the mappings that are used to map norm data to the data store

    • OptionalauthorityAccess: Record<string, AuthorityConfiguration>

      the authority access configuration

    • OptionaldisableLogging: boolean

      whether to disable logging

    • OptionaldefaultAuthorityIRI: string

      default authority IRI for strategies that need one (no framework default — pass the authority your mappings target)

    Returns StrategyContext