Package org.dspace.app.suggestion
Class SolrSuggestionProvider
java.lang.Object
org.dspace.app.suggestion.SolrSuggestionProvider
- All Implemented Interfaces:
SuggestionProvider
- Direct Known Subclasses:
PublicationLoader
Suggestion provider that read the suggestion from the local suggestion solr
core
- Author:
- Andrea Bollini (andrea.bollini at 4science dot it)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountAllTargets(Context context) count all suggestion targetslongcountUnprocessedSuggestionByTarget(Context context, UUID target) find unprocessed suggestions by target UUIDfindAllTargets(Context context, int pageSize, long offset) find all suggestion targetsfindAllUnprocessedSuggestions(Context context, UUID target, int pageSize, long offset, boolean ascending) find unprocessed suggestions (paged) by target UUIDfindTarget(Context context, UUID target) find a suggestion target by UUIDfindUnprocessedSuggestion(Context context, UUID target, String id) find an unprocessed suggestion by target UUID and suggestion idvoidflagRelatedSuggestionsAsProcessed(Context context, ExternalDataObject externalDataObject) flag a suggestion as processedabstract voidimportRecords(Context context, Item item) Save a List of ImportRecord into Solr.protected abstract booleanisExternalDataObjectPotentiallySuggested(Context context, ExternalDataObject externalDataObject) check if the externalDataObject may have suggestionvoidrejectSuggestion(Context context, UUID target, String idPart) reject a specific suggestion by target @param target and by suggestion id @param idPartvoidsetItemService(ItemService itemService) voidsetSourceName(String sourceName)
-
Field Details
-
itemService
-
solrSuggestionStorageService
-
-
Constructor Details
-
SolrSuggestionProvider
public SolrSuggestionProvider()
-
-
Method Details
-
getSourceName
-
setSourceName
-
setItemService
-
countAllTargets
Description copied from interface:SuggestionProvidercount all suggestion targets- Specified by:
countAllTargetsin interfaceSuggestionProvider
-
countUnprocessedSuggestionByTarget
Description copied from interface:SuggestionProviderfind unprocessed suggestions by target UUID- Specified by:
countUnprocessedSuggestionByTargetin interfaceSuggestionProvider
-
findAllUnprocessedSuggestions
public List<Suggestion> findAllUnprocessedSuggestions(Context context, UUID target, int pageSize, long offset, boolean ascending) Description copied from interface:SuggestionProviderfind unprocessed suggestions (paged) by target UUID- Specified by:
findAllUnprocessedSuggestionsin interfaceSuggestionProvider- See Also:
-
findAllTargets
Description copied from interface:SuggestionProviderfind all suggestion targets- Specified by:
findAllTargetsin interfaceSuggestionProvider- See Also:
-
findUnprocessedSuggestion
Description copied from interface:SuggestionProviderfind an unprocessed suggestion by target UUID and suggestion id- Specified by:
findUnprocessedSuggestionin interfaceSuggestionProvider
-
findTarget
Description copied from interface:SuggestionProviderfind a suggestion target by UUID- Specified by:
findTargetin interfaceSuggestionProvider
-
rejectSuggestion
Description copied from interface:SuggestionProviderreject a specific suggestion by target @param target and by suggestion id @param idPart- Specified by:
rejectSuggestionin interfaceSuggestionProvider
-
flagRelatedSuggestionsAsProcessed
public void flagRelatedSuggestionsAsProcessed(Context context, ExternalDataObject externalDataObject) Description copied from interface:SuggestionProviderflag a suggestion as processed- Specified by:
flagRelatedSuggestionsAsProcessedin interfaceSuggestionProvider
-
isExternalDataObjectPotentiallySuggested
protected abstract boolean isExternalDataObjectPotentiallySuggested(Context context, ExternalDataObject externalDataObject) check if the externalDataObject may have suggestion- Parameters:
context-externalDataObject-- Returns:
- true if the externalDataObject could be suggested by this provider (i.e. it comes from a DataProvider used by this suggestor)
-
importRecords
Save a List of ImportRecord into Solr. ImportRecord will be translate into a SolrDocument by the method translateImportRecordToSolrDocument.- Parameters:
context- the DSpace Contextitem- a DSpace Item- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionException
-