Name Last Update
setup-data Loading commit data...
Readme.md Loading commit data...
info.txt Loading commit data...

Readme.md

How to install the Add-on

The detailed instructions can be found in the docs folder.

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/

Adding 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 = OpenAIRE project checked
jsp.tools.lookup.title = FP7/ERC 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 = FP7 project containing the term
jsp.tools.lookup.field.dc_relation.help = FP7 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 = Projecto OpenAIRE verificado
jsp.tools.lookup.title = Selecção do projecto FP7/ERC
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 FP7 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 like the example: 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

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>false</repeatable>
     <label>OpenAIRE Project Identifier</label>
     <input-type>onebox</input-type>
     <hint>Enter the search term (number, name or acronym) of the European project (EC / ERC), National project (FCT) or any other international project/initiative (WT)gt;</hint>
   </field>

Change xoai.xml configuration

At $DSPACE_SRC/config/crosswalks/oai/xoai.xml Before </Contexts> add:

<Context baseurl="fct" name="FCT Context">
    <!-- Date format, field prefixes, etc are ensured by the transformer -->
    <Transformer ref="openaireTransformer"/>
    <!-- OpenAIRE filter -->
    <Filter ref="fctFilter"/>
    <!-- Just an alias, in fact it returns all items within the driver context -->
    <Set ref="fctSet"/>
    <!-- Metadata Formats -->
    <Format ref="oaidc"/>
    <Format ref="mets"/>
    <Description>
        This contexts complies with FCT rules.
    </Description>
</Context>

After last </Filter> add:

     <Filter id="fctFilter">
            <Definition>
                <And>
                    <LeftCondition>
                        <And>
                            <LeftCondition>
                                <Custom ref="titleExistsCondition"/>
                            </LeftCondition>
                            <RightCondition>
                                <Custom ref="authorExistsCondition"/>
                            </RightCondition>
                        </And>
                    </LeftCondition>
                    <RightCondition>
                        <And>
                            <LeftCondition>
                                <Custom ref="driverDocumentTypeCondition"/>
                            </LeftCondition>
                            <RightCondition>
                                <Custom ref="fctRelationCondition"/>
                            </RightCondition>
                        </And>
                    </RightCondition>
                </And>
            </Definition>
    </Filter>
    <CustomCondition id="fctRelationCondition">
            <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
            <Configuration>
                <string name="field">dc.relation</string>
                <string name="operator">starts_with</string>
                <string name="value">info:eu-repo/grantAgreement/FCT</string>
            </Configuration>
        </CustomCondition>

Before </Sets> add:

<Set id="fctSet">
    <Spec>fct_fundedresources</Spec>
    <Name>fct_fundedresources set</Name>
    <!-- Just an alias -->
</Set>

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.