Skip to content

Properties_Relations_Authorities

Julie Allinson edited this page Dec 7, 2018 · 3 revisions

Properties, Relations and Authorities

This is where things get a bit more speculative.

An aside

I see various discussions on these topics in the Hydra slack, some on the modelling side and some of the coding side. I have certainly seen comments folks who are not in favour of has_and_belongs_to_many but this code, and the documentation on this wiki is an attempt to do things a the way AF/PCDM/Works/Hyrax supports, but it isn't necessarily the best way, or the most future-looking way!

There have been some recent changes to Hyrax which may change some of the code here. For example, Justin has removed indexing from properties and that is probably a good pattern to adopt.

Properties and Relations

Properties are good for when the value (the object of the triple being created) is a Literal value, eg. a String, a Date or a non-RDF URI.

But what about when the value is:

  1. An RDF Resource in the repository
  2. An RDF Resource somewhere else

RDF Resources in the repository

These can be achieved with has_and_belongs_to_many relations.

RDF Resources elsewhere

These can be achived with different properties.

Controlling Input

The current Hyrax code tends to opt for adding 'Labels' from authorities / controlled lists into the object property. This makes sense from the perspective of simplicity and index-ability ... a string value is automatically in the solr document, ready for use in searches, facets and results.

But

It isn't very linked data

  • It prevents us from updating the value if it changes in the source authority.
  • It prevents us from dynamically following links or grabbing more information.