oaeproject/Hilary — pull request #744 by simong (2014-01-15 11:10:13+00:00)
Title: Publications + Symplectic ingester

An initial attempt at publications/symplectic integration. I'm mainly looking for feedback on the APIs/Data model..

## Publications

Publications are not linked to any specific tenant and have a very basic datamodel (for now).
Each publication is identified by 1 or more source IDs. For example:

The publication p:abc123def which was ingested from Symplectic. They originally harvested it from
Pubmed and Web of Science. The source IDs for this publication would look something like:
* pubmed#CC-112-aeda
* wos#32146541234525

This allows for having multiple ingesters which can ingest publications but keep duplication to a minimum.
For example, if there would ever be a pubmed ingester, it should ingest the same publication with
source ID `pubmed#CC-112-eada`. The ingestion API will detect that there already is a publication for this source ID
in the system and will not create a second record.

OAE users from different tenants can be linked to a single publications. This is to enhance
the cross-tenant. Linking a user to a publication happens by passing in:
* the publication ID
* the OAE user ID
* the name of the user as found in the publication

The passed in name doesn't have to be a full match as some (very basic) disambiguation will be used (JaroWinkler).

### REST API

This logic is also exposed on the REST API even though there is no current UI need for it (yet).
This has been done so data loads with the model loader can happen. There is a configuration option in the admin UI
which allows an admin to enable this for regular users. Tenant and Global admins can always use the REST API

## Symplectic

An example ingester for symplectic has been added. It's able to do either full or incremental synchronizations.
It will run a synchronization on a configurable (config.js) interval.
On a full update it will:
* Iterate over all the users in Symplectic, fetch their publications and ingest them

On an incremental update it will:
* Iterate over all the *updated* users in Symplectic since the last run, fetch their publications and ingest them
* Retrieve publications for any new OAE users
* Retry any user that failed previously

Symplectic can be enabled on a tenant-by-tenant basis in the Admin UI.
Publications that are marked as invisible will not be ingested.