3lbits / CIM4NoUtility

CIM for the Norwegian Power Utility
Creative Commons Attribution Share Alike 4.0 International
23 stars 6 forks source link

Is uuid validation string based #281

Closed Sveino closed 10 months ago

Sveino commented 1 year ago

How should we interpreter different serialization of uuid? Should it be string based?

is urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9 the same as urn:uuid:9d58e5bb834c4faa928c7da0bb1497d9 (is this a valid uuid)

Sveino commented 1 year ago

Check the following JSON-LD in [JSON-LD Playground(https://json-ld.org/playground/):

{
    "@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#"
    },

    "@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": {
                "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:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
            "@type": "cim:ACLineSegment",
            "cim:IdentifiedObject.name": "Same id"
        }
    ]
}