org.apache.lucene.analysis.sinks
Class DateRecognizerSinkFilter
java.lang.Object
org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter
public class DateRecognizerSinkFilter
- extends TeeSinkTokenFilter.SinkFilter
Attempts to parse the CharTermAttributeImpl.termBuffer()
as a Date using a DateFormat
.
If the value is a Date, it will add it to the sink.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATE_TYPE
public static final String DATE_TYPE
- See Also:
- Constant Field Values
dateFormat
protected DateFormat dateFormat
termAtt
protected CharTermAttribute termAtt
DateRecognizerSinkFilter
public DateRecognizerSinkFilter()
- Uses
DateFormat.getDateInstance()
as the DateFormat
object.
DateRecognizerSinkFilter
public DateRecognizerSinkFilter(DateFormat dateFormat)
accept
public boolean accept(AttributeSource source)
- Description copied from class:
TeeSinkTokenFilter.SinkFilter
- Returns true, iff the current state of the passed-in
AttributeSource
shall be stored
in the sink.
- Specified by:
accept
in class TeeSinkTokenFilter.SinkFilter
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.