Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHACL to use sh:targetObjectsOf (not RDFS reasoning) #278

Open
VladimirAlexiev opened this issue May 16, 2021 · 4 comments
Open

SHACL to use sh:targetObjectsOf (not RDFS reasoning) #278

VladimirAlexiev opened this issue May 16, 2021 · 4 comments
Assignees
Labels
agreed ontology Concerned with the Linked Data models for EPCIS/CBV validation Validation of EPCIS data

Comments

@VladimirAlexiev
Copy link
Contributor

Does EPCIS RDF require RDFS reasoning? We should specify that in the "semantics" section.

I tend to say Yes because there are various Json nodes that don't carry isA but having a type on every node is a good practice. The EPCIS ontology has mostly single-class ranges, so rdfs:range reasoning will infer a useful type.

This will keep SHACL attachment consistent and simple.

The one disadvantage is that a few useless anonymous owl:union classes will also be inferred. (TODO: count them)

@CraigRe CraigRe added ontology Concerned with the Linked Data models for EPCIS/CBV validation Validation of EPCIS data labels May 18, 2021
@CraigRe CraigRe added the agreed label May 18, 2021
@VladimirAlexiev
Copy link
Contributor Author

VladimirAlexiev commented May 18, 2021

Two options for the doc:

  • "A semantic repository storing EPCIS data should support RDFS reasoning (in particular rdfs:range), because EPCIS SHACL shapes rely on nodes having rdf:type to target them for validation"
  • "A semantic repository storing EPCIS data does not need to support any reasoning, because EPCIS SHACL shapes use sh:targetObjectsOf to find nodes for validation, even when they don't have a rdf:type"

@CraigRe
Copy link
Collaborator

CraigRe commented May 18, 2021

@VladimirAlexiev will reformulate SHACL to leverage sh:targetObjectsOf (instead of sh:targetClass ) in most situations except for rules applying to specific subclasses of EPCISEvent.
@CraigRe might need to add normative sentence to the effect that "EPCIS RDF requires RDFS reasoning", in which case
@VladimirAlexiev will add a SMALL explanatory passage and draft 2 options.

@VladimirAlexiev VladimirAlexiev changed the title RDFS reasoning? SHACL to use sh:targetObjectsOf (not RDFS reasoning) May 20, 2021
@VladimirAlexiev
Copy link
Contributor Author

  1. Current targeting in EPCIS-SHACL.ttl is mostly by class. I marked ??? nodes that may not have that class, and !!! cases where the class is wrong
     14:    sh:targetObjectsOf epcis:eventList;
     35:    sh:targetClass epcis:ObjectEvent ;
     67:    sh:targetClass epcis:AggregationEvent ;
     96:    sh:targetClass epcis:AssociationEvent ;
    127:    sh:targetClass epcis:TransactionEvent ;
    162:    sh:targetClass epcis:TransformationEvent ;
    193:    sh:targetClass epcis:BusinessTransaction ; ???
    201:    sh:targetClass epcis:ErrorDeclaration ;    ???
    213:    sh:targetClass epcis:SourceList ;          !!!
    222:    sh:targetClass epcis:DestinationList ;     !!!
    231:    sh:targetClass epcis:QuantityElement ;     ???
    514:    sh:targetClass epcis:EPCISDocument  ;      ???
    647:    sh:targetClass epcis:SensorMetadata ;      ???
    660:    sh:targetClass epcis:SensorReport ;        ???
  1. It has 17 sh:NodeShape but only 14 sh:target. Eg epcis:SensorElementListShape is missing target
  2. The UML diagram has 15 nodes, plus 2 missing (Document, DocumentBody), such shapes should be added
  3. Messages mentioning xsd:anyURI must be fixed because that's different from sh:IRI (an IRI/URI)
    sh:nodeKind sh:IRI ; sh:message "readPoint must be an xsd:anyURI"

@VladimirAlexiev
Copy link
Contributor Author

VladimirAlexiev commented Mar 16, 2023

nodes that may not have that class

Because isA field is optional in these nodes

@CraigRe or @RalphTro or @mgh128 Who can make these fixes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agreed ontology Concerned with the Linked Data models for EPCIS/CBV validation Validation of EPCIS data
Projects
None yet
Development

No branches or pull requests

3 participants