Automatically determine Profile and store profiles in metadata
According to https://docstore.entsoe.eu/Documents/CIM_documents/Grid_Model_CIM/CGMES_v2.4.14_FileHeaderGuidelines_v1.0.0.pdf the profile of an xml is contained in the key <md:Model.profile>
.
One to many URN/URI describing the profiles that governs this model. It uniquely identifies the profiles and its version.
For the IEC standardized Profiles, this should be something like:
http://iec.ch/TC57/61970-453/DiagramLayout/2
- But there seem to exist other profiles (probably pre-IEC Standard).
http://entsoe.eu/CIM/EquipmentCore/3/1
However, I think it is feasible to automatically determine the profile from that xml key.
-
Check the IEC standard if this is still valid -
Get all the profile strings supported by cimpy (I think it is only the IEC ones)| -
Write a function which matches the profile - either define a set of supported strings (e.g. IEC) or match if the string contains e.g.
Equipment
and notTopology
- either define a set of supported strings (e.g. IEC) or match if the string contains e.g.
-
Store the profile in the cimpy metadata -
Remove the profile list requirement from generate_xml
andcim_export
(maybe make it optional) -
Profit