public class DateRecognizerSinkFilter extends TeeSinkTokenFilter.SinkFilter
CharTermAttributeImpl.termBuffer()
as a Date using a DateFormat
.
If the value is a Date, it will add it to the sink.
Modifier and Type | Field | Description |
---|---|---|
static String |
DATE_TYPE |
|
protected DateFormat |
dateFormat |
|
protected CharTermAttribute |
termAtt |
Constructor | Description |
---|---|
DateRecognizerSinkFilter() |
Uses
DateFormat.getDateInstance() as the DateFormat object. |
DateRecognizerSinkFilter(DateFormat dateFormat) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
accept(AttributeSource source) |
Returns true, iff the current state of the passed-in
AttributeSource shall be stored
in the sink. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
reset
public static final String DATE_TYPE
protected DateFormat dateFormat
protected CharTermAttribute termAtt
public DateRecognizerSinkFilter()
DateFormat.getDateInstance()
as the DateFormat
object.public DateRecognizerSinkFilter(DateFormat dateFormat)
public boolean accept(AttributeSource source)
TeeSinkTokenFilter.SinkFilter
AttributeSource
shall be stored
in the sink.accept
in class TeeSinkTokenFilter.SinkFilter
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.