Sveino / Inst4CIM-KG

Instance of CIM Knowledge Graph
Apache License 2.0
5 stars 1 forks source link

don't dictate the use of blank nodes #14

Open VladimirAlexiev opened 3 months ago

VladimirAlexiev commented 3 months ago

@Sveino The SHACL shape cited in https://github.com/Sveino/Inst4CIM-KG/issues/15 demands that a blank node should be used for md:Statement and goes on to call it "nested structure, compound datatype".

However blank nodes have many disadvantages:

They only have two "advantages":

A standard should not dictate the use of blank nodes in a KG.

griddigit-ci commented 2 months ago

I guess this md:Statement is a bit of a side effect. we need to see how much we need to focus on it.

VladimirAlexiev commented 2 months ago

This is used 10 times in 3 files:

grep -r sh:BlankNode .
./source/CGMES/v3.0/SHACL/RDFS/FileHeaderProfile.ttl:        sh:nodeKind     sh:BlankNode ;
./source/CGMES/v3.0/SHACL/RDFS/FileHeaderProfile.ttl:        sh:nodeKind     sh:BlankNode ;
./source/CGMES/v3.0/SHACL/RDFS/FileHeaderProfile.ttl:        sh:nodeKind     sh:BlankNode ;
./source/CGMES/v3.0/SHACL/RDFS/GeographicalLocationProfile.ttl:        sh:nodeKind     sh:BlankNode ;
./source/CGMES/v3.0/SHACL/RDFS/GeographicalLocationProfile.ttl:        sh:nodeKind     sh:BlankNode ;
./source/CGMES/v3.0/SHACL/RDFS/GeographicalLocationProfile.ttl:        sh:nodeKind     sh:BlankNode ;
./source/CGMES/v3.0/SHACL/RDFS/GeographicalLocationProfile.ttl:        sh:nodeKind     sh:BlankNode ;
./source/CGMES-NC/r2.3/ap-con/ttl/Header-AP-Con-SHACL.ttl:        sh:nodeKind     sh:BlankNode;
./source/CGMES-NC/r2.3/ap-con/ttl/Header-AP-Con-SHACL.ttl:        sh:nodeKind     sh:BlankNode;
./source/CGMES-NC/r2.3/ap-con/ttl/Header-AP-Con-SHACL.ttl:        sh:nodeKind     sh:BlankNode;

Please make an analysis how it is used and why.

VladimirAlexiev commented 1 month ago

https://github.com/3lbits/CIM4NoUtility/discussions/321#discussioncomment-10741521 is an example how blank nodes can be harmful: you cannot delete statements involving blank nodes by specifying them in reverseDifferences

griddigit-ci commented 3 weeks ago

Here the analysis

VladimirAlexiev commented 1 week ago

The newest scan shows these:

source/CGMES/v3.0/RDFSEd2Beta/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACLED2a_v3-0-0.ttl:        sh:nodeKind     sh:BlankNode ;
source/CGMES/v3.0/RDFSEd2Beta/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACLED2a_v3-0-0.ttl:                            sh:nodeKind  sh:BlankNode ;
source/CGMES/v3.0/RDFSEd2Beta/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACLED2a_v3-0-0.ttl:                            sh:nodeKind  sh:BlankNode ;
source/CGMES/v3.0/RDFSEd2Beta/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACLED2a_v3-0-0.ttl:                            sh:nodeKind  sh:BlankNode ;
source/CGMES/v3.0/RDFSEd2Beta/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACLED2a_v3-0-0.ttl:                            sh:nodeKind  sh:BlankNode ;
source/CGMES/v3.0/RDFSEd2Beta/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACLED2a_v3-0-0.ttl:                            sh:nodeKind  sh:BlankNode ;
source/CGMES/v3.0/RDFSEd2Beta/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACLED2a_v3-0-0.ttl:                            sh:nodeKind  sh:BlankNode ;
source/CGMES/v3.0/SHACL/ttl/61970-552-Header-AP-Con-Simple-SHACL_v3-0-0.ttl:        sh:nodeKind     sh:BlankNode ;
source/CGMES/v3.0/SHACL/ttl/61970-552-Header-AP-Con-Simple-SHACL_v3-0-0.ttl:        sh:nodeKind     sh:BlankNode ;
source/CGMES/v3.0/SHACL/ttl/61970-552-Header-AP-Con-Simple-SHACL_v3-0-0.ttl:        sh:nodeKind     sh:BlankNode ;
source/CGMES/v3.0/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACL_v3-0-0.ttl:        sh:nodeKind     sh:BlankNode ;
source/CGMES/v3.0/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACL_v3-0-0.ttl:        sh:nodeKind     sh:BlankNode ;
source/CGMES/v3.0/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACL_v3-0-0.ttl:        sh:nodeKind     sh:BlankNode ;
source/CGMES/v3.0/SHACL/ttl/61970-600-2_GeographicalLocation-AP-Con-Simple-SHACL_v3-0-0.ttl:        sh:nodeKind     sh:BlankNode ;
source/CGMES-NC/r2.3/ap-con/ttl/Header-AP-Con-SHACL.ttl:        sh:nodeKind     sh:BlankNode;
source/CGMES-NC/r2.3/ap-con/ttl/Header-AP-Con-SHACL.ttl:        sh:nodeKind     sh:BlankNode;
source/CGMES-NC/r2.3/ap-con/ttl/Header-AP-Con-SHACL.ttl:        sh:nodeKind     sh:BlankNode;

I checked 61970-600-2_GeographicalLocation-AP-Con-Simple-SHACL_v3-0-0.ttl and indeed it's about Address compounds.

this is necessary as the compound is parsed as blank node

What do you mean by "parsed as blank node"?