Package com.cobber.fta.plugins
Class MiddleName
- java.lang.Object
-
- All Implemented Interfaces:
LTRandom
,java.lang.Comparable<LogicalType>
public class MiddleName extends FirstName
Plugin to detect a middle name.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SEMANTIC_TYPE
-
Fields inherited from class com.cobber.fta.plugins.PersonName
REGEXP
-
Fields inherited from class com.cobber.fta.LogicalTypeFiniteSimple
backout, memberSet, qualifier, reader, regexp
-
Fields inherited from class com.cobber.fta.LogicalTypeFinite
maxLength, minLength
-
Fields inherited from class com.cobber.fta.LogicalTypeCode
random
-
Fields inherited from class com.cobber.fta.LogicalType
defn, headerPatterns, locale, priority, threshold
-
-
Constructor Summary
Constructors Constructor Description MiddleName(PluginDefinition plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getQualifier()
The user-friendly name of the Qualifier.boolean
initialize(java.util.Locale locale)
Called to perform any initialization.java.lang.String
isValidSet(AnalyzerContext context, long matchCount, long realSamples, java.lang.String currentRegExp, Facts facts, java.util.Map<java.lang.String,java.lang.Long> cardinality, java.util.Map<java.lang.String,java.lang.Long> outliers, TokenStreams tokenStreams, AnalysisConfig analysisConfig)
Given the data to date as embodied by the arguments return null if we think this is an instance of this logical type, if not return a new suitable pattern.-
Methods inherited from class com.cobber.fta.plugins.PersonName
isClosed, isValid, nextRandom
-
Methods inherited from class com.cobber.fta.LogicalTypeFiniteSimple
getMembers, getRegExp, isMember, setContent
-
Methods inherited from class com.cobber.fta.LogicalTypeFinite
getBaseType, getMaxLength, getMinLength, getSize, isRegExpComplete
-
Methods inherited from class com.cobber.fta.LogicalTypeCode
seed
-
Methods inherited from class com.cobber.fta.LogicalType
acceptsBaseType, compareTo, getConfidence, getDescription, getHeaderConfidence, getPluginDefinition, getPriority, getSignature, getThreshold, isLocaleSensitive, setThreshold
-
-
-
-
Field Detail
-
SEMANTIC_TYPE
public static final java.lang.String SEMANTIC_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MiddleName
public MiddleName(PluginDefinition plugin) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
initialize
public boolean initialize(java.util.Locale locale) throws com.cobber.fta.core.FTAPluginException
Description copied from class:LogicalType
Called to perform any initialization.- Overrides:
initialize
in classLogicalTypeFiniteSimple
- Parameters:
locale
- The locale used for this analysis- Returns:
- True if initialization was successful.
- Throws:
com.cobber.fta.core.FTAPluginException
- Thrown when the plugin is incorrectly configured.
-
getQualifier
public java.lang.String getQualifier()
Description copied from class:LogicalType
The user-friendly name of the Qualifier. For example, EMAIL for an email address- Overrides:
getQualifier
in classLogicalTypeFiniteSimple
- Returns:
- The user-friendly name of the type-qualifier.
-
isValidSet
public java.lang.String isValidSet(AnalyzerContext context, long matchCount, long realSamples, java.lang.String currentRegExp, Facts facts, java.util.Map<java.lang.String,java.lang.Long> cardinality, java.util.Map<java.lang.String,java.lang.Long> outliers, TokenStreams tokenStreams, AnalysisConfig analysisConfig)
Description copied from class:LogicalType
Given the data to date as embodied by the arguments return null if we think this is an instance of this logical type, if not return a new suitable pattern.- Overrides:
isValidSet
in classPersonName
- 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 againstfacts
- Facts (min, max, sum) for the analysis to date (optional - i.e. maybe null)cardinality
- Cardinality set, up to the maximum maintainedoutliers
- Outlier set, up to the maximum maintainedtokenStreams
- Shapes observedanalysisConfig
- The Configuration of the current analysis- Returns:
- Null if we think this is an instance of this logical type (backout pattern otherwise)
-
-