Open simeonackermann opened 4 years ago
I suggest to also take the property dash:applicableToClass
(http://datashapes.org/dash#) into account.
Also check this: http://datashapes.org/forms.html
Regarding TODO multiple rootShapes. I think a drop down would be good or just support a singe rootshape and the including application has to care about making a selection.
Regarding the placeholder
I think this is not very important as it is just some kind of label you can make a switch to either render the label as placeholder or leave the placeholder empty.
Regardging iri generation: Keep the string pattern, which is similar to the way how RML is doing it or adapt the way how SHACL expressed property paths. Or a combination of both:
@prefix ex: <http://example.org/> .
# the following prefixes are fake
@prefix rdform: <http://rdform.org/> .
@prefix foaf: <http://foaf.org/> .
@prefix sh: <http://shacl.org/> .
ex:shape rdform:iripattern ( [rdform:iri ex:] "person-" foaf:name )
ex:shape rdform:iripattern "http://example.org/person-{<http://foaf.org/name>}"
ex:kind rdform:iripattern ( [rdform:iri ex:] "kind-von-" ([ sh:inversePath ex:parent ] foaf:name) )
Hm, the class type rdf:type
, given by sh:targetClass
is quite deep integrated into the logic ;( It's not an easy cake to have it optional...
Implement SHACL as template language
Branch: https://github.com/simeonackermann/RDForm/tree/feature-shacl
Usage
Attributes
template
(Object) required, JSON-LD SHACL shaperootShape
(string), required if multiple shapes of type sh:NodeShape given, defines the root shapehooks
,prefixes
,base
,debug
,verbose
etc. those are also with SHACL shapes supported supportedCurrent supported SHACL properties
Class (
sh:NodeShape
)Property (
sh:property
)PropertyShape
else TODO