|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.gouv.culture.sdx.utils.SdxObjectImpl
fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
fr.gouv.culture.sdx.search.lucene.query.DateIntervalQuery
A search for date intervals, opened or closed.
This query will only work on a Date field.
Two dates can be given : the first one gives the lower bound, the second one gives the upper bound. Bounds are inclusive NOT exclusive If only one of the two is not null, the query is unbounded. It is an error to give two null dates.
Field Summary | |
protected boolean |
_inclusive
|
Fields inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery |
baseOperator, baseQuery, baseResults, filter, luceneQuery, queryText, searchLocations, sortSpecification |
Fields inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl |
encoding, logger |
Fields inherited from interface fr.gouv.culture.sdx.search.lucene.query.Query |
defaultOperator, OPERATOR_AND, OPERATOR_NOT, OPERATOR_OR, SEARCH_ENGINE |
Constructor Summary | |
DateIntervalQuery()
Creates a query A logger must be set and then this query must be setUp. |
Method Summary | |
protected void |
setLuceneRangeQuery(java.lang.String fieldName,
java.lang.String lowerBound,
java.lang.String upperBound,
boolean inclusive)
|
void |
setUp(SearchLocations sLocs,
java.lang.String fieldName,
java.util.Date beginDate,
java.util.Date endDate)
Buils a date interval query. |
void |
setUp(SearchLocations sLocs,
java.lang.String fieldName,
java.util.Date beginDate,
java.util.Date endDate,
boolean inclusive)
Buils a date interval query. |
void |
setUpOai(SearchLocations sLocs,
java.lang.String fieldName,
java.util.Date beginDate,
java.util.Date endDate)
Buils a date interval query for oai responses. |
void |
toSAX(org.xml.sax.ContentHandler hdl)
Formats a query in XML. |
Methods inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery |
addAttributesLucene, addAttributesText, addBaseQuery, addBaseQuery, addFilter, addSortSpecification, enableLogging, execute, getLuceneQuery, getOperator, getSearchLocations, prepare, setLuceneQuery, setSearchLocations, setUp, setUp |
Methods inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl |
getChildLogger, setEncoding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject |
setEncoding |
Field Detail |
protected boolean _inclusive
Constructor Detail |
public DateIntervalQuery()
A logger must be set and then this query must be setUp.
AbstractQuery.enableLogging(org.apache.avalon.framework.logger.Logger)
,
setUp(fr.gouv.culture.sdx.search.lucene.query.SearchLocations, java.lang.String, java.util.Date, java.util.Date)
Method Detail |
public void setUp(SearchLocations sLocs, java.lang.String fieldName, java.util.Date beginDate, java.util.Date endDate) throws SDXException
One of beginDate or endDate must be non null.
sLocs
- The SearchLocations object (indices to be searched).fieldName
- The field name to search (if null or non existent, default field will be searched).beginDate
- The lower bound date (may be null).endDate
- The upper bound date (may be null).
SDXException
public void setUpOai(SearchLocations sLocs, java.lang.String fieldName, java.util.Date beginDate, java.util.Date endDate) throws SDXException
One of beginDate or endDate must be non null.
sLocs
- The SearchLocations object (indices to be searched).fieldName
- The field name to search (if null or non existent, default field will be searched).beginDate
- The lower bound date (may be null).endDate
- The upper bound date (may be null).
SDXException
public void setUp(SearchLocations sLocs, java.lang.String fieldName, java.util.Date beginDate, java.util.Date endDate, boolean inclusive) throws SDXException
One of beginDate or endDate must be non null.
sLocs
- The SearchLocations object (indices to be searched).fieldName
- The field name to search (if null or non existent, default field will be searched).beginDate
- The lower bound date (may be null).endDate
- The upper bound date (may be null).
SDXException
protected void setLuceneRangeQuery(java.lang.String fieldName, java.lang.String lowerBound, java.lang.String upperBound, boolean inclusive)
public void toSAX(org.xml.sax.ContentHandler hdl) throws org.xml.sax.SAXException, org.apache.cocoon.ProcessingException
toSAX
in interface Query
toSAX
in class AbstractQuery
hdl
- The ContentHandler that will receive the events.
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |