projecthydra/curate — pull request #490 by jeremyf (2014-04-09 20:16:05+00:00)
Title: Reworking contributors to not create people

TL;DR
* We exposed a Contributor attribute in the UI
* This was transformed to the :creator in the datastream
* When we persisted the object any literal for a contributor would be
used to create a Person object

To Run the Conversion from Command Line

$ rails console
> require 'curate/migration_services/runner'
> runner = Curate::MigrationServices::Runner.new(container_namespace: "::Curate::MigrationServices::MigrationContainers::RelatedContributor")
> runner.run

To Run via Capistrano, add the following to your Capfile, then look
at the available cap tasks

require 'curate/migration_services/capistrano'

Details

For some confounding reason, the form element for Contributor was
being persisted to the persisted :creator predicate and not a
:contributor predicate.

The assumption for this transformation is that any triple with the
:creator predicate and an object that is a PID can safely be mapped
from the :creator predicate to the :contributor predicate. The reason
being that we have not exposed a means of appending PIDs to :creator
except via the UI. And we have not exposed the :creator attribute
to the UI.

In the case of Image, we've only ever exposed the :contributor
attribute.

See also: 0d57a81dd2d62191f7e0267def5459f93d42c21b
See also: ndlib/planning#137

JIRA References:
https://jira.duraspace.org/browse/HYDRASIR-275