Package com.cobber.fta.plugins
Class LogicalTypePersonName
- java.lang.Object
-
- com.cobber.fta.LogicalType
-
- com.cobber.fta.LogicalTypeCode
-
- com.cobber.fta.LogicalTypeFinite
-
- com.cobber.fta.LogicalTypeFiniteSimple
-
- com.cobber.fta.plugins.LogicalTypePersonName
-
- All Implemented Interfaces:
LTRandom
,java.lang.Comparable<LogicalType>
- Direct Known Subclasses:
LogicalTypeFirstName
,LogicalTypeLastName
public abstract class LogicalTypePersonName extends LogicalTypeFiniteSimple
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
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 LogicalTypePersonName(PluginDefinition plugin, java.lang.String filename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isClosed()
Does the set of members enumerated reflect the entire set.boolean
isValid(java.lang.String input)
Is the supplied String an instance of this logical type?java.lang.String
isValidSet(java.lang.String dataStreamName, 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.LogicalTypeFiniteSimple
getMembers, getQualifier, getRegExp, initialize, 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
compareTo, getConfidence, getDescription, getHeaderConfidence, getPriority, getThreshold, isLocaleSensitive, setThreshold
-
-
-
-
Field Detail
-
REGEXP
public static final java.lang.String REGEXP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LogicalTypePersonName
public LogicalTypePersonName(PluginDefinition plugin, java.lang.String filename)
-
-
Method Detail
-
nextRandom
public java.lang.String nextRandom()
Description copied from interface:LTRandom
nextRandom will generate a random (secure) valid example of this Semantic Type.- Specified by:
nextRandom
in interfaceLTRandom
- Overrides:
nextRandom
in classLogicalTypeFiniteSimple
- Returns:
- a new valid example of the Semantic Type.
-
isValid
public boolean isValid(java.lang.String input)
Description copied from class:LogicalType
Is the supplied String an instance of this logical type?- Overrides:
isValid
in classLogicalTypeFinite
- Parameters:
input
- String to check (trimmed for Numeric base Types, un-trimmed for String base Type)- Returns:
- true iff the supplied String is an instance of this Logical type.
-
isValidSet
public java.lang.String isValidSet(java.lang.String dataStreamName, 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:
dataStreamName
- The name of the Data StreammatchCount
- 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)
-
isClosed
public boolean isClosed()
Description copied from class:LogicalType
Does the set of members enumerated reflect the entire set. For example any of the ISO sets are reference sets and hence complete, compared to FirstName and LastName where the set provided is of the common names. If isClosed() is true then isValid() false does not imply that the input is not valid just that it is not in the set of 'known' members.- Overrides:
isClosed
in classLogicalTypeFinite
- Returns:
- A boolean indicating if the set is closed.
-
-