Skip to content

SHACL Inference Rules - Use Case: Data Filtering #299

Open
@robert-david

Description

@robert-david

This use case originates from a project about wood production and DPPs. Production data is processed in a distributed environment, and basically handed over from one part in the production chain to the next one. During this process, there needs to be a clear definition of which data has to be there, but also which data should not be handed over because of confidentiality reasons. This is basically a data filtering use case. Systems should be able to automatically filter out confidential data based on the declarative description in shapes. The following example data is anonymised because of project confidentiality reasons.

Data graph:

@prefix ex: <http://example.com/ns#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

ex:F1L1 a ex:Log, ex:RawMaterial .
  ex:F1L1 ex:label "F1L1" .
  ex:F1L1 ex:hasProvenance "forest" .
  ex:F1L1 ex:GPS_coordinate_lat "12.345678" .
  ex:F1L1 ex:GPS_coordinate_long "12.345678" .
  ex:F1L1 ex:trunc_diameter "67" .
  ex:F1L1 ex:wood_species "spruce" .
  ex:F1L1 ex:country "austria" .
  ex:F1L1 ex:customer "anonymous" .

  ex:F1L1 ex:isUsedToProduce ex:F1B1 .
  ex:F1L1 ex:refersToTransport <http://example.com/transport/58480> .

  ex:F1B1 a ex:Board, ex:Material .
  ex:F1B1 ex:label "F1L1B1" .
  ex:F1B1 ex:boardNo "1" .
  ex:F1B1 ex:assortment "Sawn Board" .
  
<http://example.com/transport/58480> a ex:Transport .
  <http://example.com/transport/58480> <http://example.com/loading_point_(GPS_lat)>
      "12.345678" .
  <http://example.com/transport/58480> <http://example.com/loading_point_(GPS_long)>
      "12.345678" .

Shapes graph:

@prefix ex: <http://example.com/ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

ex:MaterialFilterShape a sh:NodeShape ;
    sh:targetClass ex:RawMaterial ;
    sh:property [
        sh:path [ sh:alternativePath
            ( ex:customer ex:GPS_coordinate_lat ex:GPS_coordinate_long ) ] ;
        sh:maxCount 0 ;
    ] .

ex:TransportFilterShape a sh:NodeShape ;
    sh:targetClass ex:Transport ;
    sh:property [
        sh:path [ sh:alternativePath
         ( <http://example.com/loading_point_(GPS_lat)> <http://example.com/loading_point_(GPS_long)> ) ] ;
        sh:maxCount 0 ;
    ] .

Metadata

Metadata

Assignees

No one assigned

    Labels

    InferencingFor SHACL 1.2 Inferencing spec.UCRUse Cases and Requirements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions