Hyrax: Proposal to change mapping of required metadata property:keyword

Created on 17 Aug 2017  路  9Comments  路  Source: samvera/hyrax

Descriptive summary

A discussion in the samvera/metadata slack channel occurred about the current mapping of required field property:keyword to DC11.relation in basic_metadata.rb

Current DC definition of relation is "A related resource."

Rationale

The actual intended usage of keyword (and how most seem to be using it) per discussion in the slack channel is for either keywords or tags. This would still be an uncontrolled vocabulary field and separate from subject.

Further investigation by the Samvera Metadata IG led to a discussion during our July call about changing the mapping to SCHEMA:keywords instead.

Changing the default mapping of keyword would also enable those who wish to use a relation-type property to do so correctly without have to alter the default.

Proposal

Change: property :keyword, predicate: ::RDF::Vocab::DC11.relation

to: property :keyword, predicate: ::RDF::Vocab::SCHEMA.keywords

If accepted, http://www.schema.org would also need to be added to the list of namespaces.

I'm also tagging @samvera/hyrax-metadataists for any feedback.

data migration enhancement metadata

Most helpful comment

I support this. We would need to create a migration task for existing data (see recent discussion of changing isPartOf #1461).

All 9 comments

I support this. We would need to create a migration task for existing data (see recent discussion of changing isPartOf #1461).

I also think this is a good change to make and worth the migration task to adjust current instances. schema:keywords is a more accurate property and sets things up better for Hyrax use out of the box.

(And I believe ::RDF::Vocab::SCHEMA is already available: https://github.com/ruby-rdf/rdf-vocab/blob/develop/lib/rdf/vocab/schema.rb)

I can't add labels (which is ok) but what is the next step to move this forward? Thanks!

I think @mjgiarlo would be the person to add labels. I should have some time in a couple of weeks to take a look at this. The change is easy, but I need to put some thought into the migration.

Hi! I added some labels. LMK if I got the right ones.

Just having a think about how to approach migrating data when the predicate changes, I have come up with the following idea (with some inspiration from #1461) ... I am open to better ways of approaching this!

  • change the predicate for keyword (this will effectively orphan existing data in fedora and make it inaccessible to hyrax)
  • to mitigate 鈽濓笍 add a legacy_keyword property using the old predicate so that the existing data is not lost
  • create a rake task to migrate all old data to the new property/predicate
  • add a deprecation warning that the legacy field will be removed in version xxx with a note about running the task

@geekscruff This sounds like a good plan forward. I'd argue against orphaning the existing data. How do we make this happen? Thanks!

Just re-upping that this issue is endorsed by the metadata IG in our review of Hyrax basic metadata fields. Note that in data migration, schema:keywords is a comma-separated list whereas the current dc:relation is a repeating field.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tahirpoduska picture tahirpoduska  路  6Comments

vantuyls picture vantuyls  路  6Comments

straleyb picture straleyb  路  6Comments

carolyncole picture carolyncole  路  5Comments

jcoyne picture jcoyne  路  5Comments