Show / Hide Table of Contents

    Class DateRecognizerSinkFilter

    Attempts to parse the ToString() as a Date using either the System.DateTime.TryParse(System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@) or System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@) methods. If a format is passed, System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@) will be used, and the format must strictly match one of the specified formats as specified in the MSDN documentation. If the value is a Date, it will add it to the sink.

    Inheritance
    System.Object
    TeeSinkTokenFilter.SinkFilter
    DateRecognizerSinkFilter
    Inherited Members
    TeeSinkTokenFilter.SinkFilter.Reset()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Analysis.Sinks
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public class DateRecognizerSinkFilter : TeeSinkTokenFilter.SinkFilter

    Constructors

    | Improve this Doc View Source

    DateRecognizerSinkFilter()

    Creates a new instance of DateRecognizerSinkFilter using the current culture and System.Globalization.DateTimeStyles.None. Loosely matches standard DateTime formats using System.DateTime.TryParse(System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter()
    | Improve this Doc View Source

    DateRecognizerSinkFilter(IFormatProvider)

    Creates a new instance of DateRecognizerSinkFilter using the supplied culture and System.Globalization.DateTimeStyles.None. Loosely matches standard DateTime formats using System.DateTime.TryParse(System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter(IFormatProvider culture)
    Parameters
    Type Name Description
    System.IFormatProvider culture

    An object that supplies culture-specific format information

    | Improve this Doc View Source

    DateRecognizerSinkFilter(IFormatProvider, DateTimeStyles)

    Creates a new instance of DateRecognizerSinkFilter using the supplied culture and System.Globalization.DateTimeStyles. Loosely matches standard DateTime formats using System.DateTime.TryParse(System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter(IFormatProvider culture, DateTimeStyles style)
    Parameters
    Type Name Description
    System.IFormatProvider culture

    An object that supplies culture-specific format information

    System.Globalization.DateTimeStyles style

    A bitwise combination of enumeration values that indicates the permitted format of s. A typical value to specify is System.Globalization.DateTimeStyles.None

    | Improve this Doc View Source

    DateRecognizerSinkFilter(String)

    Creates a new instance of DateRecognizerSinkFilter using the current culture and System.Globalization.DateTimeStyles.None. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter(string format)
    Parameters
    Type Name Description
    System.String format

    The allowable format of the ToString(). If supplied, it must match the format of the date exactly to get a match.

    | Improve this Doc View Source

    DateRecognizerSinkFilter(String, IFormatProvider)

    Creates a new instance of DateRecognizerSinkFilter using the supplied format, culture and System.Globalization.DateTimeStyles.None. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter(string format, IFormatProvider culture)
    Parameters
    Type Name Description
    System.String format

    The allowable format of the ToString(). If supplied, it must match the format of the date exactly to get a match.

    System.IFormatProvider culture

    An object that supplies culture-specific format information

    | Improve this Doc View Source

    DateRecognizerSinkFilter(String, IFormatProvider, DateTimeStyles)

    Creates a new instance of DateRecognizerSinkFilter using the supplied format, culture and System.Globalization.DateTimeStyles. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter(string format, IFormatProvider culture, DateTimeStyles style)
    Parameters
    Type Name Description
    System.String format

    The allowable format of the ToString(). If supplied, it must match the format of the date exactly to get a match.

    System.IFormatProvider culture

    An object that supplies culture-specific format information

    System.Globalization.DateTimeStyles style

    A bitwise combination of enumeration values that indicates the permitted format of s. A typical value to specify is System.Globalization.DateTimeStyles.None

    | Improve this Doc View Source

    DateRecognizerSinkFilter(String[])

    Creates a new instance of DateRecognizerSinkFilter using the current culture and System.Globalization.DateTimeStyles.None. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter(string[] formats)
    Parameters
    Type Name Description
    System.String[] formats

    An array of allowable formats of the ToString(). If supplied, one of them must match the format of the date exactly to get a match.

    | Improve this Doc View Source

    DateRecognizerSinkFilter(String[], IFormatProvider)

    Creates a new instance of DateRecognizerSinkFilter using the supplied formats, culture and System.Globalization.DateTimeStyles.None. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter(string[] formats, IFormatProvider culture)
    Parameters
    Type Name Description
    System.String[] formats

    An array of allowable formats of the ToString(). If supplied, one of them must match the format of the date exactly to get a match.

    System.IFormatProvider culture

    An object that supplies culture-specific format information

    | Improve this Doc View Source

    DateRecognizerSinkFilter(String[], IFormatProvider, DateTimeStyles)

    Creates a new instance of DateRecognizerSinkFilter using the supplied formats, culture and System.Globalization.DateTimeStyles. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).

    Declaration
    public DateRecognizerSinkFilter(string[] formats, IFormatProvider culture, DateTimeStyles style)
    Parameters
    Type Name Description
    System.String[] formats

    An array of allowable formats of the ToString(). If supplied, one of them must match the format of the date exactly to get a match.

    System.IFormatProvider culture

    An object that supplies culture-specific format information

    System.Globalization.DateTimeStyles style

    A bitwise combination of enumeration values that indicates the permitted format of s. A typical value to specify is System.Globalization.DateTimeStyles.None

    Fields

    | Improve this Doc View Source

    m_culture

    Declaration
    protected IFormatProvider m_culture
    Field Value
    Type Description
    System.IFormatProvider
    | Improve this Doc View Source

    m_formats

    Declaration
    protected string[] m_formats
    Field Value
    Type Description
    System.String[]
    | Improve this Doc View Source

    m_style

    Declaration
    protected DateTimeStyles m_style
    Field Value
    Type Description
    System.Globalization.DateTimeStyles
    | Improve this Doc View Source

    m_termAtt

    Declaration
    protected ICharTermAttribute m_termAtt
    Field Value
    Type Description
    ICharTermAttribute

    Methods

    | Improve this Doc View Source

    Accept(AttributeSource)

    Declaration
    public override bool Accept(AttributeSource source)
    Parameters
    Type Name Description
    AttributeSource source
    Returns
    Type Description
    System.Boolean
    Overrides
    TeeSinkTokenFilter.SinkFilter.Accept(AttributeSource)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)