prefixes:
  # Original material data prefixes
  data: "https://dataportal.material-digital.de/dataset/f2bca6a2-04df-47cb-9439-589e46ba60e2/resource/7e6f6f23-1188-4de3-afbd-419219f39dbe/download/material_data_test_pa6gf30.json/"
  samm: "urn:samm:org.eclipse.esmf.samm:meta-model:2.2.0#"
  samm-c: "urn:samm:org.eclipse.esmf.samm:characteristic:2.2.0#"
  unit: "urn:samm:org.eclipse.esmf.samm:unit:2.2.0#"
  mat: "urn:samm:io.catenax.material_data:1.0.0#"
  xsd: "http://www.w3.org/2001/XMLSchema#"
  # UsageData prefixes
  usage: "urn:samm:io.catenax.usagedata:1.0.0#"
  ext-spectrum: "urn:samm:io.catenax.classified_load_spectrum:2.0.0#"

base: '#'

sources:
  # -------------------------------------------------------
  # Existing sources (MaterialData) — UNCHANGED
  # -------------------------------------------------------
  root:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/4a3e6125-0416-490b-995f-e59ef6cb677b/download/materialdata_sample.json'
    iterator: '$'
    referenceFormulation: jsonpath

  materialInformation:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/4a3e6125-0416-490b-995f-e59ef6cb677b/download/materialdata_sample.json'
    iterator: '$.materialInformation'
    referenceFormulation: jsonpath

  mechanicalProperty:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/4a3e6125-0416-490b-995f-e59ef6cb677b/download/materialdata_sample.json'
    iterator: '$.mechanicalProperty'
    referenceFormulation: jsonpath

  physicalProperty:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/4a3e6125-0416-490b-995f-e59ef6cb677b/download/materialdata_sample.json'
    iterator: '$.physicalProperty'
    referenceFormulation: jsonpath

  thermophysicalProperty:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/4a3e6125-0416-490b-995f-e59ef6cb677b/download/materialdata_sample.json'
    iterator: '$.thermophysicalProperty'
    referenceFormulation: jsonpath

  linearThermalExpansionCoefficient:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/4a3e6125-0416-490b-995f-e59ef6cb677b/download/materialdata_sample.json'
    iterator: '$.thermophysicalProperty.linearThermalExpansionCoefficient'
    referenceFormulation: jsonpath

  pvt_items:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/4a3e6125-0416-490b-995f-e59ef6cb677b/download/materialdata_sample.json'
    iterator: '$.pvt[*]'
    referenceFormulation: jsonpath

  # -------------------------------------------------------
  # Existing sources (UsageData — load spectrum) — UNCHANGED
  # -------------------------------------------------------
  usage_root:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/0b1191ae-bd28-4cd4-a480-67b19843ed99/download/usagedata-loadcollective_sample.json'
    iterator: '$'
    referenceFormulation: jsonpath

  componentStatus:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/0b1191ae-bd28-4cd4-a480-67b19843ed99/download/usagedata-loadcollective_sample.json'
    iterator: '$.componentStatus'
    referenceFormulation: jsonpath

  loadSpectrum:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/0b1191ae-bd28-4cd4-a480-67b19843ed99/download/usagedata-loadcollective_sample.json'
    iterator: '$.loadSpectrum'
    referenceFormulation: jsonpath

  mechanicalLoadSpectrumLevelOfInstance_items:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/0b1191ae-bd28-4cd4-a480-67b19843ed99/download/usagedata-loadcollective_sample.json'
    iterator: '$.loadSpectrum.mechanicalLoadSpectrumLevelOfInstance[*]'
    referenceFormulation: jsonpath

  mechanicalLoadSpectrumLevelOfFleet:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/0b1191ae-bd28-4cd4-a480-67b19843ed99/download/usagedata-loadcollective_sample.json'
    iterator: '$.loadSpectrum.mechanicalLoadSpectrumLevelOfFleet'
    referenceFormulation: jsonpath

  temperatureSpectrum:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/0b1191ae-bd28-4cd4-a480-67b19843ed99/download/usagedata-loadcollective_sample.json'
    iterator: '$.loadSpectrum.temperatureSpectrum'
    referenceFormulation: jsonpath

  # -------------------------------------------------------
  # New sources (UsageData — service life)
  # NOTE: Replace YOUR_SERVICE_LIFE_JSON_URL with the actual
  #       endpoint serving the ServiceLife JSON data.
  # -------------------------------------------------------
  servicelife_root:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/191635ed-508b-4c64-87bf-fad75788bd67/download/usagedata_servicelife_sample.'
    iterator: '$'
    referenceFormulation: jsonpath

  serviceLife:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/191635ed-508b-4c64-87bf-fad75788bd67/download/usagedata_servicelife_sample.L'
    iterator: '$.serviceLife'
    referenceFormulation: jsonpath

  chemicalServiceLifeComponent:
    access: 'https://dataportal.material-digital.de/dataset/2347d95a-4588-44da-9e94-26330bcbf7c5/resource/191635ed-508b-4c64-87bf-fad75788bd67/download/usagedata_servicelife_sample.'
    iterator: '$.serviceLife.chemicalServiceLifeComponent'
    referenceFormulation: jsonpath

mappings:
  # =======================================================
  # Existing mappings (MaterialData) — UNCHANGED
  # =======================================================
  MaterialData:
    sources: root
    s: "MaterialData_$(materialInformation.materialIdentifier)"
    po:
      - [a, mat:MaterialData]
      - p: mat:materialInformation
        o:
          mapping: MaterialInformationEntity
      - p: mat:mechanicalProperty
        o:
          mapping: MechanicalPropertyEntity
      - p: mat:physicalProperty
        o:
          mapping: PhysicalPropertyEntity
      - p: mat:thermophysicalProperty
        o:
          mapping: ThermophysicalPropertyEntity

  MaterialInformationEntity:
    sources: materialInformation
    s: "MaterialInformation_$(materialIdentifier)"
    po:
      - [a, mat:MaterialInformationEntity]
      - [mat:materialName, "$(materialName)"]
      - [mat:materialIdentifier, "$(materialIdentifier)"]

  MechanicalPropertyEntity:
    sources: mechanicalProperty
    s: "MechanicalProperty_$(flexuralStrength)_$(youngsModulus)"
    po:
      - [a, mat:MechanicalPropertyEntity]
      - [mat:flexuralStrength, "$(flexuralStrength)"]
      - [mat:impactStrength, "$(impactStrength)"]
      - [mat:youngsModulus, "$(youngsModulus)"]
      - [mat:strainAtBreak, "$(strainAtBreak)"]
      - [mat:stressAtBreak, "$(stressAtBreak)"]
      - [mat:flexuralModulus, "$(flexuralModulus)"]

  PhysicalPropertyEntity:
    sources: physicalProperty
    s: "PhysicalProperty_$(density)"
    po:
      - [a, mat:PhysicalPropertyEntity]
      - [mat:density, "$(density)"]

  ThermophysicalPropertyEntity:
    sources: thermophysicalProperty
    s: "ThermophysicalProperty_$(humidity)_$(meltingTemperature)"
    po:
      - [a, mat:ThermophysicalPropertyEntity]
      - [mat:humidity, "$(humidity)"]
      - [mat:glassTransitionTemperature, "$(glassTransitionTemperature)"]
      - [mat:meltingTemperature, "$(meltingTemperature)"]
      - [mat:waterAbsorption, "$(waterAbsorption)"]
      - p: mat:linearThermalExpansionCoefficient
        o:
          mapping: LinearThermalExpansionCoefficientEntity
      - p: mat:pvt
        o:
          mapping: PvtEntity

  LinearThermalExpansionCoefficientEntity:
    sources: linearThermalExpansionCoefficient
    s: "LinearThermalExpansionCoefficient_$(linearThermalExpansionCoefficientParallel)"
    po:
      - [a, mat:LinearThermalExpansionCoefficientEntity]
      - [mat:linearThermalExpansionCoefficientTransverse, "$(linearThermalExpansionCoefficientTransverse)"]
      - [mat:linearThermalExpansionCoefficientParallel, "$(linearThermalExpansionCoefficientParallel)"]

  PvtEntity:
    sources: pvt_items
    s: "Pvt_$(temperature)_$(pressure)"
    po:
      - [a, mat:PvtEntity]
      - [mat:temperature, "$(temperature)"]
      - [mat:specificVolume, "$(specificVolume)"]
      - [mat:pressure, "$(pressure)"]

  # =======================================================
  # Existing mappings (UsageData — load spectrum) — UNCHANGED
  # =======================================================
  UsageData:
    sources: usage_root
    s: "UsageData_$(componentStatus.ageOfComponent)"
    po:
      - [a, usage:UsageData]
      - p: usage:componentStatus
        o:
          mapping: ComponentStatusEntity
      - p: usage:loadSpectrum
        o:
          mapping: LoadSpectrumEntity

  ComponentStatusEntity:
    sources: componentStatus
    s: "ComponentStatus_$(ageOfComponent)"
    po:
      - [a, usage:ComponentStatus]
      - [usage:ageOfComponent, "$(ageOfComponent)", xsd:float]
      - [usage:incidents, "$(incidents)", xsd:string]
      - [ext-spectrum:mileage, "$(mileage)"]

  LoadSpectrumEntity:
    sources: loadSpectrum
    s: "LoadSpectrum_$(environmentalSpectrum)"
    po:
      - [a, usage:LoadSpectrum]
      - [usage:environmentalSpectrum, "$(environmentalSpectrum)", xsd:string]
      - p: usage:mechanicalLoadSpectrumLevelOfInstance
        o:
          mapping: MechanicalLoadSpectrumLevelOfInstanceEntity
      - p: usage:mechanicalLoadSpectrumLevelOfFleet
        o:
          mapping: MechanicalLoadSpectrumLevelOfFleetEntity
      - p: usage:temperatureSpectrum
        o:
          mapping: TemperatureSpectrumEntity

  MechanicalLoadSpectrumLevelOfInstanceEntity:
    sources: mechanicalLoadSpectrumLevelOfInstance_items
    s: "MechanicalLoadSpectrumLevelOfInstance_$(mechanicalLoadAmplitudelevelOfInstance)_$(mechanicalLoadCycleslevelOfInstance)"
    po:
      - [a, usage:MechanicalLoadSpectrumLevelOfInstance]
      - [usage:mechanicalLoadAmplitudelevelOfInstance, "$(mechanicalLoadAmplitudelevelOfInstance)"]
      - [usage:mechanicalLoadCycleslevelOfInstance, "$(mechanicalLoadCycleslevelOfInstance)", xsd:string]

  MechanicalLoadSpectrumLevelOfFleetEntity:
    sources: mechanicalLoadSpectrumLevelOfFleet
    s: "MechanicalLoadSpectrumLevelOfFleet_$(mechanicalLoadAmplitudelevelOfFleet)"
    po:
      - [a, usage:MechanicalLoadSpectrumLevelOfFleet]
      - [usage:mechanicalLoadCycleslevelOfFleet, "$(mechanicalLoadCycleslevelOfFleet)"]
      - [usage:mechanicalLoadAmplitudelevelOfFleet, "$(mechanicalLoadAmplitudelevelOfFleet)", xsd:string]

  TemperatureSpectrumEntity:
    sources: temperatureSpectrum
    s: "TemperatureSpectrum_$(temperatureOverCycles)"
    po:
      - [a, usage:TemperatureSpectrum]
      - [usage:temperatureOverCycles, "$(temperatureOverCycles)", xsd:string]

  # =======================================================
  # New mappings (UsageData — service life)
  # =======================================================

  # Root ServiceLife UsageData aspect — links to ServiceLifeComponent
  UsageDataServiceLife:
    sources: servicelife_root
    s: "UsageDataServiceLife_$(serviceLife.mechanicalServiceLifeComponent)"
    po:
      - [a, usage:UsageData]
      - p: usage:serviceLife
        o:
          mapping: ServiceLifeComponentEntity

  # ServiceLifeComponent entity
  # Maps mechanicalServiceLifeComponent and thermalServiceLifeComponent
  # as xsd:float values in hours, and links to the nested
  # ChemicalMediumServiceLifeComponent entity
  ServiceLifeComponentEntity:
    sources: serviceLife
    s: "ServiceLifeComponent_$(mechanicalServiceLifeComponent)_$(thermalServiceLifeComponent)"
    po:
      - [a, usage:ServiceLifeComponent]
      - [usage:mechanicalServiceLifeComponent, "$(mechanicalServiceLifeComponent)", xsd:float]
      - [usage:thermalServiceLifeComponent, "$(thermalServiceLifeComponent)", xsd:float]
      - p: usage:chemicalServiceLifeComponent
        o:
          mapping: ChemicalMediumServiceLifeComponentEntity

  # ChemicalMediumServiceLifeComponent entity
  # Maps chemicalMediumServiceLifeComponent and
  # humidityMediumServiceLifeComponent as xsd:float values in hours
  ChemicalMediumServiceLifeComponentEntity:
    sources: chemicalServiceLifeComponent
    s: "ChemicalMediumServiceLifeComponent_$(chemicalMediumServiceLifeComponent)_$(humidityMediumServiceLifeComponent)"
    po:
      - [a, usage:ChemicalMediumServiceLifeComponent]
      - [usage:chemicalMediumServiceLifeComponent, "$(chemicalMediumServiceLifeComponent)", xsd:float]
      - [usage:humidityMediumServiceLifeComponent, "$(humidityMediumServiceLifeComponent)", xsd:float]