* 'temporalExtent' parameters
*/
@Test
public void testTemporalExtent() {
// create request object
JDOMFactory factory = new DefaultJDOMFactory();
// test extFrom
Element request = factory.element("request");
Element extFrom = factory.element("extFrom");
extFrom.addContent("2010-04-01T17:35:00");
request.addContent(extFrom);
// build lucene query input
LuceneQueryInput lQI = new LuceneQueryInput(request);
// build lucene query
Query query = new LuceneQueryBuilder(_tokenizedFieldSet, _numericFieldSet, _analyzer, null).build(lQI);
String expected = "+(tempExtentBegin:[2010-04-01T17:35:00 TO *] tempExtentEnd:[2010-04-01T17:35:00 TO *]) +_isTemplate:n";
assertEquals("unexpected Lucene query", expected, query.toString());
// test extTo
request = factory.element("request");
Element extTo = factory.element("extTo");
extTo.addContent("2010-04-27T17:43:00");
request.addContent(extTo);
// build lucene query input
LuceneQueryInput lQI2 = new LuceneQueryInput(request);
// build lucene query
query = new LuceneQueryBuilder(_tokenizedFieldSet, _numericFieldSet, _analyzer, null).build(lQI2);
expected = "+(tempExtentBegin:[* TO 2010-04-27T17:43:00] tempExtentEnd:[* TO 2010-04-27T17:43:00]) +_isTemplate:n";
assertEquals("unexpected Lucene query", expected, query.toString());
// test extfrom and extTo
request = factory.element("request");
extFrom = factory.element("extFrom");
extFrom.addContent("2010-04-08T17:46:00");
request.addContent(extFrom);
extTo = factory.element("extTo");
extTo.addContent("2010-04-27T17:43:00");
request.addContent(extTo);
// build lucene query input
LuceneQueryInput lQI3 = new LuceneQueryInput(request);
// build lucene query