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

output ontologies as JSONLD #99

Open
1 of 6 tasks
VladimirAlexiev opened this issue Oct 6, 2024 · 2 comments
Open
1 of 6 tasks

output ontologies as JSONLD #99

VladimirAlexiev opened this issue Oct 6, 2024 · 2 comments
Assignees
Labels
jsonld Pertains to JSON-LD serialization ontology Pertains to ontology representation

Comments

@VladimirAlexiev
Copy link
Collaborator

VladimirAlexiev commented Oct 6, 2024

Use tricks from https://github.com/gs1/EPCIS/tree/master/Ontology#conversion-to-jsonld.
make jsonld
invokes commands like this

ttl2jsonld CGMES-NC/ttl/SteadyStateInstruction-AP-Voc-RDFS2020.ttl | \
  jsonld compact -c file://CIM-ontology-context.jsonld > CGMES-NC/jsonld/SteadyStateInstruction-AP-Voc-RDFS2020.jsonld

Then I check for JSON-LD irregularities with a command like this;

grep -h '       "@' */*/*.jsonld|perl -pe 's{^ +}{}' |sort|uniq -c

Here are the exceptions, with issue listed:

      1 "@id": "cim:CurrentFlow"
      1 "@id": "cim:Frequency"
      4 "@id": "cim:Money"
      1 "@id": "cim:ReactivePower"
      2 "@id": "cim:RealEnergy"
   4035 "@id": "uml:attribute"
    886 "@id": "uml:concrete"
    184 "@id": "uml:enumeration"
     53 "@id": "uml:ofAggregate"
     43 "@language": "en",
     29 "@value": "vocabulary"
  • fix09-map-qkUnitsMultipliers-38.ru had cim:UnitMultiplier.none 1.0 (decimal), now fixed to 1E0 (double)
     19 "@type": "xsd:decimal",
     19 "@value": "1.0"
      1 "@value": "TapChangerControl"
      1 "@value": "TapChangerControlSchedule"
      2 "@value": "consumption"
      2 "@value": "export"
      2 "@value": "holiday"
      2 "@value": "import"
      2 "@value": "production"
      2 "@value": "storage"
@VladimirAlexiev VladimirAlexiev self-assigned this Oct 6, 2024
@VladimirAlexiev VladimirAlexiev added ontology Pertains to ontology representation jsonld Pertains to JSON-LD serialization labels Oct 6, 2024
@VladimirAlexiev
Copy link
Collaborator Author

VladimirAlexiev commented Oct 12, 2024

I also check whether all URLs are properly shortened

grep -h '"http' */*/*.jsonld|sort|uniq -c|less

Breakdown of problems:

@prefix dm:           <http://iec.ch/TC57/61970-552/DifferenceModel/1#> .
@prefix dm:           <https://ap-voc.cim4.eu/DatasetMetadata#> .

      1       "@id": "https://ap-voc.cim4.eu/DatasetMetadata#Ontology",
      1       "@id": "https://ap-voc.cim4.eu/DatasetMetadata#Package_DatasetMetadataProfile",
      1       "@id": "https://ap-voc.cim4.eu/DatasetMetadata#Package_DocDatasetMetadataProfile",
      1       "cims:belongsToCategory": "https://ap-voc.cim4.eu/DatasetMetadata#Package_DatasetMetadataProfile",
  • I had cim:UnitMultiplier.none 1.0 (decimal), now fixed to 1E0 (double)
     19       "http://qudt.org/schema/qudt/prefixMultiplier": {
     11       "http://www.w3.org/2002/07/owl#deprecated": true
      3       "http://www.w3.org/2002/07/owl#deprecated": true,
  • These are expected:
     10       "dcat:landingPage": "https://www.entsoe.eu/digital/cim/cim-for-grid-models-exchange/",
     19       "dct:license": "https://www.apache.org/licenses/LICENSE-2.0",
      1       "owl:backwardCompatibleWith": "http://iec.ch/TC57/61970-453/DiagramLayout/2/1", ...
     10       "owl:incompatibleWith": "http://entsoe.eu/2009/profile1", ...
      1       "owl:priorVersion": "http://entsoe.eu/CIM/DiagramLayout/3/1", ...

@VladimirAlexiev
Copy link
Collaborator Author

This is largely done, see https://github.com/Sveino/Inst4CIM-KG/tree/develop/rdfs-improved/CGMES/jsonld.

They are all posted as separate issues, so we may as well close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jsonld Pertains to JSON-LD serialization ontology Pertains to ontology representation
Projects
None yet
Development

No branches or pull requests

3 participants