Skip to content

filtering on a class based target #522

@sfolsom

Description

@sfolsom

I was looking to define a class target more narrowly based on a particular value of a particular property, and there doesn't seem to be a built in way in SHACL to do this. Then I came across https://www.w3.org/TR/shacl-af/, and I'm exploring sh:filterShape. I'm wondering if the following is valid SHACL.

:EBooksShape a sh:NodeShape ;
  sh:targetClass ex:Publication;
  sh:filterShape [
      sh:property [
        sh:path ex:carrier
        sh:value :Electronic
      ]
    ]

The use case is to define separate targets using the ex:Publication class, one for when the ex:carrier value is :Electronic, and one for when the value is :Print.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions