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

Referring to things in other namespaces #237

Open
SvenLieber opened this issue Oct 7, 2019 · 0 comments
Open

Referring to things in other namespaces #237

SvenLieber opened this issue Oct 7, 2019 · 0 comments
Labels
enhancement Enhance an existing feature

Comments

@SvenLieber
Copy link
Collaborator

SHACL has the node constraint, it can be used to say that the object found at a path should adhere to the shape specified with the node constraint (see an example below).

When specifying the value for the node constraint a shape from somewhere else in the web can be referenced (ops:PersoonsgebeurtenisShape in the example).
The problem is now the value field: Using a prefix with colon is just recognized as string and then exported wrong.

It would be nice that in the case of the node constraint, but also when specifying the path of a property shape, I could on-the-fly add a new prefix to the unSHACLed application. E.g. by having a button and showing the Namespaces modal dialog, or something similar.

Example:

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix shp: <http://fast.ilabt.imec.be/states#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix o-steps: <https://fast.ilabt.imec.be/ns/oslo-steps#> .
@prefix o-persoon: <https://data.vlaanderen.be/ns/persoon#> .
@prefix ops: <https://data.vlaanderen.be/shacl/persoon-basis#> .

# 
# A shape to specify a valid date of birth
# 
shp:birthDateShape a o-steps:StateShape ;
  rdfs:label "Citizen birth date"@en ;
  rdfs:comment "User with a valid birth date"@en ;
  sh:targetClass o-persoon:Inwoner ;
  sh:property shp:validBirth .

# 
# There should be exact one heeftGeboorte property
# and additionally the object of the heeftGeboorte property should be a valid
# PersoonsgebeurtenisShape
shp:validBirth a sh:PropertyShape ;
  rdfs:label "Valid date of birth"@en ;
  sh:path o-persoon:heeftGeboorte ;
  sh:minCount 1 ; 
  sh:maxCount 1 ; 
  sh:class o-persoon:Geboorte ;
  sh:node ops:PersoonsgebeurtenisShape .
@SvenLieber SvenLieber added the enhancement Enhance an existing feature label Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhance an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant