Interface QuerySource

All Superinterfaces:
MetadataSource
All Known Subinterfaces:
OpenAlexImportMetadataSourceService
All Known Implementing Classes:
ADSImportMetadataSourceServiceImpl, ArXivImportMetadataSourceServiceImpl, CiniiImportMetadataSourceServiceImpl, CrossRefImportMetadataSourceServiceImpl, DataCiteImportMetadataSourceServiceImpl, DataCiteProjectImportMetadataSourceServiceImpl, EpoImportMetadataSourceServiceImpl, MultipleParallelImportMetadataSourceServiceImpl, OpenAireImportMetadataSourceServiceImpl, OpenAlexImportMetadataSourceServiceImpl, PubmedEuropeMetadataSourceServiceImpl, PubmedImportMetadataSourceServiceImpl, RorImportMetadataSourceServiceImpl, ScieloImportMetadataSourceServiceImpl, ScopusImportMetadataSourceServiceImpl, VuFindImportMetadataSourceServiceImpl, WOSImportMetadataSourceServiceImpl

public interface QuerySource extends MetadataSource
Common interface for database-based imports.
Author:
Roeland Dillen (roeland at atmire dot com), Pasquale Cavallo (pasquale.cavallo@4science.it)
  • Method Details

    • getRecord

      Get a single record from the source. The first match will be returned
      Parameters:
      id - identifier for the record
      Returns:
      a matching record
      Throws:
      MetadataSourceException - if the underlying methods throw any exception.
    • getRecordsCount

      int getRecordsCount(String query) throws MetadataSourceException
      Gets the number of records matching a query
      Parameters:
      query - the query in string format
      Returns:
      the number of records matching the query
      Throws:
      MetadataSourceException - if the underlying methods throw any exception.
    • getRecordsCount

      int getRecordsCount(Query query) throws MetadataSourceException
      Gets the number of records matching a query
      Parameters:
      query - the query object
      Returns:
      the number of records matching the query
      Throws:
      MetadataSourceException - if the underlying methods throw any exception.
    • getRecords

      Collection<ImportRecord> getRecords(String query, int start, int count) throws MetadataSourceException
      Gets a set of records matching a query. Supports pagination
      Parameters:
      query - the query. The query will generally be posted 'as is' to the source
      start - offset
      count - page size
      Returns:
      a collection of fully transformed id's
      Throws:
      MetadataSourceException - if the underlying methods throw any exception.
    • getRecords

      Find records based on a object query.
      Parameters:
      query - a query object to base the search on.
      Returns:
      a set of records. Fully transformed.
      Throws:
      MetadataSourceException - if the underlying methods throw any exception.
    • getRecord

      ImportRecord getRecord(Query query) throws MetadataSourceException
      Get a single record from the source. The first match will be returned
      Parameters:
      query - a query matching a single record
      Returns:
      a matching record
      Throws:
      MetadataSourceException - if the underlying methods throw any exception.
    • findMatchingRecords

      Collection<ImportRecord> findMatchingRecords(Query query) throws MetadataSourceException
      Finds records based on query object. Delegates to one or more MetadataSource implementations based on the uri. Results will be aggregated.
      Parameters:
      query - a query object to base the search on.
      Returns:
      a collection of import records. Only the identifier of the found records may be put in the record.
      Throws:
      MetadataSourceException - passed through.
    • findMatchingRecords

      Collection<ImportRecord> findMatchingRecords(Item item) throws MetadataSourceException
      Finds records based on an item Delegates to one or more MetadataSource implementations based on the uri. Results will be aggregated.
      Parameters:
      item - an item to base the search on
      Returns:
      a collection of import records. Only the identifier of the found records may be put in the record.
      Throws:
      MetadataSourceException - if the underlying methods throw any exception.