Class PublicationLoader
java.lang.Object
org.dspace.app.suggestion.SolrSuggestionProvider
org.dspace.app.suggestion.openaire.PublicationLoader
- All Implemented Interfaces:
SuggestionProvider
Class responsible to load and manage ImportRecords from OpenAIRE
- Author:
- Pasquale Cavallo (pasquale.cavallo at 4science dot it)
-
Field Summary
Fields inherited from class org.dspace.app.suggestion.SolrSuggestionProvider
itemService, solrSuggestionStorageService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetNames()voidimportAuthorRecords(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.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
-
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:
-
importAuthorRecords
public void importAuthorRecords(Context context, Item researcher) throws org.apache.solr.client.solrj.SolrServerException, IOException Save a List of ImportRecord into Solr. ImportRecord will be translate into a SolrDocument by the method translateImportRecordToSolrDocument.- Parameters:
context- the DSpace Contextresearcher- a DSpace Item- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
getNames
-
setNames
-
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)
-