Package com.cobber.fta.plugins
Class LogicalTypeCountryEN
- java.lang.Object
-
- com.cobber.fta.LogicalType
-
- com.cobber.fta.LogicalTypeCode
-
- com.cobber.fta.LogicalTypeFinite
-
- com.cobber.fta.LogicalTypeFiniteSimple
-
- com.cobber.fta.plugins.LogicalTypeCountryEN
-
- All Implemented Interfaces:
LTRandom
,java.lang.Comparable<LogicalType>
public class LogicalTypeCountryEN extends LogicalTypeFiniteSimple
Plugin to detect Country names. (English-language only).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REGEXP
static java.lang.String
SEMANTIC_TYPE
-
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 LogicalTypeCountryEN(PluginDefinition plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
isValidSet(AnalyzerContext context, long matchCount, long realSamples, java.lang.String currentRegExp, FactsTypeBased facts, java.util.Map<java.lang.String,java.lang.Long> cardinality, java.util.Map<java.lang.String,java.lang.Long> outliers, Shapes shapes, 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.LogicalTypeFiniteSimple
getMembers, getQualifier, getRegExp, initialize, nextRandom, setContent
-
Methods inherited from class com.cobber.fta.LogicalTypeFinite
getBaseType, getMaxLength, getMinLength, getSize, isClosed, isRegExpComplete, isValid
-
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
-
REGEXP
public static final java.lang.String REGEXP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LogicalTypeCountryEN
public LogicalTypeCountryEN(PluginDefinition plugin) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
isValidSet
public java.lang.String isValidSet(AnalyzerContext context, long matchCount, long realSamples, java.lang.String currentRegExp, FactsTypeBased facts, java.util.Map<java.lang.String,java.lang.Long> cardinality, java.util.Map<java.lang.String,java.lang.Long> outliers, Shapes shapes, 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 classLogicalTypeFiniteSimple
- 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 maintainedshapes
- Shapes observedanalysisConfig
- The Configuration of the current analysis- Returns:
- Null if we think this is an instance of this logical type (backout pattern otherwise)
-
-