Open miwamasa opened 1 month ago
looking at the catena-x version of BatteryPass.ttl and DigitalProductPassport.ttl, following might work.
:CarbonFootprintPerLifecycleStageEntity a samm:Entity ;
samm:description "The carbon footprint of the battery as share of total Battery Carbon Footprint, differentiated per life cycle stage"@en ;
samm:properties ( :lifecycleStage :carbonFootprint [ samm:property :footprintUnit; samm:payloadName "unit" ]) .
and then put footprintUnit
:footprintUnit a samm:Property ;
samm:preferredName "Footprint Unit"@en ;
samm:description "The unit of measurement of the environmental impact category. For each impact category a specific unit is used. If an aggregation is used, utilize the normalization and weighting methods used in the referenced rulebook."@en ;
samm:characteristic samm-c:Text ;
samm:exampleValue "kg CO2 / kWh" .
The result is..
{
"carbonFootprintPerLifecycleStage" : [ {
"lifecycleStage" : "RawMaterialExtraction",
"carbonFootprint" : -1.7976931348623157E308,
"unit" : "kg CO2 / kWh"
} ],
"carbonFootprintStudy" : "telnet://192.0.2.16:80/",
"batteryCarbonFootprint" : -1.7976931348623157E308,
"carbonFootprintPerformanceClass" : "eOMtThyhVNLWUZNRcBaQKxI"
}
above is just a walkaround. in "CarbonFootprint-aas.xml", unit is expanded.
So the possibility is the original ttl is right; It seems "sam-c:unit" is not properly expanded for json/jsonschema with samm-cli with respect to its definition.
I have tried with samm-cli-2.9.5.jar
:CarbonFootprintValue a samm-c:Measurement ;
samm:dataType xsd:double ;
samm-c:unit :kilogramperkilowatthour .
Thank you for the hint. Probably a bug in the generate function of the SAMM Aspect Modeller, that I used. Maye it is fixed in the latest update.
For Carbonfootprint. sample json is
where in ttl file, unit seems to be defined with its textual appearance;