dsp-api icon indicating copy to clipboard operation
dsp-api copied to clipboard

Custom Object Class Constraints for Standoff Links

Open tobiasschweizer opened this issue 5 years ago • 2 comments

Currently, standoff links have the object class constraint of knora-base:Resource.

Would it make sense to add the possibility to make a subclass of StandoffLink whose linking property is more specific? E.g., one could make a PersonStandoffLink linking to a beol:Person.

The advantage would be that Knora not only makes sure that the target exists and is a knora-base:Resource, but also that it has the correct type.

tobiasschweizer avatar Jan 07 '19 14:01 tobiasschweizer

I think that it would make sense.

Standoff is so flexible and accessible that it defeats an otherwise well structured data model with constraints on links.

And it could end up making some searches impossible, like give me resources that have a link to a resource class Person.

On the other hand, if you have a given person (a Person instance), you can ask for linked resources and find them.

As another example: if you link Notes to Person with standoff links, you might want to distinguish between different kind of links like character, author, etc.

loicjaouen avatar Jan 09 '19 09:01 loicjaouen

I agree, and I think this goes in the same direction as #438.

benjamingeer avatar Jan 09 '19 09:01 benjamingeer