LD4P / arm

BIBFRAME extension ontologies for modeling bibliographic metadata in the art and rare materials domains.
https://ld4p.github.io/arm/
16 stars 10 forks source link

Apply PropertyShape to only one subclass of the form shape for a class #70

Closed rjyounes closed 6 years ago

rjyounes commented 6 years ago

@sfolsom I have a form shape for arm:Enclosure, and there's a PropertyShape for dcterms:hasPart that only applies to the arm:Binding subclass. Is it sufficient to specify the constraint sh:class arm:Binding on the PropertyShape, or do I need to create a separate form shape for Bindings, and another form for all other enclosure types?

rjyounes commented 6 years ago

At the moment I've created a new form shape for Bindings, and removed Binding from the rdf:type options on the Enclosure form shape. Would this in theory cause problems, because Bindings are also Enclosures, so there would be duplicate fields for some PropertyShapes (I say in theory because currently the form generation is not automated).

sfolsom commented 6 years ago

I think this touches on our expectations for form shapes vs. validation shapes. With validation shapes we need all the data tested using the validation shapes to pass inspection, but I need a lot more experience with managing shape graphs and pairing with instance data, before I can speak confidently about this. With Form shapes, it seems to me that we can't easily combine general form shapes with more specific form shapes, because it would require knowing when/how to dedupe/aggregate/replace PropertyShapes between the different forms and sh:order and other non-validating assertions would be hard to make work. My best guess is that each PropertyShape needs a sh:class/sh:in that matches up to one or more form shapes with sh:targetClasses [I'm still trying to decide whether lists of sh:targetClasses is better than related PropertyShapes with sh:path rdf:type, or not]. Long story short, I think I'd recommend the PropertyShape with bf:hasPart PropertyShape to list all Enclosure options including Bindings and then have a separate form for Bindings that includes all the information needed to describe Bindings. The app should look at some combination of sh:class, sh:targetClass/sh:path rdf:type and decide which form to use.