Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest instance file specification #40

Open
Sveino opened this issue May 13, 2023 · 0 comments
Open

Manifest instance file specification #40

Sveino opened this issue May 13, 2023 · 0 comments

Comments

@Sveino
Copy link
Collaborator

Sveino commented May 13, 2023

The manifest instance file must provide all the attributes that give the .cimx file it name. (ref #39 ). The name of a dataset instance file is given by the header in the dataset.

The manifest instance file is an dcat:Catalog that includes dcat:Dataset that can have multiple dcat:Distribution.
The serialization syntax should follow RDF 1.1 XML Syntax or JSON-LD 1.1 with .rdf and .jsonld as respected file type. This will be the same as what is plan for IEC 61970-501:Ed2.

The example is written in JSON-LD and can then be converted to RDF/XML.

A Manifest include the listing of all the artifacts included in the collection. It can include a single instance file, or the collection of all instance file needed for a framework even including the vocabulary and profile specifications.
In similar way can a dcat:Catalog include only one instance, or it can include all the instances that build up an exchange orchestration like Common Grid Model (CGM) including all the RCC services.
All instance file in a dcat:Catalog must be consistent and follow the rules for unique and persistent identification and version control so that can be used as a knowledge graph. All element that can be handle as a named graph must be registered as a dcat:CatalogRecord.

The Manifest.rdf:

{
    "@context": {
        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
        "dcterms": "http://purl.org/dc/terms/",
        "dcat": "http://www.w3.org/ns/dcat#",
        "prov": "http://www.w3.org/ns/prov#",
	"foaf": "http://xmlns.com/foaf/0.1/",
        "xsd": "http://www.w3.org/2001/XMLSchema#"
    },
    "@id": "urn:uuid:5fb6f3ee-274f-4b0c-8500-bf6752852565",
    "@type": "dcat:Catalog",
    "prov:generatedAtTime": {
        "@value": "2023-05-13T15:24:37Z",
        "@type": "xsd:dateTime"
    },
    "dcterms:title": "Manifest",
    "dcat:keyword": "MF",
    "dcterms:temporal": {       
        "@type": "dcterms:PeriodOfTime",
        "dcat:startDate": {
            "@value": "2023-06-14T23:00:00Z",
            "@type": "xsd:dateTime"
        }
    },
    "dcterms:publisher": {
        "@id": "urn:uuid:a7ce59a4-9b5f-438c-be71-afe6722111ce",
        "dcterms:title": "APG"
    },
	"prov:wasGeneratedBy": {
        "@id": "http://energy.referencedata.eu/CGM/Action/a494e864-4109-465e-a401-294e18025447",
        "dcterms:title": "CGM-RA"
    },
     "dcat:isVersionOf": {
        "@id": "http://apg.com/CGM/Manifest"
    },
	"dcat:version": "1.0.0",
	
    "@graph": [
        {
            "@id": "urn:uuid:c7338bce-fa27-4f12-b8e9-b8132f9d4486",
            "@type": "dcat:Catalog",
			"dcterms:title": "CGM-CSA Data catalog",
			"dcterms:description": "This the main data catalog for the Common Grid Model (CGM) and Coordinated Security Assessment (CSA). In general this only need to be added once.",
			"dcat:record": [
            {
				"@id": "urn:uuid:d1f1c85a-984b-454d-a132-f5ee37ab591e",
                "dcterms:title": "Data Record for 20230512T2230Z_APG_CGM-RA"
			},
            {
				"@id": "urn:uuid:5fb6f3ee-274f-4b0c-8500-bf6752852565",
                "dcterms:title": "Data Record for 20230512T2230Z_APG_CGM-RA"
			},
            {
				"@id": "urn:uuid:d1f1c85a-984b-454d-a132-f5ee37ab591e",
                "dcterms:title": "Manifest"
			}
        ]
		},
		{
            "@id": "urn:uuid:d1f1c85a-984b-454d-a132-f5ee37ab591e",
            "@type": "dcat:CatalogRecord",
			"dcterms:title": "Data Record for 20230512T2230Z_APG_CGM-RA",
			"foaf:primaryTopic": {
				"@id": "urn:uuid:9e82351f-4177-4389-9f6f-507e6d33a3c2"
			}
		},
		{
            "@id": "urn:uuid:161e5dad-8413-4ed4-bfeb-cc1f35bb9a53",
            "@type": "dcat:Dataset",
			"dcterms:title": "20230512T2230Z_APG_CGM-RA",
			"dcat:distribution": {
				"@id": "urn:uuid:9e82351f-4177-4389-9f6f-507e6d33a3c2",
		        "@type": "dcat:Distribution",
			    "dcterms:title": "20230512T2230Z_APG_CGM-RA.xml",
                "dcat:accessURL": {
                    "@id": "file://./NCv22/20230512T2230Z_APG_CGM-RA.xml"
                },
				"dcat:mediaType": {
				    "@id": "http://www.iana.org/assignments/media-types/application/rdf+xml"
                },
                "dcat:conformsTo": "urn:iso:std:iec:61970-552:2016"
			}
		}
    ]
}

The header of 20230512T2230Z_APG_CGM-RA.xml:

{
    "@context": {
        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
        "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:6e39b3ee-045d-42c0-9f99-2479640080ac",
    "@type": "dcat:Dataset",
    "dcterms:identifier": "6e39b3ee-045d-42c0-9f99-2479640080ac",
    "prov:generatedAtTime": {
        "@value": "2023-05-13T15:24:37Z",
        "@type": "xsd:dateTime"
    },
    "dcterms:title": "20230512T2230Z_APG_CGM-RA",
    "dcterms:description": [
        {"@value": "This is an example of remedial action offline spesification.", "@language":"en"},
        {"@value": "Dette er et eksempel på spesifikasjoner for offline avhjelpende handlinger.", "@language":"no"}
    ] ,
    "dcat:keyword": ["RA", "Remedial Action"],
    "dcterms:temporal": {
        "@type": "dcterms:PeriodOfTime",
        "dcat:startDate": {
            "@value": "2023-05-12T23:00:00Z",
            "@type": "xsd:dateTime"
        }
    },	
    "dcterms:publisher": {
        "@id": "urn:eic:10XAT-APG------Z",
        "dcterms:title": "APG"
    },
    "dcterms:accessRights": {
        "@id": "http://energy.referencedata.eu/Confidentiality/OPDEConfidential",
        "dcterms:title": "OPDEConfidential",
        "dcterms:identifier": "4cd9b326-1275-4da7-9724-28c5e1deeb87"
    },
	"prov:wasGeneratedBy": {
        "@id": "http://energy.referencedata.eu/CGM/Action/CGM-RA",
        "dcterms:title": "CGM-RA",
        "dcterms:identifier": "a494e864-4109-465e-a401-294e18025447"
    },
     "dcat:isVersionOf": {
        "@id": "http://energy.referencedata.eu/CGM/Model/APG_CGM-RA",
        "dcterms:title": "APG_CGM-RA",
        "dcterms:identifier": "9237179a-1115-40d4-be41-89ac0b1bc58d"
    },
	"dcat:version": "1.0.0",
    "dcterms:spatial": {
        "@id": "http://energy.referencedata.eu/CGM/Frame/AT_Power-Transmission-System",
        "dcterms:title": "AT_Power-Transmission-System",
        "dcterms:identifier": "81524a5b-435d-4183-8fd5-4a60e1d9c0cf"
    },
    "dcterms:conformsTo": [
        {
            "@id": "http://entsoe.eu/ns/CIM/RemedialAction-EU/2.2",
			"dcterms:title": "RemedialActionProfile",
			"dcat:keyword": "RA"
        }
    ],
    "dcterms:references": [
        {
            "@id": "urn:uuid:a71dd8ab-371a-4106-b344-23ff915c523c",
			"dcterms:title": "20230512T2230Z_APG_CGM-EQ",
            "dcat:keyword": "EQ"		
        }
    ],
    "@graph": [
        {
 		}	
    ]
}

The same model serialized using CIM XML:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
   xmlns:dcat="http://www.w3.org/ns/dcat#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:prov="http://www.w3.org/ns/prov#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
  <!--Header -->
  <md:FullModel rdf:about="urn:uuid:6e39b3ee-045d-42c0-9f99-2479640080ac">
  <!-- ID of the Full Model in RDF-->
    <dcterms:identifier>6e39b3ee-045d-42c0-9f99-2479640080ac</dcterms:identifier>
     <!-- creation time of the Document  -->
    <prov:generatedAtTime>2023-05-13T15:24:37+00:00</prov:generatedAtTime>
    <dcterms:title>20230512T2230Z_APG_CGM-RA</dcterms:title>
    <!-- Description of the model -->
    <dcterms:description xml:lang="en">This is an example of remedial action offline spesification.</dcterms:description>
    <dcterms:description xml:lang="no">Dette er et eksempel på spesifikasjoner for offline avhjelpende handlinger.</dcterms:description>

    <dcat:keyword>RA</dcat:keyword>
    <dcat:keyword>Remedial Action</dcat:keyword>
    <!-- temporal only shown as startDate and endDate using CIM XML -->
    <dcat:startDate>2023-05-12T23:00:00+00:00</dcat:startDate>

    <dcterms:publisher rdf:resource="urn:eic:10XAT-APG------Z"/>
    <dcterms:accessRights rdf:resource="http://energy.referencedata.eu/Confidentiality/OPDEConfidential"/>
    <prov:wasGeneratedBy rdf:resource="http://energy.referencedata.eu/CGM/Action/CGM-RA"/>
    <dcat:isVersionOf rdf:resource="http://energy.referencedata.eu/CGM/Model/APG_CGM-RA"/>
    <!-- Semantic Version of the Model -->
    <dcat:version>1.0.0</dcat:version>
    <!-- The Frame that the model are describing -->
    <dcterms:spatial rdf:resource="http://energy.referencedata.eu/CGM/Frame/AT_Power-Transmission-System"/>
    <!-- Refering the schema spesification that the model confirmes to  -->
    <dcterms:conformsTo rdf:resource="http://entsoe.eu/ns/CIM/RemedialAction-EU/2.2"/>
    <!-- Referencing any dependnet model - this case is the EQ model -->
    <dcterms:references rdf:resource="urn:uuid:a71dd8ab-371a-4106-b344-23ff915c523c"/>
  </md:FullModel>

<!-- Here below is the content of the RA (remedial action) instance data --> 

</rdf:RDF>

The RA model version 20230512T2230Z_APG_CGM-RA.xml is updated with next week model 20230519T2230Z_APG_CGM-RA.xml

{
    "@context": {
        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
        "dcterms": "http://purl.org/dc/terms/",
        "dcat": "http://www.w3.org/ns/dcat#",
        "prov": "http://www.w3.org/ns/prov#",
		"foaf": "http://xmlns.com/foaf/0.1/",
        "xsd": "http://www.w3.org/2001/XMLSchema#"
    },
    "@id": "urn:uuid:216eeb7c-9e7a-454d-bc7a-c24868f01f7e",
    "dcterms:title": "20230519T2230Z_APG_CGM-RA",
    "dcterms:temporal": {
        "@type": "dcterms:PeriodOfTime",
        "dcat:startDate": {
            "@value": "2023-05-19T23:00:00Z",
            "@type": "xsd:dateTime"
        }
    },	
    "dcat:isVersionOf": {
        "@id": "http://energy.referencedata.eu/CGM/Model/APG_CGM-RA",
        "dcterms:title": "APG_CGM-RA",
        "dcterms:identifier": "9237179a-1115-40d4-be41-89ac0b1bc58d"
    },
	"dcat:previousVersion": {
        "@id": "urn:uuid:6e39b3ee-045d-42c0-9f99-2479640080ac",
        "dcterms:title": "20230512T2230Z_APG_CGM-RA"		 
    },
    "@graph": [
        {
 		}	
    ]
}

The same model serialized using CIM XML:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
   xmlns:dcat="http://www.w3.org/ns/dcat#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>

<!--Header -->
  <md:FullModel rdf:about="urn:uuid:216eeb7c-9e7a-454d-bc7a-c24868f01f7e">
  <!-- ID of the Full Model in RDF-->
    <dcterms:title>20230519T2230Z_APG_CGM-RA</dcterms:title>
    <!-- temporal only shown as startDate and endDate using CIM XML -->
    <dcat:startDate>2023-05-19T23:00:00+00:00</dcat:startDate>

    <dcat:isVersionOf rdf:resource="http://energy.referencedata.eu/CGM/Model/APG_CGM-RA"/>
    <dcat:previousVersion rdf:resource="urn:uuid:6e39b3ee-045d-42c0-9f99-2479640080ac"/>
  </md:FullModel>

<!-- Here below is the content of the RA (remedial action) instance data --> 

</rdf:RDF>

The examples above be inline with DCAT-3 version-history
The dcat:version can be used for human consumption in the case where the title is the same between the different versions. Each version will have a unique id and will refere to the same dcat:isVersionOf.
adms:versionNotes are used to inform user about changes that is made from one version to the next.

Insert a new RA that is only valid for 2023-05-20:

{
    "@context": {
        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
        "dcterms": "http://purl.org/dc/terms/",
        "dcat": "http://www.w3.org/ns/dcat#",
        "prov": "http://www.w3.org/ns/prov#",
		"foaf": "http://xmlns.com/foaf/0.1/",
        "xsd": "http://www.w3.org/2001/XMLSchema#"
    },
    "@id": "urn:uuid:83523b72-c63d-4e48-8c42-ebc76e10a99d",
    "dcterms:title": "20230520T2230Z_APG_CGM-RA",
    "dcterms:temporal": {
        "@type": "dcterms:PeriodOfTime",
        "dcat:startDate": {
            "@value": "2023-05-20T23:00:00Z",
            "@type": "xsd:dateTime"
        },
		"dcat:endDate": {
            "@value": "2023-05-21T23:00:00Z",
            "@type": "xsd:dateTime"
        }
    },	
    "dcat:isVersionOf": {
        "@id": "http://energy.referencedata.eu/CGM/Model/APG_CGM-RA",
        "dcterms:title": "APG_CGM-RA",
        "dcterms:identifier": "9237179a-1115-40d4-be41-89ac0b1bc58d"
    },
	"dcat:previousVersion": {
        "@id": "urn:uuid:216eeb7c-9e7a-454d-bc7a-c24868f01f7e",
        "dcterms:title": "20230519T2230Z_APG_CGM-RA"		 
    },
	"dcat:nextVersion": {
        "@id": "urn:uuid:216eeb7c-9e7a-454d-bc7a-c24868f01f7e",
        "dcterms:title": "20230519T2230Z_APG_CGM-RA"		 
    },
    "@graph": [
        {
 		}	
    ]
}

The same model serialized using CIM XML:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
   xmlns:dcat="http://www.w3.org/ns/dcat#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
  <md:FullModel rdf:about="urn:uuid:83523b72-c63d-4e48-8c42-ebc76e10a99d">
    <dcterms:title>20230520T2230Z_APG_CGM-RA</dcterms:title>
    <dcat:startDate>2023-05-20T23:00:00+00:00</dcat:startDate>
    <dcat:endDate>2023-05-21T23:00:00+00:00</dcat:endDate>
    <dcat:isVersionOf rdf:resource="http://energy.referencedata.eu/CGM/Model/APG_CGM-RA"/>
    <dcat:previousVersion rdf:resource="urn:uuid:216eeb7c-9e7a-454d-bc7a-c24868f01f7e"/>
    <dcat:nextVersion rdf:resource="urn:uuid:216eeb7c-9e7a-454d-bc7a-c24868f01f7e"/>
  </md:FullModel>
  
</rdf:RDF>

The last RA is being replaced with a new one. This should be aligned with DCAT-3 version-replace. The title is the same so dcat.version is added:

{
    "@context": {
        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
        "dcterms": "http://purl.org/dc/terms/",
        "dcat": "http://www.w3.org/ns/dcat#",
        "prov": "http://www.w3.org/ns/prov#",
	"adms": "http://www.w3.org/ns/adms#",
        "xsd": "http://www.w3.org/2001/XMLSchema#"
    },
    "@id": "urn:uuid:5d2a586c-6aa0-40bb-9acb-2a19b70e5fd1",
    "dcterms:title": "20230520T2230Z_APG_CGM-RA",
    "dcat:isVersionOf": {
        "@id": "http://energy.referencedata.eu/CGM/Model/APG_CGM-RA",
        "dcterms:title": "APG_CGM-RA",
        "dcterms:identifier": "9237179a-1115-40d4-be41-89ac0b1bc58d"
    },
	"dcterms:replaces": {
        "@id": "urn:uuid:216eeb7c-9e7a-454d-bc7a-c24868f01f7e",
        "dcterms:title": "20230520T2230Z_APG_CGM-RA"		 
    },
	"dcat:version": "1.1.0",
	"adms:versionInfo": [
        {"@value": "One new RA was added to the set.", "@language":"en"},
        {"@value": "En til RA ble lagt til settet.", "@language":"no"}
    ] ,
    "@graph": [
        {
 		}	
    ]
}

The same model serialized using CIM XML:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
   xmlns:adms="http://www.w3.org/ns/adms#"
   xmlns:dcat="http://www.w3.org/ns/dcat#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
  <md:FullModel rdf:about="urn:uuid:5d2a586c-6aa0-40bb-9acb-2a19b70e5fd1">
    <dcterms:title>20230520T2230Z_APG_CGM-RA</dcterms:title>
    <dcat:isVersionOf rdf:resource="http://energy.referencedata.eu/CGM/Model/APG_CGM-RA"/>
    <dcterms:replaces rdf:resource="urn:uuid:216eeb7c-9e7a-454d-bc7a-c24868f01f7e"/>
    <dcat:version>1.1.0</dcat:version>
    <adms:versionInfo xml:lang="en">One new RA was added to the set.</adms:versionInfo>
    <adms:versionInfo xml:lang="no">En til RA ble lagt til settet.</adms:versionInfo>
  </md:FullModel>

</rdf:RDF>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant