Package com.cobber.fta.plugins
Class LogicalTypeDOYAbbr
- java.lang.Object
-
- com.cobber.fta.LogicalType
-
- com.cobber.fta.LogicalTypeCode
-
- com.cobber.fta.LogicalTypeFinite
-
- com.cobber.fta.plugins.LogicalTypeDOYAbbr
-
- All Implemented Interfaces:
LTRandom
,java.lang.Comparable<LogicalType>
public class LogicalTypeDOYAbbr extends LogicalTypeFinite
Plugin to detect Day of Week Abbreviations.
-
-
Field Summary
-
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 LogicalTypeDOYAbbr(PluginDefinition plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>
getMembers()
java.lang.String
getQualifier()
The user-friendly name of the Qualifier.java.lang.String
getRegExp()
The Regular Expression that most closely matches (SeeLogicalType.isRegExpComplete()
) this Logical Type.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, 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.java.lang.String
nextRandom()
nextRandom will generate a random (secure) valid example of this Semantic Type.-
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, getPriority, getSignature, getThreshold, isLocaleSensitive, setThreshold
-
-
-
-
Constructor Detail
-
LogicalTypeDOYAbbr
public LogicalTypeDOYAbbr(PluginDefinition plugin) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
initialize
public boolean initialize(java.util.Locale locale) throws FTAPluginException
Description copied from class:LogicalType
Called to perform any initialization.- Overrides:
initialize
in classLogicalTypeFinite
- Parameters:
locale
- The locale used for this analysis- Returns:
- True if initialization was successful.
- Throws:
FTAPluginException
- Thrown when the plugin is incorrectly configured.
-
nextRandom
public java.lang.String nextRandom()
Description copied from interface:LTRandom
nextRandom will generate a random (secure) valid example of this Semantic Type.- Returns:
- a new valid example of the Semantic Type.
-
getMembers
public java.util.Set<java.lang.String> getMembers()
- Specified by:
getMembers
in classLogicalTypeFinite
-
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- Specified by:
getQualifier
in classLogicalType
- Returns:
- The user-friendly name of the type-qualifier.
-
getRegExp
public java.lang.String getRegExp()
Description copied from class:LogicalType
The Regular Expression that most closely matches (SeeLogicalType.isRegExpComplete()
) this Logical Type. Note: All valid matches will match this RE, but the inverse is not necessarily true.- Specified by:
getRegExp
in classLogicalType
- Returns:
- The Java Regular Expression that most closely matches this Logical Type.
-
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.- Specified by:
isValidSet
in classLogicalType
- 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)
-
-