Package org.mycore.sword.application
Class MCRSwordSolrObjectIDSupplier
java.lang.Object
org.mycore.sword.application.MCRSwordObjectIDSupplier
org.mycore.sword.application.MCRSwordSolrObjectIDSupplier
Supplies the Sword with results from solr. This is the Suggested method to use.
-
Constructor Summary
ConstructorDescriptionMCRSwordSolrObjectIDSupplier
(org.apache.solr.client.solrj.SolrQuery solrQuery) -
Method Summary
-
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 classMCRSwordObjectIDSupplier
- Returns:
- how many objects a collection has
- Throws:
org.swordapp.server.SwordServerException
- if an error occurs while determining the result
-
get
- Specified by:
get
in classMCRSwordObjectIDSupplier
- Parameters:
from
- first object id which should appear in the listcount
- 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
-