prefixes:
  data: https://raw.githubusercontent.com/eclipse-tractusx/sldt-semantic-models/refs/heads/main/io.catenax.batch/3.0.1/gen/Batch.json/
  samm: urn:samm:org.eclipse.esmf.samm:meta-model:2.3.0#
  ext-built: urn:samm:io.catenax.shared.part_site_information_as_built:2.0.0#
  ext-classification: urn:samm:io.catenax.shared.part_classification:1.0.0#
  cx: urn:samm:io.catenax.batch:3.0.1#
  xsd: http://www.w3.org/2001/XMLSchema#
base: '#'
sources:
  root:
    access: https://raw.githubusercontent.com/eclipse-tractusx/sldt-semantic-models/refs/heads/main/io.catenax.batch/3.0.1/gen/Batch.json
    iterator: $
    referenceFormulation: jsonpath
  identifiers:
    access: https://raw.githubusercontent.com/eclipse-tractusx/sldt-semantic-models/refs/heads/main/io.catenax.batch/3.0.1/gen/Batch.json
    iterator: $.localIdentifiers[*]
    referenceFormulation: jsonpath
  partClass_items:
    access: https://raw.githubusercontent.com/eclipse-tractusx/sldt-semantic-models/refs/heads/main/io.catenax.batch/3.0.1/gen/Batch.json
    iterator: $.partTypeInformation.partClassification[*]
    referenceFormulation: jsonpath
  sites_items:
    access: https://raw.githubusercontent.com/eclipse-tractusx/sldt-semantic-models/refs/heads/main/io.catenax.batch/3.0.1/gen/Batch.json
    iterator: $.manufacturingInformation.sites[*]
    referenceFormulation: jsonpath
mappings:
  batch:
    sources: root
    s: Batch_$(catenaXId)
    po:
      - [a, cx:Batch]
      - [cx:catenaXId, $(catenaXId)]
      - p: cx:localIdentifiers
        o:
          mapping: identifiers_list
      - p: cx:manufacturingInformation
        o:
          mapping: manuinfo
      - p: cx:partTypeInformation
        o:
          mapping: parttypeinfo
  identifiers_list:
    sources: identifiers
    s: LocalIdentifier_$(key)_$(value)
    po:
      - [a, cx:KeyValueList]
      - [cx:key, $(key)]
      - [cx:value, $(value)]
  manuinfo:
    sources: root
    s: ManufacturingEntity_$(.manufacturingInformation.country)_$(.manufacturingInformation.date)
    po:
      - [a, cx:ManufacturingEntity]
      - [cx:date, $(.manufacturingInformation.date)]
      - [cx:country, $(.manufacturingInformation.country)]
      - p: ext-built:sites
        o:
          mapping: sites
  parttypeinfo:
    sources: root
    s: PartTypeInformation_$(.partTypeInformation.manufacturerPartId)
    po:
      - [a, cx:PartTypeInformationEntity]
      - [cx:manufacturerPartId, $(.partTypeInformation.manufacturerPartId)]
      - [cx:nameAtManufacturer, $(.partTypeInformation.nameAtManufacturer)]
      - p: ext-classification:partClassification
        o:
          mapping: partClassification
  sites:
    sources: sites_items
    s: Site_$(catenaXsiteId)
    po:
      - [a, ext-built:SitesEntity]
      - [ext-built:catenaXsiteId, $(catenaXsiteId)]
      - [ext-built:function, $(function)]
  partClassification:
    sources: partClass_items
    s: Classification_$(classificationID)
    po:
      - [a, ext-classification:ClassificationEntity]
      - [ext-classification:classificationStandard, $(classificationStandard)]
      - [ext-classification:classificationDescription, $(classificationDescription)]
      - [ext-classification:classificationID, $(classificationID)]
