zaphiro-technologies / cimgen

Code generation from CIM data model for several programming languages
Apache License 2.0
0 stars 0 forks source link

[Feature] Enrich dataclass with functionality to parse a xml/rdf fragment into a class instance #12

Open chicco785 opened 1 month ago

chicco785 commented 1 month ago

Is your feature request related to a problem? Please describe the problem.

I want to read an element from a rdf file, and make it a python object.

Describe the solution you'd like

Given and xml fragment from a cim profile, e.g.:

  <cim:Terminal rdf:ID="Term_29PSEA-SW4T2">
    <cim:IdentifiedObject.name>SW4-T2</cim:IdentifiedObject.name>
    <cim:IdentifiedObject.description/>
    <cim:ACDCTerminal.sequenceNumber>2</cim:ACDCTerminal.sequenceNumber>
    <cim:Terminal.phases rdf:resource="ABC"/>
    <cim:Terminal.ConnectivityNode rdf:resource="#_CN_29PSEA-4"/>
    <cim:Terminal.ConductingEquipment rdf:resource="#_LdBrkSw_29PSEA-SW4"/>
  </cim:Terminal>

convert it to an object of type Terminal

Additional context

No response