Readme.md 7.83 KB

How to install the Add-on

Copy the new files

Copy the new files to the source directory

If you are in Linux

cp -r $PATH_TO _ADDON/setup-data/dspace-source/* $DSPACE_SRC/

Where $PATH_TO ADDON is the directory where you put the add-on for instalation and $DSPACESRC/ is the source directory.

As an example: If the addon is in the opt directory and dspace source is in /src-dspace/dspace32 the command is:

cp -r /opt/setup-data/dspace-source/* /src-dspace/dspace32/

Add the new entries in the Messages.properties and in Messages_pt_PT.properties

Add the fowlowing messages to Messages.properties:

jsp.authority.confidence.description.blank = Funded project checked
jsp.tools.lookup.title = Funded project selection
jsp.tools.lookup.heading = Verifying value…
jsp.tools.lookup.accept = Accept
jsp.tools.lookup.add = Add
jsp.tools.lookup.cancel = Cancel
jsp.tools.lookup.more = See more results
jsp.tools.lookup.fail = Failed to load information:
jsp.tools.lookup.results = Results @1@ until @2@ of @3@ for the search "@4@"
jsp.tools.lookup.lookup = Search
jsp.tools.lookup.field.dc_relation.title = Funded project containing the term
jsp.tools.lookup.field.dc_relation.help = Funded Project ID (If accepted this value will pass to the textbox)
jsp.tools.lookup.field.dc_relation.nonauthority = Not identified

Add the fowlowing messages to Messages_pt_PT.properties:

jsp.authority.confidence.description.blank = Projeto financiado verificado
jsp.tools.lookup.title = Seleção do projeto financiado
jsp.tools.lookup.heading = A Verificar valor…
jsp.tools.lookup.accept = Aceitar
jsp.tools.lookup.add = Adicionar
jsp.tools.lookup.cancel = Cancelar
jsp.tools.lookup.more = Ver Mais Resultados
jsp.tools.lookup.fail = Falha ao carregar informação:
jsp.tools.lookup.results = Resultados @1@ até @2@ de @3@ para o termo "@4@"
jsp.tools.lookup.lookup = Pesquisar
jsp.tools.lookup.field.dc_relation.title = Projetos financiados contendo o termo pesquisado
jsp.tools.lookup.field.dc_relation.help = Identificador do projeto (Se aceitar este valor será colocado na caixa de texto do projecto)
jsp.tools.lookup.field.dc_relation.nonauthority = Projecto não identificado

Change the dspace.cfg

Edit dspace.cfg in $DSPACE_SRC/dspace/config/dspace.cfg. Uncomment the lines of the authority control plugins and add OpenAire.

plugin.named.org.dspace.content.authority.ChoiceAuthority = \
   org.dspace.content.authority.OpenAIREAuthority = OpenAIRE

If there are more Choices of Authority the options must be added as in the example below:

 plugin.named.org.dspace.content.authority.ChoiceAuthority = \
    org.dspace.content.authority.SampleAuthority = Sample, \ 
    ...
    ...
    org.dspace.content.authority.OpenAIREAuthority = OpenAIRE

where ... are the other authority options

Add also the following options to dspace.cfg (if they exist, only change their values)

choices.plugin.dc.relation = OpenAIRE
choices.presentation.dc.relation = suggest
authority.controlled.dc.relation = true

Add also the following lines (if they exist, only change their values)

openaire.projects.filename = ${dspace.dir}/config/openaire-cache.list
# One or more urls/file paths (separeted by 3 hash chars (#, i.e. ###)) in DSpace form-value-pairs XML format (take http://api.openaire.eu/projects/dspace/FP7/ALL/ALL as an example)
openaire.projects.url = "http://api.openaire.eu/projects/dspace/FP7/ALL/ALL###http://api.openaire.eu/projects/dspace/WT/ALL/ALL"
# Minimum of chars to start searching on the list (default >= 4)
openaire.projects.suggest.minchar = 4
# Maximum of projects listed (default <= 10)
openaire.projects.suggest.max = 20

For the Portuguese projects change to:

openaire.projects.url = "http://api.openaire.eu/projects/dspace/FP7/ALL/ALL###http://api.openaire.eu/projects/dspace/WT/ALL/ALL###http://api.openaire.eu/projects/dspace/FCT/ALL/ALL"

Change the input-forms.xml

Describe on the hint tag () the funders included on the openaire.projects.url parameter.

At $DSPACE_SRC/config/input-forms.xml after <page number="1"> add:

   <field>
     <dc-schema>dc</dc-schema>
     <dc-element>relation</dc-element>
     <dc-qualifier></dc-qualifier>
     <repeatable>true</repeatable>
     <label>Funded Project Identifier</label>
     <input-type>onebox</input-type>
     <hint>Identify the project funded by the European Commission (FP7, H2020, ERC), Foundation for Science and Technology and Welcome Trust, to monitor the funder Open Access policy. Enter the search term (number, name, acronym or reference) of the project.</hint>
   </field>

Change the input-forms.xml in portuguese language only

Describe on the hint tag () the funders included on the openaire.projects.url parameter.

At $DSPACE_SRC/config/input-forms.xml after <page number="1"> add:

   <field>
     <dc-schema>dc</dc-schema>
     <dc-element>relation</dc-element>
     <dc-qualifier></dc-qualifier>
     <repeatable>true</repeatable>
     <label>Projeto Financiado</label>
     <input-type>onebox</input-type>
     <hint>Identifique o projeto financiado pela Comiss&#xE3;o Europeia (FP7, H2020, ERC), Funda&#xe7;&#xE3;o para a Ci&#xea;ncia e Tecnologia ou Welcome Trust, para monitoriza&#xe7;&#xE3;o da pol&#xED;tica de Acesso Aberto do financiador. Insira o termo de pesquisa (n&#xFA;mero, nome, acr&#xF3;nimo ou refer&#xea;ncia) para selecionar o projeto.</hint>
   </field>

Change xoai.xml configuration (for FCT set filter)

At $DSPACE_SRC/config/crosswalks/oai/xoai.xml Add the following, before </Contexts> <Formats>:

<Context baseurl="fct">
    <!-- Date format, field prefixes, etc are ensured by the transformer -->
    <Transformer refid="openaireTransformer" />
    <!-- Title : Mandatory -->
    <Filter refid="titleexistsFilter" />
    <!-- Author : Mandatory -->
    <Filter refid="authorexistsFilter"/>
    <!-- Possible Document Type (same as Driver)-->
    <Filter refid="driverdocumenttypeFilter"/>
    <!-- dc.relation must has the specified prefix -->
    <Filter refid="fctrelationFilter" />
    <!-- Metadata Formats -->
    <Format refid="oaidc" />
    <Format refid="mets" />
</Context>

And after <Value>info:eu-repo/grantAgreement/EC/FP</Value> add:

    </Parameter>
</Filter>
<Filter id="fctrelationFilter">
    <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
    <Parameter key="field">
        <Value>dc.relation</Value>
    </Parameter>
    <Parameter key="operator">
        <Value>starts_with</Value>
    </Parameter>
    <Parameter key="value">
    <Value>info:eu-repo/grantAgreement/FCT</Value>

Then a build and a deployment is needed and after restarting tomcat, then you should clean OAI cache and reindex the content.

$DSPACE_BIN/bin/dspace oai clean-cache

After cleaning the cache, you should re-index the content (-v is for verbose mode):

$DSPACE_BIN/bin/dspace oai import -c -o -v

After instalation

After building DSpace (mvn & ant - see the DSpace Documentation), configure cron to refresh the openaire project list, for example:

0 0 * * * $DSPACE_BIN/bin/openaire-refresh-list

Run the script (for the addon to work)

$DSPACE_BIN/bin/openaire-refresh-list

Developers

The OpenaAirAuthorityControl Add-on was developed in the context of RCAAP ProjectRCAAP by KEEP SOLUTIONS, a spin-off of the University of Minho, specialized in digital preservation and advanced solutions for digital archives and libraries, in partnership with the Documentation Services of the University of Minho.

Need help, or give any type of contribution?

Please contact us at FCT|FCCN or any commiter.

License

Please contact us at FCT|FCCN.