EPrints Technical Mailing List Archive

Message: #09143


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Field author missing


Hi Hans,

I am replying to this on the EPrints tech list as well, as my answers may be useful to others deploying EPrints 3.4 for the first time.

Now I have seen your archive's cfg/cfg.d/eprint_fields.pl, I can see what has happened.  In EPrints 3.4, the concepts of flavours was introduced.  The main releases of EPrints come with zero which is the most basic repository that does not have fields like creators or id_number (just the ones you show below and a few other core/hardcoded fields needed for administrative purposes) and pub which is the research publications flavour.  Depending on how you installed EPrints and then created an archive you may have created a zero rather than a research publications repository, the latter of which will have most if not all of the fields you need.

First, check that you have a non-empty directory called pub_lib under the flavours directory for EPrints.  (EPrints is usually installed under either the /usr/share/eprints/ or /opt/eprints3/ path).  If you don't have this directory you can download pub_lib for EPrints 3.4.4 (latest) at:

https://files.eprints.org/2715/2/eprints-3.4.4-flavours.tar.gz

If you unzip this and copy it to the flavours directory.  The next step is to create a new archive using the command (substituting EPRINTS_PATH as appropriate):

EPRINTS_PATH/bin/epadmin create pub

When prompted to answer various questions make sure you use a different archive ID to the initial "zero" archive you created.  Otherwise, make sure you have (re)moved the archive from EPRINTS_PATH/archives/OLD_ARCHIVE_ID/ and dropped the database and database user it created in MySQL.

Once the archive is created follow the same steps as you did when setting up your initial archive and you should end up with a publications repository with a fairly comprehensive set of fields you can assign values.  If you then go to the same file you copied and pasted below you will find this is a lot more comprehensive.  However, this file only contains some of the fields used by an eprint record.  The rest can be found at EPRINTS_PATH/flavours/pub_lib/cfg.d/eprint_fields_pub.pl.  If you need to edit any of the fields from this file it is advised you copy it to EPRINTS_PATH/archives/ARCHIVE_ID/cfg/cfg.d/eprint_fields_pub.pl and edit it there.  This will ensure these field definitions do not get lost in any future upgrade.  If you need to add any bespoke fields for the eprint data object, you can either add them to EPRINTS_PATH/archives/ARCHIVE_ID/cfg/cfg.d/eprint_fields_pub.pl or EPRINTS_PATH/archives/ARCHIVE_ID/cfg/cfg.d/eprint_fields.pl or create your own file in EPRINTS_PATH/archives/ARCHIVE_ID/cfg/cfg.d/.  The last option may be neater, so you can keep bespoke fields you have created separate to pre-existing fields, making them easier to find if they need to be edited. Make sure that if you create this new file it starts with:

push @{$c->{fields}->{eprint}},

and ends with:

;

This will ensure your bespoke fields are added to those already present rather than overwriting.  As you may have come to learn from the "how to" link I provided before, beyond adding a field definition, you will need to add it to the eprint workflow (e.g. EPRINTS_PATH/archives/ARCHIVE_ID/cfg/workflows/eprint/default.xml) and add phrases for it under a XML phrase file in EPRINTS_PATH/archives/ARCHIVE_ID/cfg/lang/en/phrases/).

Once you have done all this, the final steps are to update the database and reload the web server:

EPRINTS_PATH/epadmin update ARCHIVE_ID
apachectl graceful

Regards

David Newman

On 05/01/2023 17:00, Trimmel Johann wrote:

Hi David,

 

thanks for explaining.

My eprint_fields.pl in cfg/cfg.d looks like this:

 

push @{$c->{fields}->{eprint}},

{

        name => 'title',

        type => 'longtext',

        input_rows => 3,

        make_single_value_orderkey => 'EPrints::Extras::english_title_orderkey',

},

{

        name => 'subjects',

        type => 'subject',

        multiple => 1,

        top => 'subjects',

        browse_link => 'subjects',

},

;

 

So I assume there I would have to define additional fields, right? How would this look like for the creator field? Is there a template somewhere I can follow? Also for the id_number field you mentioned.

 

Kind regards,

Hans

 

 

 

Von: David R Newman <drn@ecs.soton.ac.uk>
Gesendet: Donnerstag, 5. Januar 2023 17:30
An: eprints-tech@ecs.soton.ac.uk; Trimmel Johann <j.trimmel@ph-noe.ac.at>
Betreff: Re: [EP-tech] Field author missing

 

Hi Hans,

I think your first issue may a question of terminology.  In EPrints, the term "creator" rather than author is used, as it more applicable to the different types of publication or research contribution that may be deposited.  Creator is pretty much equivalent to Dublin Core's creator [1].  EPrints also has an editor field but by default this is only available to be filled in for certain types of items.  Beyond this there is the contributor field the ability to assign both a name and a role for how a person is associated with a deposited item.  There is a useful page will a fairly comprehensive listing of terminology used within EPrints repository software at:

https://wiki.eprints.org/w/EPrints_Glossary

Similarly the "Identification Number" (id_number) field is what is typically used to store DOIs and this can take a DOI value (e.g. 10.1234/5678) and convert it into a link to discover the item from its publication (e.g. journal).  However, I can appreciate that beyond terminological differences there may be bespoke fields you want to add.  This requires a number of steps.  Here is a guide for how to do this:

https://wiki.eprints.org/w/HOW_TO:_Add_a_New_Field

It may be a little out of date but I think most of the instructions are still the same for EPrints 3.4.

Regards

David Newman

[1] https://www.dublincore.org/specifications/dublin-core/dcmi-terms/elements11/creator/

On 05/01/2023 14:30, Trimmel Johann via Eprints-tech wrote:

CAUTION: This e-mail originated outside the University of Southampton.

Hello,

 

I am very new to eprints, I managed to make an installation of 3.4.

I tried to add a deposit which basically works. But for me some fields I would need for a publication are missing – i.e. possibility to enter an Author or other fields like the DOI. Where do I configure that? Are these Metadata fields I have to configure in the XML File?

 

Kind regards,

Hans Trimmel



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/