Class AbstractImportMetadataSourceService<RecordType>
java.lang.Object
org.dspace.importer.external.service.components.AbstractRemoteMetadataSource
org.dspace.importer.external.service.AbstractImportMetadataSourceService<RecordType>
- Type Parameters:
RecordType- type of records received from the remote source.
- All Implemented Interfaces:
MetadataSource
- Direct Known Subclasses:
ADSImportMetadataSourceServiceImpl,ArXivImportMetadataSourceServiceImpl,CiniiImportMetadataSourceServiceImpl,CrossRefImportMetadataSourceServiceImpl,DataCiteImportMetadataSourceServiceImpl,EpoImportMetadataSourceServiceImpl,OpenAireImportMetadataSourceServiceImpl,OpenAlexImportMetadataSourceServiceImpl,PubmedEuropeMetadataSourceServiceImpl,PubmedImportMetadataSourceServiceImpl,RorImportMetadataSourceServiceImpl,ScieloImportMetadataSourceServiceImpl,ScopusImportMetadataSourceServiceImpl,VuFindImportMetadataSourceServiceImpl,WOSImportMetadataSourceServiceImpl
public abstract class AbstractImportMetadataSourceService<RecordType>
extends AbstractRemoteMetadataSource
implements MetadataSource
This class is a partial implementation of
MetadataSource.
It provides assistance with mapping metadata from source format to DSpace
format. 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.- Author:
- Roeland Dillen (roeland at atmire dot com)
-
Field Summary
Fields inherited from class org.dspace.importer.external.service.components.AbstractRemoteMetadataSource
error, exceptionHandlersMap, interRequestTime, lastRequest, lock, maxRetry, operationId, retry, warning -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieve theGenerateQueryServiceRetrieve the MetadataFieldMapping containing the mapping between RecordType and MetadatavoidsetGenerateQueryForItem(GenerateQueryService generateQueryForItem) voidsetMetadataFieldMapping(MetadataFieldMapping<RecordType, MetadataContributor<RecordType>> metadataFieldMapping) Sets the MetadataFieldMapping to base the mapping of RecordType andtransformSourceRecords(RecordType recordType) Return an ImportRecord constructed from the results in a RecordTypeMethods inherited from class org.dspace.importer.external.service.components.AbstractRemoteMetadataSource
getError, getExceptionHandler, getMaxRetry, getOperationId, getRetry, getWarning, handleException, init, initExceptionHandlers, retry, setError, setInterRequestTime, setMaxRetry, setWarning, throwSourceException, throwSourceExceptionHookMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.importer.external.service.components.MetadataSource
getImportSource
-
Constructor Details
-
AbstractImportMetadataSourceService
public AbstractImportMetadataSourceService()
-
-
Method Details
-
getGenerateQueryForItem
Retrieve theGenerateQueryService- Returns:
- A GenerateForQueryService object set to this class
-
setGenerateQueryForItem
- Parameters:
generateQueryForItem- the query generator to be used.
-
getMetadataFieldMapping
Retrieve the MetadataFieldMapping containing the mapping between RecordType and Metadata- Returns:
- The configured MetadataFieldMapping
-
setMetadataFieldMapping
@Autowired(required=true) public void setMetadataFieldMapping(MetadataFieldMapping<RecordType, MetadataContributor<RecordType>> metadataFieldMapping) Sets the MetadataFieldMapping to base the mapping of RecordType and- Parameters:
metadataFieldMapping- the map to be used.
-
transformSourceRecords
Return an ImportRecord constructed from the results in a RecordType- Parameters:
recordType- The record type to retrieve the DCValueMapping from- Returns:
- An
ImportRecord, This is based on the results retrieved from the recordTypeMapping
-