Package org.dspace.statistics.content
Class StatisticsDataSearches
- java.lang.Object
-
- org.dspace.statistics.content.StatisticsData
-
- org.dspace.statistics.content.StatisticsDataSearches
-
public class StatisticsDataSearches extends StatisticsData
A statistics data implementation that will query the statistics backend for search information- Author:
- Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
-
-
Field Summary
Fields Modifier and Type Field Description protected DSpaceObjectcurrentDsoCurrent DSpaceObject for which to generate the statistics.-
Fields inherited from class org.dspace.statistics.content.StatisticsData
solrLoggerService
-
-
Constructor Summary
Constructors Constructor Description StatisticsDataSearches(DSpaceObject dso)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatasetcreateDataset(Context context, int facetMinCount)Run the accumulated query and return its results.protected StringgetQuery()Returns the query to be used in solr in case of a dso a scopeDso query will be returned otherwise the default *:* query will be usedprotected StringgetSearchFilterQuery()Returns a filter query that only allows new searches to pass new searches are searches that haven't been paged throughprotected ObjectCountgetTotalPageViews(String query, String defaultFilterQuery, int facetMinCount)-
Methods inherited from class org.dspace.statistics.content.StatisticsData
addDatasetGenerator, addFilters, getDataset, getDatasetGenerators, getFilters, setDataset
-
-
-
-
Field Detail
-
currentDso
protected DSpaceObject currentDso
Current DSpaceObject for which to generate the statistics.
-
-
Constructor Detail
-
StatisticsDataSearches
public StatisticsDataSearches(DSpaceObject dso)
-
-
Method Detail
-
createDataset
public Dataset createDataset(Context context, int facetMinCount) throws SQLException, org.apache.solr.client.solrj.SolrServerException, IOException, ParseException
Description copied from class:StatisticsDataRun the accumulated query and return its results.- Specified by:
createDatasetin classStatisticsData- Parameters:
context- The relevant DSpace Context.facetMinCount- Minimum count of results facet must have to return a result- Returns:
- accumulated query results
- Throws:
SQLException- An exception that provides information on a database access error or other errors.org.apache.solr.client.solrj.SolrServerException- Exception from the Solr server to the solrj Java client.IOException- A general class of exceptions produced by failed or interrupted I/O operations.ParseException- if the dataset cannot be parsed
-
getQuery
protected String getQuery()
Returns the query to be used in solr in case of a dso a scopeDso query will be returned otherwise the default *:* query will be used- Returns:
- the query as a string
-
getTotalPageViews
protected ObjectCount getTotalPageViews(String query, String defaultFilterQuery, int facetMinCount) throws org.apache.solr.client.solrj.SolrServerException, IOException
- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
getSearchFilterQuery
protected String getSearchFilterQuery()
Returns a filter query that only allows new searches to pass new searches are searches that haven't been paged through- Returns:
- a solr filterquery
-
-