Class MCRSwordSolrObjectIDSupplier

java.lang.Object
org.mycore.sword.application.MCRSwordObjectIDSupplier
org.mycore.sword.application.MCRSwordSolrObjectIDSupplier

public class MCRSwordSolrObjectIDSupplier extends MCRSwordObjectIDSupplier
Supplies the Sword with results from solr. This is the Suggested method to use.
  • Constructor Details

    • MCRSwordSolrObjectIDSupplier

      public MCRSwordSolrObjectIDSupplier(org.apache.solr.client.solrj.SolrQuery solrQuery)
      Parameters:
      solrQuery - the query which will be used to ask solr. (start and rows will be overwritten for pagination purposes)
  • Method Details

    • getCount

      public long getCount() throws org.swordapp.server.SwordServerException
      Specified by:
      getCount in class MCRSwordObjectIDSupplier
      Returns:
      how many objects a collection has
      Throws:
      org.swordapp.server.SwordServerException - if an error occurs while determining the result
    • get

      public List<MCRObjectID> get(int from, int count) throws org.swordapp.server.SwordServerException
      Specified by:
      get in class MCRSwordObjectIDSupplier
      Parameters:
      from - first object id which should appear in the list
      count - count how many ids should appear in the list
      Returns:
      a list of MyCoReObjectIDs
      Throws:
      org.swordapp.server.SwordServerException - if an error occurs while determining the result