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:
ArXivImportMetadataSourceServiceImpl,PubmedImportMetadataSourceServiceImpl
public abstract class AbstractImportMetadataSourceService<RecordType> extends AbstractRemoteMetadataSource implements MetadataSource
This class is a partial implementation ofMetadataSource. 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 Constructor Description AbstractImportMetadataSourceService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenerateQueryServicegetGenerateQueryForItem()Retrieve theGenerateQueryServiceMetadataFieldMapping<RecordType,MetadataContributor<RecordType>>getMetadataFieldMapping()Retrieve 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 andImportRecordtransformSourceRecords(RecordType recordType)Return an ImportRecord constructed from the results in a RecordType-
Methods inherited from class org.dspace.importer.external.service.components.AbstractRemoteMetadataSource
getError, getExceptionHandler, getMaxRetry, getOperationId, getRetry, getWarning, handleException, init, initExceptionHandlers, retry, setError, setMaxRetry, setWarning, throwSourceException, throwSourceExceptionHook
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dspace.importer.external.service.components.MetadataSource
getImportSource
-
-
-
-
Method Detail
-
getGenerateQueryForItem
public GenerateQueryService getGenerateQueryForItem()
Retrieve theGenerateQueryService- Returns:
- A GenerateForQueryService object set to this class
-
setGenerateQueryForItem
public void setGenerateQueryForItem(GenerateQueryService generateQueryForItem)
- Parameters:
generateQueryForItem- the query generator to be used.
-
getMetadataFieldMapping
public MetadataFieldMapping<RecordType,MetadataContributor<RecordType>> 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
public ImportRecord transformSourceRecords(RecordType recordType)
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
-
-