samvera-labs / dog_biscuits

Models, vocabularies and behaviours for Hyrax applications.
Other
11 stars 4 forks source link

End to end implementation of external authorities and external controlled vocabularies #23

Open ghost opened 7 years ago

ghost commented 7 years ago

Review refactoring of models and indexing in Hyrax: See https://github.com/projecthydra-labs/hyrax/commit/3a6c072f6dfad1bc8a7ec3c9d6c81f441e1ce6e9

Three options for any 'controllable' property:

Need to capture this in code w/o need for duplicate properties. Duplicate properties in current implementation using HABM is ugly and needs refactoring.

One approach (inspired by Valkyrie) is to:

  1. flag fields as linked data attributes
  2. check for RDF::URI (or just URI) and retrieve linked data from the received URI. This would work for both external and internal, given that internal are Fedora URIs from which we can retrieve RDF.
ghost commented 6 years ago

Reviewing all of this, I came up with the idea of being able to specify the class for a field using configuration (something along the lines of DogBiscuits.config.creator_class) so a local choice could be made about how the property functions.

This could work with controlled_properties, with nested attributes. These create ActiveTriples::Resource objects rather. These can be saved as fragement URIs.

Doesn't work for HABM.

Needs more thought!

ghost commented 6 years ago

To support Agent and other Authority objects fully needs more work on DB and Hyku, in terms of:

Loads!

ghost commented 6 years ago

Thought ... nested attributes could be useful in terms of adding a role instead of having a load of 'role' properties, so the nested resource could be:

contributor >

contributor_label can be derived from the id and stored as _label