@prefix sh:     <http://www.w3.org/ns/shacl#> .
@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:    <http://www.w3.org/2002/07/owl#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix dpp:    <https://www.dpp-interoperability.wiki/vocab/v1/dpp#> .
@prefix battery: <https://www.dpp-interoperability.wiki/vocab/v1/battery#> .
@prefix qudt:   <http://qudt.org/schema/qudt/> .

# =============================================================================
# SHACL Shapes for Battery Extension Vocabulary v0.1
# Companion to: https://www.dpp-interoperability.wiki/vocab/v1/battery#
# =============================================================================

<https://www.dpp-interoperability.wiki/vocab/v1/battery.shacl>
    a owl:Ontology ;
    rdfs:label "Battery Extension SHACL Shapes" ;
    rdfs:comment "SHACL validation shapes for the DPP Battery Extension vocabulary v0.1. Covers chemistry, performance, materials, durability, status, circularity, and supply chain." ;
    dcterms:created "2026-03-05"^^xsd:date ;
    rdfs:seeAlso <https://www.dpp-interoperability.wiki/vocab/v1/battery#> .

# -----------------------------------------------------------------------------
# BatteryExtension
# -----------------------------------------------------------------------------
battery:BatteryExtensionShape
    a sh:NodeShape ;
    sh:targetClass battery:BatteryExtension ;
    rdfs:label "Battery Extension shape" ;
    sh:property [
        sh:path battery:chemistry ;
        sh:class battery:Chemistry ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
        sh:name "chemistry" ;
    ] ;
    sh:property [
        sh:path battery:performance ;
        sh:class battery:Performance ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
        sh:name "performance" ;
    ] ;
    sh:property [
        sh:path battery:materials ;
        sh:class battery:BatteryRawMaterials ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
        sh:name "materials" ;
    ] ;
    sh:property [
        sh:path battery:durability ;
        sh:class battery:Durability ;
        sh:maxCount 1 ;
        sh:name "durability" ;
    ] ;
    sh:property [
        sh:path battery:batteryStatus ;
        sh:class battery:BatteryStatus ;
        sh:maxCount 1 ;
        sh:name "batteryStatus" ;
    ] ;
    sh:property [
        sh:path battery:circularity ;
        sh:class battery:Circularity ;
        sh:maxCount 1 ;
        sh:name "circularity" ;
    ] ;
    sh:property [
        sh:path battery:supplyChain ;
        sh:class battery:SupplyChain ;
        sh:maxCount 1 ;
        sh:name "supplyChain" ;
    ] ;
    sh:property [
        sh:path battery:declarationOfConformityLink ;
        sh:datatype xsd:anyURI ;
        sh:maxCount 1 ;
        sh:name "declarationOfConformityLink" ;
    ] ;
    sh:property [
        sh:path battery:testReportsLinks ;
        sh:datatype xsd:anyURI ;
        sh:name "testReportsLinks" ;
    ] .

# -----------------------------------------------------------------------------
# Chemistry
# -----------------------------------------------------------------------------
battery:ChemistryShape
    a sh:NodeShape ;
    sh:targetClass battery:Chemistry ;
    rdfs:label "Chemistry shape" ;
    sh:property [
        sh:path battery:chemistryType ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "chemistryType" ;
    ] ;
    sh:property [
        sh:path battery:anodeMaterial ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "anodeMaterial" ;
    ] ;
    sh:property [
        sh:path battery:cathodeMaterial ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "cathodeMaterial" ;
    ] ;
    sh:property [
        sh:path battery:electrolyteType ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "electrolyteType" ;
    ] ;
    sh:property [
        sh:path battery:materialComposition ;
        sh:class battery:MaterialCompositionEntry ;
        sh:name "materialComposition" ;
    ] .

# -----------------------------------------------------------------------------
# Performance
# -----------------------------------------------------------------------------
battery:PerformanceShape
    a sh:NodeShape ;
    sh:targetClass battery:Performance ;
    rdfs:label "Performance shape" ;
    sh:property [
        sh:path battery:roundTripEfficiency ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxInclusive 100.0 ;
        sh:maxCount 1 ;
        sh:name "roundTripEfficiency" ;
    ] ;
    sh:property [
        sh:path battery:powerCapability ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "powerCapability" ;
    ] ;
    sh:property [
        sh:path battery:ratedCapacity ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "ratedCapacity" ;
    ] ;
    sh:property [
        sh:path battery:ratedVoltage ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "ratedVoltage" ;
    ] ;
    sh:property [
        sh:path battery:nominalVoltage ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "nominalVoltage" ;
    ] ;
    sh:property [
        sh:path battery:ratedEnergy ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "ratedEnergy" ;
    ] ;
    sh:property [
        sh:path battery:selfDischargeRate ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "selfDischargeRate" ;
    ] ;
    sh:property [
        sh:path battery:internalResistance ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "internalResistance" ;
    ] .

# -----------------------------------------------------------------------------
# BatteryRawMaterials
# -----------------------------------------------------------------------------
battery:BatteryRawMaterialsShape
    a sh:NodeShape ;
    sh:targetClass battery:BatteryRawMaterials ;
    rdfs:label "Battery Raw Materials shape" ;
    sh:property [
        sh:path battery:materialName ;
        sh:datatype xsd:string ;
        sh:name "materialName" ;
    ] ;
    sh:property [
        sh:path battery:sourceCountry ;
        sh:datatype xsd:string ;
        sh:name "sourceCountry" ;
    ] ;
    sh:property [
        sh:path battery:criticalRawMaterials ;
        sh:class battery:MaterialCompositionEntry ;
        sh:name "criticalRawMaterials" ;
    ] ;
    sh:property [
        sh:path battery:recycledContent ;
        sh:class battery:RecycledContentEntry ;
        sh:name "recycledContent" ;
    ] ;
    sh:property [
        sh:path battery:recycledContentByElement ;
        sh:class battery:RecycledContentEntry ;
        sh:name "recycledContentByElement" ;
    ] .

# -----------------------------------------------------------------------------
# MaterialCompositionEntry
# -----------------------------------------------------------------------------
battery:MaterialCompositionEntryShape
    a sh:NodeShape ;
    sh:targetClass battery:MaterialCompositionEntry ;
    rdfs:label "Material Composition Entry shape" ;
    sh:property [
        sh:path battery:element ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "element" ;
    ] ;
    sh:property [
        sh:path battery:materialRole ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "materialRole" ;
    ] ;
    sh:property [
        sh:path battery:massPercentage ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxInclusive 100.0 ;
        sh:maxCount 1 ;
        sh:name "massPercentage" ;
    ] ;
    sh:property [
        sh:path battery:recycledContentPercentage ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxInclusive 100.0 ;
        sh:maxCount 1 ;
        sh:name "recycledContentPercentage" ;
    ] .

# -----------------------------------------------------------------------------
# RecycledContentEntry
# -----------------------------------------------------------------------------
battery:RecycledContentEntryShape
    a sh:NodeShape ;
    sh:targetClass battery:RecycledContentEntry ;
    rdfs:label "Recycled Content Entry shape" ;
    sh:property [
        sh:path battery:element ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "element" ;
    ] ;
    sh:property [
        sh:path battery:recycledPercentage ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxInclusive 100.0 ;
        sh:maxCount 1 ;
        sh:name "recycledPercentage" ;
    ] .

# -----------------------------------------------------------------------------
# Durability
# -----------------------------------------------------------------------------
battery:DurabilityShape
    a sh:NodeShape ;
    sh:targetClass battery:Durability ;
    rdfs:label "Durability shape" ;
    sh:property [
        sh:path battery:designedLifecycleCycles ;
        sh:datatype xsd:integer ;
        sh:minInclusive 0 ;
        sh:maxCount 1 ;
        sh:name "designedLifecycleCycles" ;
    ] ;
    sh:property [
        sh:path battery:designedLifecycleYears ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxCount 1 ;
        sh:name "designedLifecycleYears" ;
    ] ;
    sh:property [
        sh:path battery:capacityFadePerYear ;
        sh:datatype xsd:double ;
        sh:maxCount 1 ;
        sh:name "capacityFadePerYear" ;
    ] ;
    sh:property [
        sh:path battery:powerFadePerYear ;
        sh:datatype xsd:double ;
        sh:maxCount 1 ;
        sh:name "powerFadePerYear" ;
    ] ;
    sh:property [
        sh:path battery:impedanceGrowthPerYear ;
        sh:datatype xsd:double ;
        sh:maxCount 1 ;
        sh:name "impedanceGrowthPerYear" ;
    ] ;
    sh:property [
        sh:path battery:expectedLifetime ;
        sh:class battery:ExpectedLifetime ;
        sh:maxCount 1 ;
        sh:name "expectedLifetime" ;
    ] ;
    sh:property [
        sh:path battery:cycleLifeTest ;
        sh:class battery:CycleLifeTest ;
        sh:maxCount 1 ;
        sh:name "cycleLifeTest" ;
    ] ;
    sh:property [
        sh:path battery:operatingTemperatureRange ;
        sh:class battery:OperatingTemperatureRange ;
        sh:maxCount 1 ;
        sh:name "operatingTemperatureRange" ;
    ] .

# -----------------------------------------------------------------------------
# ExpectedLifetime
# -----------------------------------------------------------------------------
battery:ExpectedLifetimeShape
    a sh:NodeShape ;
    sh:targetClass battery:ExpectedLifetime ;
    rdfs:label "Expected Lifetime shape" ;
    sh:property [
        sh:path battery:lifetimeYears ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxCount 1 ;
        sh:name "lifetimeYears" ;
    ] ;
    sh:property [
        sh:path battery:lifetimeCycles ;
        sh:datatype xsd:integer ;
        sh:minInclusive 0 ;
        sh:maxCount 1 ;
        sh:name "lifetimeCycles" ;
    ] .

# -----------------------------------------------------------------------------
# CycleLifeTest
# -----------------------------------------------------------------------------
battery:CycleLifeTestShape
    a sh:NodeShape ;
    sh:targetClass battery:CycleLifeTest ;
    rdfs:label "Cycle Life Test shape" ;
    sh:property [
        sh:path battery:testProtocol ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "testProtocol" ;
    ] ;
    sh:property [
        sh:path battery:endOfLifeThreshold ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxInclusive 100.0 ;
        sh:maxCount 1 ;
        sh:name "endOfLifeThreshold" ;
    ] .

# -----------------------------------------------------------------------------
# OperatingTemperatureRange
# -----------------------------------------------------------------------------
battery:OperatingTemperatureRangeShape
    a sh:NodeShape ;
    sh:targetClass battery:OperatingTemperatureRange ;
    rdfs:label "Operating Temperature Range shape" ;
    sh:property [
        sh:path battery:minTemperature ;
        sh:datatype xsd:double ;
        sh:maxCount 1 ;
        sh:name "minTemperature" ;
    ] ;
    sh:property [
        sh:path battery:maxTemperature ;
        sh:datatype xsd:double ;
        sh:maxCount 1 ;
        sh:name "maxTemperature" ;
    ] .

# -----------------------------------------------------------------------------
# BatteryStatus
# -----------------------------------------------------------------------------
battery:BatteryStatusShape
    a sh:NodeShape ;
    sh:targetClass battery:BatteryStatus ;
    rdfs:label "Battery Status shape" ;
    sh:property [
        sh:path battery:stateOfHealth ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxInclusive 100.0 ;
        sh:maxCount 1 ;
        sh:name "stateOfHealth" ;
    ] ;
    sh:property [
        sh:path battery:stateOfCharge ;
        sh:datatype xsd:double ;
        sh:minInclusive 0.0 ;
        sh:maxInclusive 100.0 ;
        sh:maxCount 1 ;
        sh:name "stateOfCharge" ;
    ] ;
    sh:property [
        sh:path battery:fullChargeCycles ;
        sh:datatype xsd:integer ;
        sh:minInclusive 0 ;
        sh:maxCount 1 ;
        sh:name "fullChargeCycles" ;
    ] ;
    sh:property [
        sh:path battery:remainingCapacity ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "remainingCapacity" ;
    ] ;
    sh:property [
        sh:path battery:currentInternalResistance ;
        sh:class qudt:QuantityValue ;
        sh:maxCount 1 ;
        sh:name "currentInternalResistance" ;
    ] ;
    sh:property [
        sh:path battery:deepOverchargeEvents ;
        sh:class battery:OverchargeEvent ;
        sh:name "deepOverchargeEvents" ;
    ] .

# -----------------------------------------------------------------------------
# OverchargeEvent
# -----------------------------------------------------------------------------
battery:OverchargeEventShape
    a sh:NodeShape ;
    sh:targetClass battery:OverchargeEvent ;
    rdfs:label "Overcharge Event shape" ;
    sh:property [
        sh:path battery:eventTimestamp ;
        sh:datatype xsd:dateTime ;
        sh:maxCount 1 ;
        sh:name "eventTimestamp" ;
    ] ;
    sh:property [
        sh:path battery:eventSeverity ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "eventSeverity" ;
    ] .

# -----------------------------------------------------------------------------
# Circularity
# -----------------------------------------------------------------------------
battery:CircularityShape
    a sh:NodeShape ;
    sh:targetClass battery:Circularity ;
    rdfs:label "Circularity shape" ;
    sh:property [
        sh:path battery:dismantlingInstructions ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "dismantlingInstructions" ;
    ] ;
    sh:property [
        sh:path battery:disassemblyManualLink ;
        sh:datatype xsd:anyURI ;
        sh:maxCount 1 ;
        sh:name "disassemblyManualLink" ;
    ] ;
    sh:property [
        sh:path battery:recyclingInstructions ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "recyclingInstructions" ;
    ] ;
    sh:property [
        sh:path battery:safetyInstructions ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "safetyInstructions" ;
    ] ;
    sh:property [
        sh:path battery:endOfLifeCollection ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "endOfLifeCollection" ;
    ] ;
    sh:property [
        sh:path battery:collectionPointsLink ;
        sh:datatype xsd:anyURI ;
        sh:maxCount 1 ;
        sh:name "collectionPointsLink" ;
    ] ;
    sh:property [
        sh:path battery:preparationForReuseStatus ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
        sh:name "preparationForReuseStatus" ;
    ] .

# -----------------------------------------------------------------------------
# SupplyChain
# -----------------------------------------------------------------------------
battery:SupplyChainShape
    a sh:NodeShape ;
    sh:targetClass battery:SupplyChain ;
    rdfs:label "Supply Chain shape" ;
    sh:property [
        sh:path battery:dueDiligence ;
        sh:class battery:DueDiligenceReport ;
        sh:name "dueDiligence" ;
    ] ;
    sh:property [
        sh:path battery:dueDiligenceReportLink ;
        sh:datatype xsd:anyURI ;
        sh:maxCount 1 ;
        sh:name "dueDiligenceReportLink" ;
    ] .

# -----------------------------------------------------------------------------
# DueDiligenceReport
# -----------------------------------------------------------------------------
battery:DueDiligenceReportShape
    a sh:NodeShape ;
    sh:targetClass battery:DueDiligenceReport ;
    rdfs:label "Due Diligence Report shape" .
