-
Notifications
You must be signed in to change notification settings - Fork 5
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
JSON-LD: use shortened props and lowerCamelCase #331
Comments
The gist https://gist.github.com/VladimirAlexiev/d691a9c66c348877d6c90420b52dec40 file "@context": {
"@vocab": "http://ucaiug.org/ns/CIM#",
"cim": "http://ucaiug.org/ns/CIM#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"eu": "http://iec.ch/TC57/CIM100-European#",
"dct": "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#",
"dcat:isVersionOf": {"@type": "@id"},
"dct:conformsTo": {"@type": "@id"},
"dct:issued": {"@type": "xsd:dateTime"},
"dct:references": {"@type": "@id"},
"dct:spatial": {"@type": "@id"},
"dct:temporal": {"@type": "@id"},
"prov:generatedAtTime": {"@type": "xsd:dateTime"},
"mRID": {"@id": "IdentifiedObject.mRID"},
"Bay": {"@context": {"description": {"@id": "IdentifiedObject.description"},
"name": {"@id": "IdentifiedObject.name"},
"voltageLevel": {"@id": "Bay.VoltageLevel","@type": "@id"}}},
"ConductingEquipment": {"@context": {"baseVoltage": {"@id": "ConductingEquipment.BaseVoltage","@type": "@id"}}},
"Equipment": {"@context": {"equipmentContainer": {"@id": "Equipment.EquipmentContainer","@type": "@id"}}},
"PowerSystemResource": {"@context": {"assetDatasheet": {"@id": "PowerSystemResource.AssetDatasheet", "@type": "@id"}}},
"VoltageLevel": {"@context": {"description": {"@id": "IdentifiedObject.description"},
"name": {"@id": "IdentifiedObject.name"},
"substation": {"@id": "VoltageLevel.Substation", "@type": "@id"},
"baseVoltage": {"@id": "VoltageLevel.BaseVoltage", "@type": "@id"}}},
"Conductor": {"@context": {"length": {"@id": "Conductor.length", "@type": "xsd:float"}}},
"ACLineSegment": {"@context": {"description": {"@id": "IdentifiedObject.description"},
"name": {"@id": "IdentifiedObject.name"},
"aggregate": {"@id": "Equipment.aggregate", "@type":"xsd:boolean"},
"normallyInService": {"@id": "Equipment.normallyInService", "@type":"xsd:boolean"},
"length": {"@id": "Conductor.length", "@type":"xsd:float"},
"assetDatasheet": {"@id": "PowerSystemResource.AssetDatasheet", "@type":"@id"},
"equipmentContainer": {"@id": "Equipment.EquipmentContainer", "@type":"@id"},
"baseVoltage": {"@id": "ConductingEquipment.BaseVoltage", "@type":"@id"},
"bch": {"@id": "ACLineSegment.bch", "@type": "xsd:float"},
"gch": {"@id": "ACLineSegment.gch", "@type": "xsd:float"},
"r": {"@id": "ACLineSegment.r", "@type": "xsd:float"},
"x": {"@id": "ACLineSegment.x", "@type": "xsd:float"}}}
} |
@VladimirAlexiev You wrote "Therefore, we can use the short name P in JSON to make instance data as pleasant as possible for developers." - find two developer with the same preference is like finding to identical snowflakes... |
|
@Sveino
As clarified during a previous session, the concerns in https://github.com/VladimirAlexiev/soml/blob/master/owl2soml/CIM-shorten.md are not a problem:
In particular, this enables JS "property paths", eg,
bay.voltageLevel.name
wherebay
is an object of typeBay
By using JSON-LD 1.1 (#330) "local contexts" it is possible to have short prop names in the payload.
cim:
prefix: either by using@vocab
, or by declaring the@id
of every classThe text was updated successfully, but these errors were encountered: