Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This documentation explains the features and the usage of the importer framework.
Enabling the framework can be achieved by uncommenting the following step in item-submission.xml.
Implementation specific or additional configuration can be found in their related documentation, if any.
Please refer to subdivisions of this documentation for specific implementations of the framework.
  

Code Block
languagexml
titleEnabling framework
<step>
   <heading>submit.progressbar.lookup</heading>
   <processing-class>org.dspace.submit.step.XMLUIStartSubmissionLookupStep</processing-class>
   <xmlui-binding>org.dspace.app.xmlui.aspect.submission.submit.StartSubmissionLookupStep</xmlui-binding>
   <workflow-editable>true</workflow-editable>
</step>

Features

  • lookup publications from remote sources
  • Support for multiple implementations

...

The importer framework does not enforce a specific input format. Each importer implementation defines which input format it expects from a remote source. The import framework uses generics to achieve this. Each importer implementation will have a type set of the record type it receives from the remote source's response. This type set will also be used by the framework to use the correct MetadataFieldMapping for a certain implementation. Read Implementation of an import source for more information and how to enable the framework.

Transformation to DSpace item

...

Each importer implementation must at least implement interface org.dspace.importer.external.service.othercomponents.ImportsMetadataSource and implement the inherited methods.

One can also choose to implement class org.dspace.importer.external.service.othercomponents.SourceAbstractRemoteMetadataSource next to the Imports MetadataSource interface. This class contains functionality to handle request timeouts and to retry requests.

A third option is to implement class org.dspace.importer.external.service.AbstractImportSourceService. This class already implements both the Imports MetadataSource interface and Source class. AbstractImportSourceService has a generic type set 'RecordType'. In the importer implementation this type set should be the class of the records received from the remote source's response (e.g. when using axiom to get the records from the remote source's XML response, the importer implementation's type set isorg.apache.axiom.om.OMElement).

Implementing the AbstractImportSourceService allows the importer implementation to use the framework's build-in support to transform a record received from the remote source to an object of class *org.dspace.importer.external.datamodel.ImportRecord containing DSpace metadata fields, as explained here: Metadata mapping.

...

Method getImportSource() should return a unique identifier. Importer implementations should not be called directly, but class org.dspace.importer.external.service.ImportService should be called instead. This class contains the same methods as the importer implementatonsimplementations, but with an extra parameter 'url'. This url parameter should contain the same identifier that is returned by the getImportSource() method of the importer implementation you want to use.

The other inherited methods are used to query the remote source.

...

Then create a spring configuration file in [dspace.dir]/config/spring/api.

Each DSpace metadata field that will be used for the mapping must first be configured as a spring bean of classorg.dspace.importer.external.metadatamapping.MetadataFieldConfig.

...

Info
iconfalse
    <util:map id="org.dspace.importer.external.metadatamapping.MetadataFieldConfig"
              value-type="org.dspace.importer.external.metadatamapping.contributor.MetadataContributor">
        <entry key-ref="dc.title" value-ref="titleContrib"/>
        <entry key-ref="dc.contributor.author" value-ref="authorContrib"/>
    </util:map>

 

Note that the single field mappings used for the combined author mapping are not added to this list.

 

Framework Sources Implementations

Pubmed

PubMed Integration

Introduction

First read the base documentation on external importing This documentation explains the implementation of the importer framework using PubMed (http://www.ncbi.nlm.nih.gov/pubmed) as an example.

The configuration done for pubmed specifically is located at pubmed-integration.xml in dspace/config/spring/api I will not go into detail to what exactly is configured for the pubmed integration as it is simply a usage of the classes explained here

Additional Config

Enabling PubMed Lookup (XMLUI Only)

The PubMed specific integration of the external sources import requires the following to be active.
The PubMed lookup is done during the "XMLUIStartSubmissionLookupStep" and this can be enabled by adjusting one step in the [dspace.dir]/config/item-submission.xml. Uncommenting this step will permit the user to do the PubMed based lookups during their submission.

 

Code Block
titleitem-submission.xml
<!-- Find publications based on ID/DOI/Title/Author to pre-fill the submission. XMLUI ONLY.
     For JSPUI version, see JSPUIStartSubmissionLookupStep under <step-definitions> above.
<step>
    <heading>submit.progressbar.lookup</heading>
    <processing-class>org.dspace.submit.step.XMLUIStartSubmissionLookupStep</processing-class>
    <xmlui-binding>org.dspace.app.xmlui.aspect.submission.submit.StartSubmissionLookupStep</xmlui-binding>
    <workflow-editable>true</workflow-editable>
</step>
 -->

 

After uncommenting hat step, simply restart your servlet container, and this lookup step will be available within your deposit process.

Publication Lookup URL

To be able to do the lookup for our configured import-service, we need to be able to know what

url

URL to use to check for publications.

This can be done by setting the publication.url property though maven using 2 different ways.Setting the publication.url property to the address as defined in the configured importservice (PubmedImportService in this case) in the file

  This URL the publication-lookup.url setting defined within the [dspace.dir]/config/modules/publication-lookup.cfg.  You may choose to modify this setting or override it within your local.cfg.

This setting can be modified in one of two ways:

  • You can choose to specific a single, specific URL. This will tell the lookup service to only use one location to lookup publication information.  Valid URLs are any that are defined as a baseAddress for beans within the [src]/dspace-api/src/main/resources/spring/spring-dspace-addon-import-services.xml
. This will check this single configured url for publications.
  • Setting the publication url property to an askterisk '*'. This will check all configured importServices for their urls to base the search for publications on.
    • Spring config file.
    • By default, publication-lookup.url is set to an asterisk ('*').  This default value will attempt to lookup the publication using ALL configured importServices in the [src]/dspace-api/src/main/resources/spring/spring-dspace-addon-import-services.xml Spring config file

     

    PubMed Metadata Mapping

    The PubMed metadata mappings are defined in the [dspace.dir]/config/spring/api/pubmed-integration.xml Spring configuration file.  These metadata mappings can be tweaked as desired. The format of this file is described in the "Metadata mapping" section above

    PubMed

    Pubmed

    specific classes Config

    These classes are simply implementations based of the base classes defined in importer/external. They add characteristic

    behaviour

    behavior for services/mapping for the

    pubmed

    PubMed specific data.

    Metadata mapping classes

    • "PubmedFieldMapping". An implementation of AbstractMetadataFieldMapping, linking to the bean that serves as the entry point of other metadata mapping
    • "PubmedDateMetadatumContributor"/"PubmedLanguageMetadatumContributor". Pubmed specific implementations of the "MetadataContributor" interface

    Service classes