Class LiveImportDataProvider
- java.lang.Object
-
- org.dspace.external.provider.AbstractExternalDataProvider
-
- org.dspace.external.provider.impl.LiveImportDataProvider
-
- All Implemented Interfaces:
ExternalDataProvider
public class LiveImportDataProvider extends AbstractExternalDataProvider
This class allows to configure a Live Import Provider as an External Data Provider- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description LiveImportDataProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<ExternalDataObject>getExternalDataObject(String id)This method will take a String id as a parameter and it'll call the ExternalDataProvider's endpoint or data source to retrieve and build the ExternalDataObjectintgetNumberOfResults(String query)Returns the total amount of results that this source can return for the given queryStringgetSourceIdentifier()This method will return the SourceIdentifier for the ExternalDataProvider that implements the interfaceList<ExternalDataObject>searchExternalDataObjects(String query, int start, int limit)This method will query the ExternalDataProvider's endpoint or data source to retrieve and build a list of ExternalDataObjects through a search with the given parametersvoidsetDisplayMetadata(String displayMetadata)This method set the dublin core identifier to display the titlevoidsetMetadataSource(QuerySource querySource)This method set the MetadataSource for the ExternalDataProvidervoidsetRecordIdMetadata(String recordIdMetadata)This method set dublin core identifier to use as metadata idvoidsetSourceIdentifier(String sourceIdentifier)This method set the SourceIdentifier for the ExternalDataProviderbooleansupports(String source)This method will return a boolean indicating whether this ExternalDataProvider can deal with the given source or not-
Methods inherited from class org.dspace.external.provider.AbstractExternalDataProvider
getSupportedEntityTypes, setSupportedEntityTypes, supportsEntityType
-
-
-
-
Method Detail
-
getSourceIdentifier
public String getSourceIdentifier()
Description copied from interface:ExternalDataProviderThis method will return the SourceIdentifier for the ExternalDataProvider that implements the interface- Returns:
- The source identifier as a String
-
setSourceIdentifier
public void setSourceIdentifier(String sourceIdentifier)
This method set the SourceIdentifier for the ExternalDataProvider- Parameters:
sourceIdentifier- The UNIQUE sourceIdentifier to be set on any LiveImport data provider
-
setMetadataSource
public void setMetadataSource(QuerySource querySource)
This method set the MetadataSource for the ExternalDataProvider- Parameters:
metadataSource-MetadataSourceimplementation used to process the input data
-
setRecordIdMetadata
public void setRecordIdMetadata(String recordIdMetadata)
This method set dublin core identifier to use as metadata id- Parameters:
recordIdMetadata- dublin core identifier to use as metadata id
-
setDisplayMetadata
public void setDisplayMetadata(String displayMetadata)
This method set the dublin core identifier to display the title- Parameters:
displayMetadata- metadata to use as title
-
getExternalDataObject
public Optional<ExternalDataObject> getExternalDataObject(String id)
Description copied from interface:ExternalDataProviderThis method will take a String id as a parameter and it'll call the ExternalDataProvider's endpoint or data source to retrieve and build the ExternalDataObject- Parameters:
id- The id on which will be searched- Returns:
- An Optional object of ExternalDataObject. This is to indicate that this object may be null. This ExternalDataObject will return all the data returned by the ExternalDataProvider
-
searchExternalDataObjects
public List<ExternalDataObject> searchExternalDataObjects(String query, int start, int limit)
Description copied from interface:ExternalDataProviderThis method will query the ExternalDataProvider's endpoint or data source to retrieve and build a list of ExternalDataObjects through a search with the given parameters- Parameters:
query- The query for the searchstart- The start of the searchlimit- The max amount of records to be returned by the search- Returns:
- A list of ExternalDataObjects that were retrieved and built by this search
-
supports
public boolean supports(String source)
Description copied from interface:ExternalDataProviderThis method will return a boolean indicating whether this ExternalDataProvider can deal with the given source or not- Parameters:
source- The source on which the check needs to be done- Returns:
- A boolean indicating whether this ExternalDataProvider can deal with this source or not
-
getNumberOfResults
public int getNumberOfResults(String query)
Description copied from interface:ExternalDataProviderReturns the total amount of results that this source can return for the given query- Parameters:
query- The query to be search on and give the total amount of results- Returns:
- The total amount of results that the source can return for the given query
-
-