[EP-tech] Re: Associating eprints with other entities

Jan Ploski jpl at plosquare.com
Wed Sep 5 17:44:38 BST 2012


Tim Brody wrote:
> On Thu, 30 Aug 2012 21:37:39 +0200, Jan Ploski<jpl at plosquare.com>  wrote:
>> Hi,
>>
>> I'd like our eprints to be searchable using attributes of other,
>> associated entities. Specifically, we want to be able to search for
>> eprints that were published in journals that match certain criteria
>> (e.g. show all eprints published in OpenAccess journals). The attribute
>> values of journals may of course change in time and such changes should
>> be reflected immediately for all associated eprints.
>>
>> The quickest and most primitive approach would be to reproduce the
>> desired journal attributes as metadata fields on eprints themselves and
>> set the values whenever an eprint is saved. But that would call for some
>> mechanism to ensure consistency when the journals themselves change
>> (e.g. if a journal becomes OpenAccess, update all eprints that were
>> published in it accordingly, to support search; perhaps through a db
>> trigger).
>>
>> Furthermore, the direct approach of just storing the journal title in a
>> text field (rather than some stable foreign key) seems bad for ensuring
>> referential integrity (journal titles might change, too).
>>
>> So I was wondering whether it would be proper to model the journals as a
>> new dataset and use itemref type fields to refer to them, or whether
>> there are other recommended approaches. Do you know of any examples that
>> might point me into the right direction?
>
> Hi,
>
> You can create a separate journals dataset and use itemref to tie the
> journal into the eprint. There are some business-process issue with that
> approach - how do users supply unlisted journal titles, who manages that
> data etc.
>
> Any other approach will require building an extension onto EPrints. You can
> control how searches happen by creating a custom 'MetaField' e.g. by
> returning a condition that queries a separate table.
>
> No simple solutions I'm afraid, at least until we get further along with
> adding support for CRIS-like features.

Tim,

Thanks for the clarifications. For the time being I decided to address 
the problem at database level with triggers, by keeping redundant data 
between the custom journals table and eprint, translating the 
user-entered journal titles into foreign keys on save, and writing back 
changed journal attributes into associated eprints.

The trouble I saw with itemref in 3.0.5 was that there was apparently no 
way to search eprints linked by itemref to journals with particular 
attributes. I think that your comment about MetaField with separate 
table is true for the current version (where I saw a search on 
userid.username), but not for 3.0.5... which we'll have to stick with at 
least for a short while.

Regards,
Jan Ploski


More information about the Eprints-tech mailing list