Class LastName

  • All Implemented Interfaces:
    LTRandom, Comparable<LogicalType>

    public class LastName
    extends PersonName
    Plugin to detect an individuals Last Name.
    • Constructor Detail

      • LastName

        public LastName​(PluginDefinition plugin)
        Construct a Last Name plugin based on the Plugin Definition.
        Parameters:
        plugin - The definition of this plugin.
    • Method Detail

      • initialize

        public boolean initialize​(AnalysisConfig analysisConfig)
                           throws FTAPluginException
        Description copied from class: LogicalType
        Called to perform any initialization.
        Overrides:
        initialize in class LogicalTypeFiniteSimple
        Parameters:
        analysisConfig - The Analysis configuration used for this analysis
        Returns:
        True if initialization was successful.
        Throws:
        FTAPluginException - Thrown when the plugin is incorrectly configured.
      • isPlausible

        protected boolean isPlausible​(String candidate)
        Specified by:
        isPlausible in class PersonName
      • isValid

        public boolean isValid​(String input,
                               boolean detectMode,
                               long count)
        Description copied from class: LogicalType
        Is the supplied String an instance of this Semantic type?
        Overrides:
        isValid in class PersonName
        Parameters:
        input - String to check (trimmed for Numeric base Types, un-trimmed for String base Type)
        detectMode - If true then we are in the process of detection, otherwise it is a simple validity check.
        count - The number of instance of this sample.
        Returns:
        true iff the supplied String is an instance of this Semantic type.
      • analyzeSet

        public PluginAnalysis analyzeSet​(AnalyzerContext context,
                                         long matchCount,
                                         long realSamples,
                                         String currentRegExp,
                                         Facts facts,
                                         FiniteMap cardinality,
                                         FiniteMap outliers,
                                         TokenStreams tokenStreams,
                                         AnalysisConfig analysisConfig)
        Description copied from class: LogicalType
        Given the data to date as embodied by the arguments return an analysis. If we think this is an instance of this Semantic type then valid will be true , if invalid then valid will be false and a new Pattern will be returned.
        Overrides:
        analyzeSet in class PersonName
        Parameters:
        context - The context used to interpret the Data Stream (for example, stream name, date resolution mode, etc)
        matchCount - Number of samples that match so far (as determined by isValid()
        realSamples - Number of real (i.e. non-blank and non-null) samples that we have processed so far.
        currentRegExp - The current Regular Expression that we matched against
        facts - Facts (min, max, sum) for the analysis to date (optional - i.e. maybe null)
        cardinality - Cardinality set, up to the maximum maintained
        outliers - Outlier set, up to the maximum maintained
        tokenStreams - Shapes observed
        analysisConfig - The Configuration of the current analysis
        Returns:
        Null if we think this is an instance of this Semantic type (backout pattern otherwise)