Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add details about disabling

These facilities were developed separately for JSPUI and XMLUI.

Table of Contents
minLevel2
outlinetrue
stylenone

Note

In DSpace 7.0, the Biblio-Transformation-Engine (BTE) was removed in favor of Live Import from external sources.  All online services and bibliographic formats previously supported by BTE have been moved or are being moved to the External Sources framework.

...

...

Introduction

This documentation explains the features and the usage of the importer framework.  The importer framework is built into both the REST API and User Interface.  Currently supported formats include:

  • Drag & drop of Endnote, BibTex, RIS, TSV, CSV, arXiv, PubMed. From the MyDSpace page, dragging & dropping one of these files will start a new submission, extracting the metadata from the file.
  • Import via ORCID, PubMed, Sherpa Journals, Sherpa Publishers.  From the MyDSpace page, you can select to start a new submission by searching an external source.

Features

  • Look up publications from remote sources.
  • Support for multiple implementations.

Abstraction of input format

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.

Transformation to DSpace item

The framework produces an 'ImportRecord' that is completely decoupled from DSpace. It contains a set of metadata DTO's that contain the notion of schema,element and qualifier. The specific implementation is responsible for populating this set. It is then very simple to create a DSpace item from this list.

Implementation of an import source

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

One can also choose to implement class org.dspace.importer.external.service.other.Source next to the Imports 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 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 is org.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.

Inherited methods

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 implementatons, 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.

Metadata mapping

When using an implementation of AbstractImportSourceService, a mapping of remote record fields to DSpace metadata fields can be created.  First create an implementation of class AbstractMetadataFieldMapping with the same type set used for the importer implementation.  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 class org.dspace.importer.external.metadatamapping.MetadataFieldConfig. 

Code Block
languagexml
<bean id="dc.title" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
    <constructor-arg value="dc.title"/>
</bean>

Now this metadata field can be used to create a mapping. To add a mapping for the "dc.title" field declared above, a new spring bean configuration of a class class org.dspace.importer.external.metadatamapping.contributor.MetadataContributor needs to be added. This interface contains a type argument. The type needs to match the type used in the implementation of AbstractImportSourceService. The responsibility of each MetadataContributor implementation is to generate a set of metadata from the retrieved document. How it does that is completely opaque to the AbstractImportSourceService but it is assumed that only one entity (i.e. item) is fed to the metadatum contributor.

For example java SimpleXpathMetadatumContributor implements MetadataContributor<OMElement> can parse a fragment of xml and generate one or more metadata values.

This bean expects 2 property values:

  • field: A reference to the configured spring bean of the DSpace metadata field. e.g. the "dc.title" bean declared above.
  • query: The xpath expression used to select the record value returned by the remote source.
Code Block
languagexml
<bean id="titleContrib" class="org.dspace.importer.external.metadatamapping.contributor.SimpleXpathMetadatumContributor">
    <property name="field" ref="dc.title"/>
    <property name="query" value="dc:title"/>
</bean>

Multiple record fields can also be combined into one value. To implement a combined mapping first create a SimpleXpathMetadatumContributor as explained above for each part of the field.

Supported External Sources

DSpace supports importing metadata from a variety of online services.  Some of these services can ONLY support out-of-the-box Configurable Entities.

Supported online services are all configured on the backend in the [dspace]/config/spring/api/external-services.xml file.  To disable a service, simply comment it out in that file.

Online providers available out of the box include:

  • NASA Astrophysics Data System (ADS) lookup (Supported for creating new Items, or "Publication" Entities). Can be configured via "ads.*" settings in external-providers.cfg. REQUIRES an API key to function, signup at https://ui.adsabs.harvard.edu/help/api/
  • arXiv lookup (Supported for creating new Items, or "Publication" Entities).
  • CiNii lookup (Supported for creating new Items, or "Publication" Entities). Can be configured via "cinii.*" settings in external-providers.cfg. REQUIRES an API key to function, signup at https://support.nii.ac.jp/en/cinii/api/developer
  • CrossRef lookup (Supported for creating new Items, or "Publication" Entities). Can be configured via "crossref.*" settings in external-providers.cfg
  • European Patent Office (EPO) lookup (Supported for creating new Items, or "Publication" Entities). Can be configured via "epo.*" settings in external-providers.cfg. REQUIRES an API key to function, signup at https://developers.epo.org/
  • ORCID
    • ORCID author lookup (Only supported for creating new "Person" Entities).  Can be configured via "orcid.*" settings in orcid.cfg.
    • ORCID publication lookup (Supported for creating new Items, or "Publication" Entities). Allows you to lookup a publication based on an author's ORCID. Can be configured via "orcid.*" settings in orcid.cfg.  
  • PubMed
    • Search PubMed (Supported for creating new Items, or "Publication" Entities). Can be configured via "pubmed.*" settings in external-providers.cfg
    • Search PubMed Europe (Supported for creating new Items, or "Publication" Entities). Can be configured via "pubmedeurope.*" settings in external-providers.cfg
  • SciELO lookup (Supported for creating new Items, or "Publication" Entities). Can be configured via "scielo.*" settings in external-providers.cfg. 
  • Scopus lookup  (Supported for creating new Items, or "Publication" Entities). Can be configured via "scopus.*" settings in external-providers.cfg.  REQUIRES an API key to function, signup at https://dev.elsevier.com 
  • Sherpa Romeo
    • Sherpa Journals by ISSN (Only supported for creating new "Journal" Entities)
    • Sherpa Journals (Only supported for creating new "Journal" Entities) - supports looking up a Journal by title
    • Sherpa Publishers (Only supported for creating new "OrgUnit" Entities)
  • VuFind lookup (Supported for creating new Items, or "Publication" Entities). Can be configured via "vufind.*" settings in external-providers.cfg
  • Web of Science lookup (Supported for creating new Items, or "Publication" Entities). Can be configured via "wos.*" settings in external-providers.cfg. REQUIRES a paid API key to function, signup at https://developer.clarivate.com/apis/wos

Disabling an External source

By default, DSpace has all external sources enabled in the [dspace]/config/spring/api/external-services.xml file.  However, because some external services may require a paid subscription , sites may wish to disable any external sources that they do not want to use.

To disable an external source, simply comment out its "<bean>" tag in the external-services.xml file.  Comment it out using XML comment tags (<!-- and -->). 

For example, this will disable the Scopus external service (which is one that requires a paid subscription):

Code Block
<!--
<bean id="scopusLiveImportDataProvider
Code Block
languagexml
<bean id="lastNameContrib" class="org.dspace.importer.external.metadatamappingprovider.contributorimpl.SimpleXpathMetadatumContributorLiveImportDataProvider">
    <property name="fieldmetadataSource" ref="dc.contributor.authorScopusImportService"/>
    <property name="querysourceIdentifier" value="x:authors/x:author/x:surnamescopus"/>
</bean>
<bean id="firstNameContrib" class="org.dspace.importer.external.metadatamapping.contributor.SimpleXpathMetadatumContributor">
    <property name="fieldrecordIdMetadata" refvalue="dc.contributoridentifier.authorscopus"/>
    <property name="query" value="x:authors/x:author/x:given-name"/>
</bean>

Note that namespace prefixes used in the xpath queries are configured in bean "FullprefixMapping" in the same spring file.

Code Block
languagexml
<util:map id="FullprefixMapping" key-type="java.lang.String" value-type="java.lang.String">
supportedEntityTypes">
       <description>Defines the namespace mappin for the SimpleXpathMetadatum contributors</description> <list>
    <entry key="http://purl.org/dc/elements/1.1/" value="dc"/>
    <entry key="http://www.w3.org/2005/Atom" value="x"/>
</util:map>

Then create a new list in the spring configuration containing references to all SimpleXpathMetadatumContributor beans that need to be combined.

Code Block
languagexml
<util:list id="combinedauthorList" value-type="org.dspace.importer.external.metadatamapping.contributor.MetadataContributor" list-class="java.util.LinkedList">
 <value>Publication</value>
       <ref bean="lastNameContrib"/></list>
    <ref bean="firstNameContrib"/>
</util:list>

Finally create a Spring bean configuration of class org.dspace.importer.external.metadatamapping.contributor.CombinedMetadatumContributor. This bean expects 3 values:

  • field: A reference to the configured spring bean of the DSpace metadata field. e.g. the "dc.title" bean declared above.
  • metadatumContributors: A reference to the list containing all the single record field mappings that need to be combined.
  • separator: These characters will be added between each record field value when they are combined into one field.
Code Block
languagexml
<bean id="authorContrib" class="org.dspace.importer.external.metadatamapping.contributor.CombinedMetadatumContributor">
    <property name="separator" value=", "/>
    <property name="metadatumContributors" ref="combinedauthorList"/>
    <property name="field" ref="dc.contributor.author"/>
</bean>

Each contributor must also be added to the "MetadataFieldMap" used by the MetadataFieldMapping implementation. Each entry of this map maps a metadata field bean to a contributor. For the contributors created above this results in the following configuration:

Code Block
languagexml
<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>
</property>
</bean>
-->


Submitting starting from external sources

Image Added

  1. From the MyDSpace page a new submission can be started not only using the submission form but also automatically populating metadata, importing them from several online services.
  2. After choosing the external source to import from and inserting a term in search bar, the system will show the list of matching results.
  3. When selecting an item, the system will display the metadata to be imported, according to the configured mapping.
  4. Clicking on “Start submission” the system will display the submission forms filled with the imported metadata.

Submitting starting from bibliographic file

  1. From the MyDSpace page, drag & drop the bibliographic file (e.g. bibtex, endnote, etc) onto the file dropbox
  2. Select the collection to submit to
  3. Submission will be created, with the metadata parsed out of that bibliographic file.  The bibliographic file will also be attached as a Bitstream (in case some fields could not be successfully parsed).  You can choose to keep it or delete it.

More Information

More information on configuring metadata mappings for various import formats / services can be found in the Live Import from external sources documentation.  See the "Editing Metadata Mapping" sectionNote that the single field mappings used for the combined author mapping are not added to this list.