Closed natan-cox-cognizone closed 1 year ago
Could you include also :PathPropertyShape or :DatatypePropertyShape. Because the popups show that shapes that are generating the violations are those two, not the :MaxXountPropertyShape.
From the popups I would expect that for example :PathPropertyShape looks in minimal form like:
:PathPropertyShape
sh:path sh:path;
sh:nodeKind sh:Literal ;
Those two statements does not even need to be in one file. If you have for example :PathPropertyShape in two different files, they will still work as one (if the full IRI is exactly the same).
If I remember correctly (and this is specific to the plugin, not SHACL in general):
at 3. So for example sh:maxCount might show issue that there are to many objects for a property even if those are in two separate files (with the exact same subject and predicate).
The points 1. and 3. where arbitrary decision, that this is how the plugin will work. But that could be changed - e.g. project option might be implemented to switch between graph union and single file (let me know if this is something that will be useful for you). The point 2. Is performance dictated. In order to generate report just for one file at a time (also this is how most IDE inspections work in IntelliJ platform).
Short version:
Maybe the example I took was not the best, since it is about the SHACL of SHACL. This
@prefix : <https://demo.app/shacl/> .
@prefix sh: <http://www.w3.org/ns/shacl#>.
:MaxCountPropertyShape
a sh:PropertyShape ;
sh:path sh:maxCount ;
sh:datatype xsd:integer ;
sh:maxCount 1 ;
sh:nodeKind sh:Literal ;
sh:name "Max Count" .
is kind of similar to the SHACL of SHACL in specification document document which looks like
sh:property [
sh:path sh:maxCount ;
sh:datatype xsd:integer ; [# maxCount-datatype](https://www.w3.org/TR/shacl/#syntax-rule-maxCount-datatype)
sh:maxCount 1 ; [# maxCount-maxCount](https://www.w3.org/TR/shacl/#syntax-rule-maxCount-maxCount)
] ;
I am not sure what a PathPropertyShape is. Or what you are trying to achieve. I cannot find it in the SHACL ontology, nor do I see it in the SHACL specifications?!
Note: we also have the same "error" on more normal SHACL documents.
A more normal example, is something like this:
"I cannot find it in the SHACL ontology, nor do I see it in the SHACL specifications?!"
It is all about the content of your project (and global graphs if you added them in the settings).
Could you do quick search in project (Scope: All Places, no filtering by file mask):
The text you should look for is from this specific place (skip the : or prefix):
Let me know if you find something (also if you will find nothing at all). It will help me narrow the investigation area.
Aha. Yes, we have it in one of our files. So, what are we doing wrong?
It is sh:nodeKind sh:Literal
which looks a bit suspicious, I guess.
And sh:datatype rdfs:Resource
...
Cool, thanks for the tip. I guess I misread the error message.
:PathPropertyShape
a sh:PropertyShape ;
sh:path sh:path ;
sh:datatype rdfs:Resource ;
sh:maxCount 1 ;
sh:nodeKind sh:Literal
.
If I have the following SHACL
Then I get
and also
I am a bit confused why these are errors?