Package org.dspace.statistics.content
Class StatisticsDataWorkflow
- java.lang.Object
-
- org.dspace.statistics.content.StatisticsData
-
- org.dspace.statistics.content.StatisticsDataWorkflow
-
public class StatisticsDataWorkflow extends StatisticsData
A workflow data implementation that will query the statistics backend for workflow 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 inherited from class org.dspace.statistics.content.StatisticsData
solrLoggerService
-
-
Constructor Summary
Constructors Constructor Description StatisticsDataWorkflow(DSpaceObject dso, int averageMonths)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatasetcreateDataset(Context context)Run the accumulated query and return its results.protected DategetOldestWorkflowItemDate()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 Map<String,Long>getTotalFacetCounts(DatasetTypeGenerator typeGenerator)Retrieve the total counts for the facets (total count is same query but none of the filter queries).-
Methods inherited from class org.dspace.statistics.content.StatisticsData
addDatasetGenerator, addFilters, getDataset, getDatasetGenerators, getFilters, setDataset
-
-
-
-
Constructor Detail
-
StatisticsDataWorkflow
public StatisticsDataWorkflow(DSpaceObject dso, int averageMonths)
-
-
Method Detail
-
createDataset
public Dataset createDataset(Context context) 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.- 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
-
getTotalFacetCounts
protected Map<String,Long> getTotalFacetCounts(DatasetTypeGenerator typeGenerator) throws org.apache.solr.client.solrj.SolrServerException, IOException
Retrieve the total counts for the facets (total count is same query but none of the filter queries).- Parameters:
typeGenerator- the type generator- Returns:
- counts for each facet by name.
- Throws:
org.apache.solr.client.solrj.SolrServerException- passed through.IOException- passed through.
-
getOldestWorkflowItemDate
protected Date getOldestWorkflowItemDate() throws org.apache.solr.client.solrj.SolrServerException, IOException
- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
-