weso / shaclex

SHACL/ShEx implementation
http://weso.github.io/shaclex
MIT License
76 stars 17 forks source link

SHACL features #2

Open labra opened 7 years ago

labra commented 7 years ago

SHACL features based on: SHACL recommendation

Target selection

Feature Supported Pending
Target Node sh:targetNode :heavy_check_mark:
Class-based targets sh:targetClass :heavy_check_mark:
Implicit class targets :heavy_check_mark:
Subjects of targets sh:targetSubjectsOf :heavy_check_mark:
Objects of targets sh:targetObjectsOf :heavy_check_mark:

Shapes

Feature Supported Comments
sh:name :heavy_check_mark:
sh:description :heavy_check_mark:
sh:group :heavy_check_mark:
sh:order :heavy_check_mark:
owl:imports :heavy_check_mark:
sh:entailment :x: The entailment declaration is parsed but no entailments are offered by now
sh:shapesGraph :x: The sh:shapesGraph declaration is part of the data graph. shaclex clients can specify which shapes graph they want to invoke

Validation report

We generate a SHACL validation report. We generate a Report data structure which has more information than the SHACL recommendation spec. For example, we inform about the nodes that have been validated as well as the nodes that failed.

Feature Supported Pending
sh:deactivated :heavy_check_mark:
sh:message :heavy_check_mark:
sh:severity :heavy_check_mark:

Constraints

Feature Supported Pending
Node constraints :heavy_check_mark:
Property shapes (sh:path) :heavy_check_mark:
Path constraints :heavy_check_mark:

Constraint components

Feature Supported Pending Comments
sh:class :heavy_check_mark:
sh:datatype :heavy_check_mark:
sh:nodeKind :heavy_check_mark:
sh:minCount :heavy_check_mark:
sh:maxCount :heavy_check_mark:
sh:minInclusive, sh:maxInclusive, sh:minExclusive, sh:maxExclusive :heavy_check_mark:
sh:minLength :heavy_check_mark:
sh:maxLength :heavy_check_mark:
sh:pattern :heavy_check_mark:
sh:flags :heavy_check_mark:
sh:languageIn :heavy_check_mark:
sh:uniqueLang :heavy_check_mark:
sh:equals :heavy_check_mark:
sh:disjoint :heavy_check_mark:
sh:lessThan :heavy_check_mark:
sh:lessThanOrEquals :heavy_check_mark:
sh:not :heavy_check_mark:
sh:and :heavy_check_mark:
sh:or :heavy_check_mark:
sh:xone :heavy_check_mark:
sh:node :heavy_check_mark:
sh:qualifiedValueshape, qualifiedMinCount, qualifiedMaxCount :heavy_check_mark:
sh:qualifiedValueshapesDisjoint
sh:closed :heavy_check_mark:
sh:ignoredProperties :heavy_check_mark:
sh:hasValue :heavy_check_mark:
sh:in :heavy_check_mark:

SPARQL based constraints

(:x:) Non-supported: The core implementation is defined in Scala.

Under the hood, it uses Jena/RDF4j and SPARQL, so it could also implement SHACL-SPARQL in the future.

simonmesserli commented 7 years ago

Is sh:path supported yet? Property constraints contains sh:predicate and also sh:path.

labra commented 7 years ago

Not yet. The row path constraints was the one that indicated that it didn't support sh:path yet. I have added a specific row to clarify that better. It is intended to add support for them once SHACL gets more stable.

labra commented 7 years ago

I have added support for sh:path and updated the table accordingly.

Also removed some features that are no longer part of the spec.

neormx commented 5 years ago

Hi, is sh:deactivated still not supported on 0.1.02?

labra commented 5 years ago

We have just added support for sh:deactivated, sh:message and sh:severity. Thanks for remembering us.

The only pending feature is owl:imports.

labra commented 5 years ago

owl:imports has been added. I didn't find tests in the SHACL test-suite, so it is not possible to ensure that the way owl:imports has been implemented is right. It is implemented in a way that it just tries to load the IRI pointed by the owl:imports declaration and that it avoids infinite loops keeping track of the visited IRIs. One possible problem is that there is no distinction between any kind of owl:imports declaration, so something like:

<> owl:imports <shapes1.ttl>

is identical to:

<another_Iri> owl:imports <shapes1.ttl>

I.e. the subject of the owl:imports is just ignored.

There are currently two possible pending features:

It is possible to use both features using the shaclex API although it could be better to embed those features in the SHACL processor following the spec. It seems that there are not tests in the SHACL test-suite to check these features.