org.dspace.statistics.content.filter
Class StatisticsSolrDateFilter

java.lang.Object
  extended by org.dspace.statistics.content.filter.StatisticsSolrDateFilter
All Implemented Interfaces:
StatisticsFilter

public class StatisticsSolrDateFilter
extends Object
implements StatisticsFilter

Encapsulate a range of dates for Solr query filtering. Created by IntelliJ IDEA. User: kevinvandevelde Date: 13-mrt-2009 Time: 13:14:14


Constructor Summary
StatisticsSolrDateFilter()
           
 
Method Summary
 void setEndDate(Date endDate)
          Set the end date as a Date object.
 void setEndStr(String endStr)
          Set the end date as a string expression.
 void setStartDate(Date startDate)
          Set the start date as a Date object.
 void setStartStr(String startStr)
          Set the start date as a string expression.
 void setTypeStr(String typeStr)
          Set the range granularity: DAY, MONTH, or YEAR.
 String toQuery()
          Convert the date range to a filter expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticsSolrDateFilter

public StatisticsSolrDateFilter()
Method Detail

setStartStr

public void setStartStr(String startStr)
Set the start date as a string expression. Must be paired with setEndStr(String).


setEndStr

public void setEndStr(String endStr)
Set the end date as a string expression. Must be paired with setStartStr(String).


setTypeStr

public void setTypeStr(String typeStr)
Set the range granularity: DAY, MONTH, or YEAR.


setStartDate

public void setStartDate(Date startDate)
Set the start date as a Date object. Must be paired with setEndDate(Date).


setEndDate

public void setEndDate(Date endDate)
Set the end date as a Date object. Must be paired with setStartDate(Date).


toQuery

public String toQuery()
Convert the date range to a filter expression.

Specified by:
toQuery in interface StatisticsFilter
Returns:
Solr date filter expression


Copyright © 2012 DuraSpace. All Rights Reserved.