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

owl2soml option -shorten #4

Open
VladimirAlexiev opened this issue Sep 1, 2023 · 1 comment
Open

owl2soml option -shorten #4

VladimirAlexiev opened this issue Sep 1, 2023 · 1 comment

Comments

@VladimirAlexiev
Copy link
Owner

  • In electrical CIM, all props are unique to the domain class, and prop names duplicate the domain
  • Furthermore, most object prop names also include the range class (or a plural version of it). We like the practice that a prop name replicates the range
  • But replicating the domain is verbose, so we'd like to shorten prop names by removing the domain local name from the prop name
  • add option -shorten 1 to do this (see column SOML, where cim: is the default voc_prefix)
domain prop range SOML name
cim:ApparentPower cim:ApparentPower.value cim:Float value
cim:CurrentLimit entsoe2:CurrentLimit.normalValue cim:CurrentFlow entsoe2:normalValue
cim:Equipment cim:Equipment.EquipmentContainer cim:EquipmentContainer equipmentContainer
cim:EquipmentContainer cim:EquipmentContainer.Equipments cim:Equipment.EquipmentContainer equipments

This allows natural and shorter GraphQL querying, eg:

{equipmentContainer(ID:"...") {
  name
  equipments { # shorter and nicer than: EquipmentContainer_Equipments
    id
    name
  }
}}

A bigger example: instead of queries like this:

{
  substation {
    id
    powerSystemResource_Location {
      location_PositionPoints {
        positionPoint_yPosition
        positionPoint_xPosition
      }
    }
    substation_VoltageLevels {
      voltageLevel_BaseVoltage {
        baseVoltage_nominalVoltage
      }
    }
  }

You can use shorter queries like this:

{
  substation {
    id
    location {positionPoints {
        yPosition
        xPosition
      }}
    voltageLevels { baseVoltage { nominalVoltage } }
  }

Mirrored from https://ontotext.atlassian.net/browse/DATA-119

@VladimirAlexiev
Copy link
Owner Author

In addition to removing the domain class name (eg DiagramObject below), we should remove all its superclass names (eg IdentifiedObject).
Eg from ENTSO-E_Test_Configurations_v3.0.2\v3.0\MicroGrid\MicroGrid-Type2\MicroGrid-Type2-HVDC-MAS\20210401T1730Z_1D_HVDC_DL_1.xml:

  <cim:DiagramObject rdf:ID="_162a0a97-7da2-a8bd-bdfd-39fc11ca0baf">
    <cim:IdentifiedObject.name>none</cim:IdentifiedObject.name>
    <cim:DiagramObject.rotation>0</cim:DiagramObject.rotation>
    <cim:DiagramObject.IdentifiedObject rdf:resource="#_b6978550-cb6e-11e1-bcee-406c8f32ef58" />
    <cim:DiagramObject.Diagram rdf:resource="#_f27170a0-16d5-292d-d803-39fc11ca0baf" />
    <cim:IdentifiedObject.mRID>162a0a97-7da2-a8bd-bdfd-39fc11ca0baf</cim:IdentifiedObject.mRID>
  </cim:DiagramObject>

How to check whether this won't lead to any conflicts? Eg above are two similar names that I mistakenly took to be a conflict:

  • DiagramObject.IdentifiedObject refers to the electrical object being placed on the diagram
  • IdentifiedObject.mRID (almost equal to rdf:ID) refers to the diagram object itself

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