Class PublicationLoader

java.lang.Object
org.dspace.app.suggestion.SolrSuggestionProvider
org.dspace.app.suggestion.openaire.PublicationLoader
All Implemented Interfaces:
SuggestionProvider

public class PublicationLoader extends SolrSuggestionProvider
Class responsible to load and manage ImportRecords from OpenAIRE
Author:
Pasquale Cavallo (pasquale.cavallo at 4science dot it)
  • Constructor Details

    • PublicationLoader

      public PublicationLoader()
  • Method Details

    • setPrimaryProvider

      public void setPrimaryProvider(ExternalDataProvider primaryProvider)
    • setOtherProviders

      public void setOtherProviders(List<ExternalDataProvider> otherProviders)
    • setPipeline

      public void setPipeline(List<EvidenceScorer> pipeline)
      Set the pipeline of Approver
      Parameters:
      pipeline - list Approver
    • reduceAndTransform

      public List<Suggestion> reduceAndTransform(Item researcher, List<ExternalDataObject> importRecords)
      This method filter a list of ImportRecords using a pipeline of AuthorNamesApprover and return a filtered list of ImportRecords.
      Parameters:
      researcher - the researcher Item
      importRecords - 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 Context
      researcher - a DSpace Item
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • getNames

      public List<String> getNames()
    • setNames

      public void setNames(List<String> names)
    • isExternalDataObjectPotentiallySuggested

      protected boolean isExternalDataObjectPotentiallySuggested(Context context, ExternalDataObject externalDataObject)
      Description copied from class: SolrSuggestionProvider
      check if the externalDataObject may have suggestion
      Specified by:
      isExternalDataObjectPotentiallySuggested in class SolrSuggestionProvider
      Returns:
      true if the externalDataObject could be suggested by this provider (i.e. it comes from a DataProvider used by this suggestor)