Support inverse relationships #82

Open
opened 2026-09-29 15:05:49 +00:00 by scossu · 0 comments
Owner

Add a schema configuration option that allows the definition of an inverse relationship for resource-based properties.

E.g., if a contributor property is defined and has a resource as target, the resources pointed to by this property should display a virtual property (i.e., in presentation only)contributed_to that points back to the previous resource.

This would allow to display bidirectional links in the presentation. It has no semantic value, and it shall not infer the reverse relationship in the database.

A few metadata points are required to display the relationship properly. E.g. for contributor.

{
    uri = "pas:contributor",
    label = "contributor",
    type = "resource",
    inverse = {
        id =  "contributed_to",
        uri = "pas:contributedTo",
        label = "Contributed to".
        description = "Artifact that this agent contributed to.",
    }
}

Optionally, as part of this ticket, a PROP_REFLECT flag, mutually exclusive with the inverse definition, can be defined. This would define a reflexive property, i.e. a property with an inverse that is exactly the same property (e.g., sibling).

Add a schema configuration option that allows the definition of an inverse relationship for resource-based properties. E.g., if a `contributor` property is defined and has a `resource` as target, the resources pointed to by this property should display a virtual property (i.e., in presentation only)`contributed_to` that points back to the previous resource. This would allow to display bidirectional links in the presentation. It has no semantic value, and it shall not infer the reverse relationship in the database. A few metadata points are required to display the relationship properly. E.g. for `contributor`. ``` { uri = "pas:contributor", label = "contributor", type = "resource", inverse = { id = "contributed_to", uri = "pas:contributedTo", label = "Contributed to". description = "Artifact that this agent contributed to.", } } ``` Optionally, as part of this ticket, a `PROP_REFLECT` flag, mutually exclusive with the `inverse` definition, can be defined. This would define a reflexive property, i.e. a property with an inverse that is exactly the same property (e.g., `sibling`).
scossu added this to the v1.1.0 milestone 2026-09-29 15:05:49 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ktx/pocket_archive#82
No description provided.