ndlib/rof — pull request #3 by jeremyf (2014-10-16 13:42:13+00:00)
Title: Adding "id" as a surrogate for "pid"

TL;DR - If a "pid" is not specified, attempt to use "id"

In working on the Fedorus SOLR adapter, I'm running into challenges
regarding requirements for ROF and a Hydra-based SOLR schema.

One of those challenges is that a SOLR document does not allow for
'pid' as one of the field names. It requires 'id'. I can get this to
work.

However, the ROF format requires a 'pid' key and will attempt to
ingest an item key of 'id'.

I'm trying using the InMemory adapter as the control adapter. My
coercer and mapping should work for both the control adapter and the
corresponding adapter that I'm building: Solr or Fedora.

I would like to use the same map for the Fedora, Solr, and InMemory
adapter/coercer pairings.

See the following link for an example:

https://github.com/jeremyf/fedorus/blob/e50494522c7db73c72716d0cf165b38489cb1132/test/fedorus_test.rb#L40-L60