Closed Sveino closed 12 months ago
"dcterms": "http://purl.org/dc/terms/",
"dcat": "http://www.w3.org/ns/dcat#",
"prov": "http://www.w3.org/ns/prov#"
[x] Need to update: dcterm:created to dcterms:created
[x] "@type": "http://www.w3.org/2001/XMLSchema#date" needs to be changed to "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
[x] change generatedAt to generatedAtTime
[ ] Fix DIGIN
[ ] Update accessRights, license, temperal
Updated CIMJSON-LD header (the graph is just included to have a complete set):
{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"cim": "http://iec.ch/TC57/CIM100#",
"md": "http://iec.ch/TC57/61970-552/ModelDescription/1#",
"eu": "http://iec.ch/TC57/CIM100-European#",
"dcterms": "http://purl.org/dc/terms/",
"dcat": "http://www.w3.org/ns/dcat#",
"prov": "http://www.w3.org/ns/prov#"
},
"@id": "urn:uuid:c47d4310-b8ee-480d-9cf3-e53a81630981",
"prov:generatedAtTime": {
"@value": "2023-01-17T202532Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"dcterms:created": {
"@value": "2022-03-30",
"@type": "http://www.w3.org/2001/XMLSchema#date"
},
"dcterms:title": "DIGIN10-30-LV1_EQ",
"dcterms:description": [
{
"@value": "DIGIN10 CGMES v3.0 Low Voltage 1 (LV1) Core Equipment (EQ) Model",
"@language": "en"
}
],
"dcat:version": "1",
"dcterms:publisher": {
"@id": "https://diginenergi.no/om-digin/",
"dcterms:title": "DIGIN"
},
"dcterms:temporal": {
"@type": "http://purl.org/dc/terms/PeriodOfTime",
"dcat:startDate": {
"@value": "2022-03-30T23:00:00Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"dcat:endDate": {
"@value": "2022-03-31T23:00:00Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
},
"dcterms:temporalResolution": {
"@type": "http://www.w3.org/2001/XMLSchema#duration",
"@value": "PT1H"
},
"dcterms:rights": "© 2023 Copyright",
"dcterms:rightHolder": "DIGIN",
"dcterms:license": {
"@id": "https://creativecommons.org/licenses/by-nc-sa/4.0/",
"dcterms:title": "CC BY-NC-SA 4.0"
},
"dcterms:accessRights": {
"@id": "http://publications.europa.eu/resource/authority/access-right/PUBLIC",
"dcterms:title": "PUBLIC"
},
"dcat:isVersionOf": "https://digin.no/baseprofile/DIGIN10-30-LV1_EQ",
"dcat:keyword": "EQ",
"dcterms:LocationPeriodOrJurisdiction": "https://diginenergi.no/DIGIN10/LV1",
"dcterms:conformsTo": [
"http://iec.ch/TC57/ns/CIM/CoreEquipment-EU/3.0",
"http://iec.ch/TC57/ns/CIM/CoreEquipment/4.0"
],
"dcterms:references": [
{
"@id": "urn:uuid:f4c70c71-77e2-410e-9903-cbd85305cdc4",
"dcterms:title": "DIGIN10-30-MV1-LV1_BM"
}
],
"@graph": [
{
"@id": "urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
"@type": "cim:ACLineSegment",
"cim:IdentifiedObject.description": "400V Telemarkstien 2 ACLineSegment 1",
"cim:IdentifiedObject.name": "04 TELEMA2 ACLS1",
"cim:Equipment.aggregate": false,
"cim:Equipment.normallyInService": true,
"cim:Conductor.length": 50.0,
"cim:ACLineSegment.bch": 0.0,
"cim:ACLineSegment.gch": 0.0,
"cim:ACLineSegment.r": 0.015999999945951,
"cim:ACLineSegment.x": 0.003769911221053,
"cim:PowerSystemResource.AssetDatasheet": {
"@id": "urn:uuid:d25f35ca-69fb-4c06-905b-67ec532e5f14"
},
"cim:Equipment.EquipmentContainer": {
"@id": "urn:uuid:64e21d95-8b55-b941-a923-b74087410a66"
},
"cim:ConductingEquipment.BaseVoltage": {
"@id": "urn:uuid:9598e4a0-67e5-4ad7-879c-c85a1f63159c"
}
}
]
}
CIMXML header after converting it from CIMJSON-LD:
The DCAT values are kept (with some loss of information) in addition to create the md.
<md:FullModel rdf:about="urn:uuid:c47d4310-b8ee-480d-9cf3-e53a81630981">
<md:Model.created>2022-03-30T16:26:37.958Z</md:Model.created>
<md:Model.scenarioTime>2022-03-30T23:00:00Z</md:Model.scenarioTime>
<md:Model.description>DIGIN10 CGMES v3.0 Low Voltage 1 (LV1) Core Equipment (EQ) Model</md:Model.description>
<md:Model.modelingAuthoritySet>https://diginenergi.no/DIGIN10/LV1</md:Model.modelingAuthoritySet>
<md:Model.profile>http://iec.ch/TC57/ns/CIM/CoreEquipment-EU/3.0</md:Model.profile>
<md:Model.profile>http://iec.ch/TC57/ns/CIM/CoreEquipment/4.0</md:Model.profile>
<md:Model.version>1</md:Model.version>
<md:Model.DependentOn rdf:resource="urn:uuid:f4c70c71-77e2-410e-9903-cbd85305cdc4" />
<dcterms:accessRights rdf:resource="http://publications.europa.eu/resource/authority/access-right/PUBLIC"/>
<dcterms:created>2022-03-30</dcterms:created>
<dcterms:publisher rdf:resource="https://diginenergi.no/om-digin/"/>
<dcterms:temporalResolution>PT1H</dcterms:temporalResolution>
<prov:generatedAtTime>2023-01-17T20:25:32+00:00</prov:generatedAtTime>
<dcterms:license rdf:resource="https://creativecommons.org/licenses/by-nc-sa/4.0/"/>
<dcterms:title>DIGIN10-30-LV1_EQ</dcterms:title>
<dcterms:rights>© 2023 Copyright</dcterms:rights>
<dcat:isVersionOf>https://digin.no/baseprofile/DIGIN10-30-LV1_EQ</dcat:isVersionOf>
<dcterms:LocationPeriodOrJurisdiction>https://diginenergi.no/DIGIN10/LV1</dcterms:LocationPeriodOrJurisdiction>
<dcat:version>1</dcat:version>
<dcterms:conformsTo>http://iec.ch/TC57/ns/CIM/CoreEquipment-EU/3.0</dcterms:conformsTo>
<dcterms:conformsTo>http://iec.ch/TC57/ns/CIM/CoreEquipment/4.0</dcterms:conformsTo>
<dcterms:description>DIGIN10 CGMES v3.0 Low Voltage 1 (LV1) Core Equipment (EQ) Model</dcterms:description>
<dcterms:rightHolder>DIGIN</dcterms:rightHolder>
<dcterms:references rdf:resource="urn:uuid:f4c70c71-77e2-410e-9903-cbd85305cdc4"/>
<dcat:startDate>2022-03-30T23:00:00</dcat:startDate>
<dcat:endDate>2022-03-31T23:00:00</dcat:endDate>
<dcat:keyword>EQ</dcat:keyword>
</md:FullModel>
hi @Sveino ! Converted the example to TriG:
riot --formatted trig model-header.jsonld > model-header.trig
Result, with added comments by me (search for #
)
@prefix cim: <http://iec.ch/TC57/CIM100#> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dcterms: <http://purl.org/dc/terms/> . # better use dct, which is more common
@prefix eu: <http://iec.ch/TC57/CIM100-European#> .
@prefix md: <http://iec.ch/TC57/61970-552/ModelDescription/1#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
# define and use prefix xsd:
<https://diginenergi.no/om-digin/>
dcterms:title "DIGIN" .
<urn:uuid:c47d4310-b8ee-480d-9cf3-e53a81630981> # lacks rdf:type
dcterms:LocationPeriodOrJurisdiction "https://diginenergi.no/DIGIN10/LV1" ; # this is a class not a prop so it cannot be used like this
dcterms:accessRights <http://publications.europa.eu/resource/authority/access-right/PUBLIC> ;
dcterms:conformsTo "http://iec.ch/TC57/ns/CIM/CoreEquipment/4.0" , "http://iec.ch/TC57/ns/CIM/CoreEquipment-EU/3.0" ; # better use URLs not strings
dcterms:created "2022-03-30"^^<http://www.w3.org/2001/XMLSchema#date> ;
dcterms:description "DIGIN10 CGMES v3.0 Low Voltage 1 (LV1) Core Equipment (EQ) Model"@en ;
dcterms:license <https://creativecommons.org/licenses/by-nc-sa/4.0/> ;
dcterms:publisher <https://diginenergi.no/om-digin/> ;
dcterms:references <urn:uuid:f4c70c71-77e2-410e-9903-cbd85305cdc4> ;
dcterms:rightHolder "DIGIN" ; # mistyped, should be dct:rightsHolder
dcterms:rights "© 2023 Copyright" ;
dcterms:temporal [ rdf:type dcterms:PeriodOfTime ; # this is 1 day (P1D), but the resolution is 1 hour (PT1H), is this correct?
dcat:endDate "2022-03-31T23:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
dcat:startDate "2022-03-30T23:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>
] ;
dcterms:temporalResolution "PT1H"^^<http://www.w3.org/2001/XMLSchema#duration> ; # wrong namespace, should be dcat:
dcterms:title "DIGIN10-30-LV1_EQ" ;
dcat:isVersionOf "https://digin.no/baseprofile/DIGIN10-30-LV1_EQ" ; # better use URL not string. Use same kind (URL or UUID) for both? Add some attributes of the MAS
dcat:keyword "EQ" ; # would be slightly better to use dct:subject with a resource describing what "EQ" is
dcat:version "1" ; # such string is not a very good choice because you don't want version "10" to sort before version "2". DCAT refers to https://www.w3.org/TR/dwbp/#VersioningInfo and https://snowplow.io/blog/introducing-schemaver-for-semantic-versioning-of-schemas/. Maybe provide an example like "01.0.0" and some guidance on formatting
prov:generatedAtTime "2023-01-17T202532Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> . # Lexical form '2023-01-17T202532Z' not valid for datatype XSD dateTime
<https://creativecommons.org/licenses/by-nc-sa/4.0/>
dcterms:title "CC BY-NC-SA 4.0" .
<urn:uuid:f4c70c71-77e2-410e-9903-cbd85305cdc4>
dcterms:title "DIGIN10-30-MV1-LV1_BM" .
<http://publications.europa.eu/resource/authority/access-right/PUBLIC>
dcterms:title "PUBLIC" .
<urn:uuid:c47d4310-b8ee-480d-9cf3-e53a81630981> { # good! This says that the statements are in the named graph that represents the model
<urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9>
rdf:type cim:ACLineSegment ;
cim:ACLineSegment.bch 0 ;
cim:ACLineSegment.gch 0 ;
cim:ACLineSegment.r 1.5999999945951E-2 ; # JSON numbers are xsd:float, which get converted to scientific notation. If you want precise numbers, use xsd:decimal
cim:ACLineSegment.x 3.769911221053E-3 ;
cim:ConductingEquipment.BaseVoltage <urn:uuid:9598e4a0-67e5-4ad7-879c-c85a1f63159c> ; # prop name in Uppercase?
cim:Conductor.length 50 ;
cim:Equipment.EquipmentContainer <urn:uuid:64e21d95-8b55-b941-a923-b74087410a66> ; # prop name in Uppercase?
cim:Equipment.aggregate false ;
cim:Equipment.normallyInService true ;
cim:IdentifiedObject.description "400V Telemarkstien 2 ACLineSegment 1" ;
cim:IdentifiedObject.name "04 TELEMA2 ACLS1" ;
cim:PowerSystemResource.AssetDatasheet <urn:uuid:d25f35ca-69fb-4c06-905b-67ec532e5f14> . # prop name in Uppercase?
}
@Sveino Here are the comments with checkboxes for tracking. If you can edit this comment, reply with sub-bullets, else reply in subsequent comment.
cim:PowerSystemResource.AssetDatasheet
to have @type:@id
in the context, to simplify the JSONLD payloadxsd:date
, and xsd:decimal
if you decide to use such numbers) to have appropriate @type
in the context, to simplify the JSONLD payload<URL>
and use only "@context":"URL"
in the JSONLD payload. That way the JSONLD will be shorter, and can leverage any future improved version of the context,Change dcterms:created to dcterms:issued
{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"cim": "http://iec.ch/TC57/CIM100#",
"md": "http://iec.ch/TC57/61970-552/ModelDescription/1#",
"eu": "http://iec.ch/TC57/CIM100-European#",
"dcterms": "http://purl.org/dc/terms/",
"dcat": "http://www.w3.org/ns/dcat#",
"prov": "http://www.w3.org/ns/prov#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "urn:uuid:c47d4310-b8ee-480d-9cf3-e53a81630981",
"prov:generatedAtTime": {
"@value": "2023-01-25T15:05:46Z",
"@type": "xsd:dateTime"
},
"dcterms:issued": {
"@value": "2022-03-30T16:26:37.958Z",
"@type": "xsd:date"
},
"dcterms:title": "DIGIN10-30-LV1_EQ",
"dcterms:description": [
{
"@value": "DIGIN10 CGMES v3.0 Low Voltage 1 (LV1) Core Equipment (EQ) Model",
"@language": "en"
}
],
"dcat:version": "1",
"dcterms:publisher": {
"@id": "urn:uuid:bd53cf0a-2e2f-4230-a591-0233290b5f9b",
"dcterms:title": "DIGIN"
},
"dcterms:temporal": {
"@type": "http://purl.org/dc/terms/PeriodOfTime",
"dcat:startDate": {
"@value": "2022-03-30T23:00:00Z",
"@type": "xsd:dateTime"
}
},
"dcterms:rights": "© 2023 Copyright",
"dcterms:rightsHolder": "DIGIN",
"dcterms:license": {
"@id": "https://creativecommons.org/licenses/by-nc-sa/4.0/",
"dcterms:title": "CC BY-NC-SA 4.0"
},
"dcterms:accessRights": {
"@id": "http://publications.europa.eu/resource/authority/access-right/PUBLIC",
"dcterms:title": "PUBLIC"
},
"dcat:isVersionOf": "https://digin.no/baseprofile/DIGIN10-30-LV1_EQ",
"dcat:keyword": "EQ",
"dcterms:LocationPeriodOrJurisdiction": "https://diginenergi.no/DIGIN10/LV1",
"dcterms:conformsTo": [
"http://iec.ch/TC57/ns/CIM/CoreEquipment-EU/3.0",
"http://iec.ch/TC57/ns/CIM/CoreEquipment/4.0"
],
"dcterms:references": [
{
"@id": "urn:uuid:f4c70c71-77e2-410e-9903-cbd85305cdc4",
"dcterms:title": "DIGIN10-30-LV1_EQ"
}
],
"@graph": [
{
"@id": "urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
"@type": "cim:ACLineSegment",
"cim:IdentifiedObject.mRID": "9d58e5bb-834c-4faa-928c-7da0bb1497d9",
"cim:IdentifiedObject.description": "400V Telemarkstien 2 ACLineSegment 1",
"cim:IdentifiedObject.name": "04 TELEMA2 ACLS1",
"cim:Equipment.aggregate": false,
"cim:Equipment.normallyInService": true,
"cim:Conductor.length": {
"cim:Length.value": 50.0
},
"cim:ACLineSegment.bch": {
"cim:Susceptance.value": 0.0
},
"cim:ACLineSegment.gch": {
"cim:Conductance.value": 0.0
},
"cim:ACLineSegment.r": {
"cim:Resistance.value": 0.015999999945951
},
"cim:ACLineSegment.x": {
"cim:Reactance.value": 0.003769911221053
},
"cim:PowerSystemResource.AssetDatasheet": {
"@id": "urn:uuid:d25f35ca-69fb-4c06-905b-67ec532e5f14"
},
"cim:Equipment.EquipmentContainer": {
"@id": "urn:uuid:64e21d95-8b55-b941-a923-b74087410a66"
},
"cim:ConductingEquipment.BaseVoltage": {
"@id": "urn:uuid:9598e4a0-67e5-4ad7-879c-c85a1f63159c"
}
}
]
}
"@id": "urn:uuid:c47d4310-b8ee-480d-9cf3-e53a81630981",
Should be updated by add:
"@id": "urn:uuid:c47d4310-b8ee-480d-9cf3-e53a81630981",`
"@type": "dcat:Dataset",
[x] Update the Frame reference from
"dcterms:LocationPeriodOrJurisdiction": "https://diginenergi.no/DIGIN10/LV1",
to
"dcterms:spatial": "https://diginenergi.no/DIGIN10/LV1",
[x] Make reference IRI for the following attributes:
dcterms:spatial
dcat:isVersionOf
dcterms:conformsTo
so that it becomes:
"dcterms:spatial": { "@id": "https://diginenergi.no/DIGIN10/LV1"},
[x] Remove md namespace "dcterms:spatial": "https://diginenergi.no/DIGIN10/LV1",`
[x] Take out "dcat:version": "1", - this will moved to the manifest
@Sveino
{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"cim": "http://ucaiug.org/ns/CIM#",
"eu": "http://iec.ch/TC57/CIM100-European#",
"dcterms": "http://purl.org/dc/terms/",
"dcat": "http://www.w3.org/ns/dcat#",
"prov": "http://www.w3.org/ns/prov#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "urn:uuid:c47d4310-b8ee-480d-9cf3-e53a81630981",
"@type": "dcat:Dataset",
"prov:generatedAtTime": {
"@value": "2023-02-20T15:18:16Z",
"@type": "xsd:dateTime"
},
"dcterms:issued": {
"@value": "2022-03-30T16:26:37.958Z",
"@type": "xsd:date"
},
"dcterms:title": "DIGIN10-30-LV1_EQ",
"dcterms:description": [
{
"@value": "DIGIN10 CGMES v3.0 Low Voltage 1 (LV1) Core Equipment (EQ) Model",
"@language": "en"
}
],
"dcterms:publisher": {
"@id": "urn:uuid:bd53cf0a-2e2f-4230-a591-0233290b5f9b",
"dcterms:title": "DIGIN"
},
"dcterms:temporal": {
"@type": "http://purl.org/dc/terms/PeriodOfTime",
"dcat:startDate": {
"@value": "2022-03-30T23:00:00Z",
"@type": "xsd:dateTime"
}
},
"dcterms:rights": "© 2023 Copyright",
"dcterms:rightsHolder": "DIGIN",
"dcterms:license": {
"@id": "https://creativecommons.org/licenses/by-nc-sa/4.0/",
"dcterms:title": "CC BY-NC-SA 4.0"
},
"dcterms:accessRights": {
"@id": "http://publications.europa.eu/resource/authority/access-right/PUBLIC",
"dcterms:title": "PUBLIC"
},
"dcat:isVersionOf": {
"@id": "https://digin.no/baseprofile/DIGIN10-30-LV1_EQ"
},
"dcat:keyword": "EQ",
"dcterms:spatial": {
"@id": "https://diginenergi.no/DIGIN10/LV1"
},
"dcterms:conformsTo": [
{
"@id": "http://iec.ch/TC57/ns/CIM/CoreEquipment-EU/3.0"
},
{
"@id": "http://iec.ch/TC57/ns/CIM/CoreEquipment/4.0"
}
],
"dcterms:references": [
{
"@id": "urn:uuid:f4c70c71-77e2-410e-9903-cbd85305cdc4",
"dcterms:title": "DIGIN10-30-LV1_EQ"
}
],
"@graph": [
{
"@id": "urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
"@type": "cim:ACLineSegment",
"cim:IdentifiedObject.mRID": "urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
"cim:IdentifiedObject.description": "400V Telemarkstien 2 ACLineSegment 1",
"cim:IdentifiedObject.name": "04 TELEMA2 ACLS1",
"cim:Equipment.aggregate": false,
"cim:Equipment.normallyInService": true,
"cim:Conductor.length": {
"cim:Length.value": 50.0
},
"cim:ACLineSegment.bch": {
"cim:Susceptance.value": 0.0
},
"cim:ACLineSegment.gch": {
"cim:Conductance.value": 0.0
},
"cim:ACLineSegment.r": {
"cim:Resistance.value": 0.015999999945951
},
"cim:ACLineSegment.x": {
"cim:Reactance.value": 0.003769911221053
},
"cim:PowerSystemResource.AssetDatasheet": {
"@id": "urn:uuid:d25f35ca-69fb-4c06-905b-67ec532e5f14"
},
"cim:Equipment.EquipmentContainer": {
"@id": "urn:uuid:64e21d95-8b55-b941-a923-b74087410a66"
},
"cim:ConductingEquipment.BaseVoltage": {
"@id": "urn:uuid:9598e4a0-67e5-4ad7-879c-c85a1f63159c"
}
}
]
}
Hi @EmilieSkog , have you gone through the checklist https://github.com/3lbits/Grunnprofil/issues/277#issuecomment-1400567092
As part of creating a CIMXML to/from CIMJSON-LD converter we would need to define how the header information shall be converted. The converter should go both direction and CIMJSON-LD (toghether with a manifest instance file) would need to be a super-set.
This issue is related to the IEC 61970-552 CIMXML Model exchange format header definition. ENTSO-E CIM WG has define a specification dealing with header information:
The CIMXML header from the file DIGIN10-30-LV1_EQ.xml :
Converted to CIMJSON-LD header in file DIGIN10-30-LV1_EQ.jsonld:
More example: https://github.com/digin-energi/grunnprofil-scripts/tree/feature/JSON-LD_Converter/Python/cim-convert-tool/Data/JSON-LD