NYULibraries/ichabod — pull request #52 by scotdalton (2014-08-26 15:15:05+00:00)
Title: Feature/add fda examples

@NYULibraries/hydra
This PR adds an example to the FacultyDigitalArchive spec for the case in which there are multiple identifiers for a Resource and we don't want to use the first one we find.

Based on the example, the code in `Resource` now handles the `pid_identifier` based on the following logic:

1. First, we look for a "handle" to use as the `pid_identifier`. A "handle" is an identifier that starts with the pattern "http://hdl.handle.net".
2. If we don't have a "handle" we look for a URL. For now a url is anything that starts with "http://" or "https://".
3. If we don't have a "handle" or a URL, we just grab the first one we see.

If the above logic doesn't satisfy the needs for a particular source, a `SourceReader` can explicitly set the `pid_identifier`.

There is also a change to the `FacultyDigitalArchive` `ResourceSet` which now stores non URL identifiers in the NYU Core "citation" field before creating an `Nyucore` model.