Package org.dspace.app.suggestion.loader
Class PublicationLoader
java.lang.Object
org.dspace.app.suggestion.SolrSuggestionProvider
org.dspace.app.suggestion.loader.PublicationLoader
- All Implemented Interfaces:
SuggestionProvider
- Direct Known Subclasses:
OpenAlexPublicationLoader
Class responsible to load and manage ImportRecords from external sources
- Author:
- Pasquale Cavallo (pasquale.cavallo at 4science dot it)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConfigurationServiceprotected List<ExternalDataProvider>protected List<EvidenceScorer>protected ExternalDataProviderFields inherited from class org.dspace.app.suggestion.SolrSuggestionProvider
itemService, solrSuggestionStorageService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetNames()voidimportRecords(Context context, Item researcher) Save a List of ImportRecord into Solr.protected booleanisExternalDataObjectPotentiallySuggested(Context context, ExternalDataObject externalDataObject) check if the externalDataObject may have suggestionreduceAndTransform(Item researcher, List<ExternalDataObject> importRecords) This method filter a list of ImportRecords using a pipeline of AuthorNamesApprover and return a filtered list of ImportRecords.searchMetadataValues(Item researcher) Return list of Item metadata values starting from metadata keys defined in class level variable names.voidvoidsetOtherProviders(List<ExternalDataProvider> otherProviders) voidsetPipeline(List<EvidenceScorer> pipeline) Set the pipeline of ApprovervoidsetPrimaryProvider(ExternalDataProvider primaryProvider) Methods inherited from class org.dspace.app.suggestion.SolrSuggestionProvider
countAllTargets, countUnprocessedSuggestionByTarget, findAllTargets, findAllUnprocessedSuggestions, findTarget, findUnprocessedSuggestion, flagRelatedSuggestionsAsProcessed, getSourceName, rejectSuggestion, setItemService, setSourceName
-
Field Details
-
names
-
-
otherProviders
-
configurationService
-
pipeline
-
-
Constructor Details
-
PublicationLoader
public PublicationLoader()
-
-
Method Details
-
setPrimaryProvider
-
setOtherProviders
-
setPipeline
Set the pipeline of Approver- Parameters:
pipeline- list Approver
-
reduceAndTransform
This method filter a list of ImportRecords using a pipeline of AuthorNamesApprover and return a filtered list of ImportRecords.- Parameters:
researcher- the researcher ItemimportRecords- List of import record- Returns:
- a list of filtered import records
- See Also:
-
importRecords
Save a List of ImportRecord into Solr. ImportRecord will be translate into a SolrDocument by the method translateImportRecordToSolrDocument.- Specified by:
importRecordsin classSolrSuggestionProvider- Parameters:
context- the DSpace Contextresearcher- a DSpace Item- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionSolrServerExceptionIOExceptionException
-
getNames
-
setNames
-
searchMetadataValues
Return list of Item metadata values starting from metadata keys defined in class level variable names.- Parameters:
researcher- DSpace item- Returns:
- list of metadata values
-
isExternalDataObjectPotentiallySuggested
protected boolean isExternalDataObjectPotentiallySuggested(Context context, ExternalDataObject externalDataObject) Description copied from class:SolrSuggestionProvidercheck if the externalDataObject may have suggestion- Specified by:
isExternalDataObjectPotentiallySuggestedin classSolrSuggestionProvider- Returns:
- true if the externalDataObject could be suggested by this provider (i.e. it comes from a DataProvider used by this suggestor)
-