https://github.com/Sveino/Inst4CIM-KG/tree/develop/shacl-improved#generalize-shapes
CGMES_Constraints_Repository.xlsx describes PROF10 (aka C:600:ALL:NA:PROF10) thus:
CGMES instance file (distribution) dependency shall be declared by md:Model.DependentOn in the header according to Figure 1 and the associated rules.
It's implemented in application-profiles-library\CGMES\CurrentRelease\SHACL\61970-600-1_Prof10-Header-AP-Con-Complex-SHACL.ttl,
which is 700 lines, half are commented out, and the rest do the same thing:
- select by
md:Model.profile (SPARQLTarget)
- check some cardinality restriction on
md:Model.DependentOn
- check that
md:Model.DependentOn/md:Model.profile has certain values
It is full of useless pairs of sh:SPARQLTarget like this.
The dependencies of a model don't vary with its form (Full vs Difference), so you should target by md:Model.profile but not rdf:type
(The last question below is an exception, and I think it's incorrect)
prof10:FullModel-EQ a sh:NodeShape ;
sh:property prof10:PROF10-EQ;
sh:target
[
a sh:SPARQLTarget ;
sh:prefixes cim: ;
sh:select """
SELECT DISTINCT ?this
WHERE {
?this rdf:type md:FullModel .
?this md:Model.profile "http://iec.ch/TC57/ns/CIM/CoreEquipment-EU/3.0"^^xsd:anyURI.
}
""" ;
] .
prof10:DiffModel-EQ a sh:NodeShape ;
sh:property prof10:PROF10-EQ;
sh:target
[
a sh:SPARQLTarget ;
sh:prefixes cim: ;
sh:select """
SELECT DISTINCT ?this
WHERE {
?this rdf:type dm:DifferenceModel .
?this md:Model.profile "http://iec.ch/TC57/ns/CIM/CoreEquipment-EU/3.0"^^xsd:anyURI.
}
""" ;
] .
Questions to @Sveino @griddigit-ci @HarisVranaj (edit this comment and check the boxes here):
Is it true that:
This is better rewritten to ONE SPARQL with a VALUES table as hinted at https://github.com/Sveino/Inst4CIM-KG/tree/develop/shacl-improved#generalize-shapes
https://github.com/Sveino/Inst4CIM-KG/tree/develop/shacl-improved#generalize-shapes
CGMES_Constraints_Repository.xlsxdescribesPROF10(aka C:600:ALL:NA:PROF10) thus:It's implemented in
application-profiles-library\CGMES\CurrentRelease\SHACL\61970-600-1_Prof10-Header-AP-Con-Complex-SHACL.ttl,which is 700 lines, half are commented out, and the rest do the same thing:
md:Model.profile(SPARQLTarget)md:Model.DependentOnmd:Model.DependentOn/md:Model.profilehas certain valuesIt is full of useless pairs of
sh:SPARQLTargetlike this.The dependencies of a model don't vary with its form (Full vs Difference), so you should target by
md:Model.profilebut notrdf:type(The last question below is an exception, and I think it's incorrect)
Questions to @Sveino @griddigit-ci @HarisVranaj (edit this comment and check the boxes here):
Is it true that:
TPcan have any number of dependencies (doesn't restrict maxCount), as soon as one isSSH?SCcan depend on only one ofEQ, EQBD, OP?OPcan depend on only one ofEQ, EQBD, SC?SCcan depend onOP, andOPcan depend onSC???GLcan depend on maximum two of these four:EQ, EQBD, SC, OPDiffModel-SCcan depend onSC???I think that's false:
DiffModel-SCis based onSCbut doesn't depend on anotherSCThis is better rewritten to ONE SPARQL with a VALUES table as hinted at https://github.com/Sveino/Inst4CIM-KG/tree/develop/shacl-improved#generalize-shapes