Package com.cobber.fta.plugins
Class CheckDigitIBAN
- Object
-
- LogicalType
-
- LogicalTypeCode
-
- LogicalTypeInfinite
-
- com.cobber.fta.plugins.CheckDigitLT
-
- com.cobber.fta.plugins.CheckDigitIBAN
-
- All Implemented Interfaces:
LTRandom
,Comparable<LogicalType>
public class CheckDigitIBAN extends CheckDigitLT
Plugin to detect valid International Bank Account Numbers (IBAN) .
-
-
Field Summary
Fields Modifier and Type Field Description static String
REGEXP
The Regular Expression for this Semantic type.static String
SEMANTIC_TYPE
The Semantic type for this Plugin.-
Fields inherited from class com.cobber.fta.plugins.CheckDigitLT
BACKOUT_REGEXP, validator
-
Fields inherited from class com.cobber.fta.LogicalTypeCode
random
-
Fields inherited from class com.cobber.fta.LogicalType
analysisConfig, defn, locale, localeInfo, pluginLocaleEntry, priority, threshold
-
-
Constructor Summary
Constructors Constructor Description CheckDigitIBAN(PluginDefinition plugin)
Construct a plugin to detect IBANs (International Bank Account Numbers) based on the Plugin Definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FTAType
getBaseType()
The underlying type we are qualifying.String
getRegExp()
The Regular Expression that most closely matches (SeeLogicalType.isRegExpComplete()
) this Semantic Type.String
getSemanticType()
The name of the Semantic Type.boolean
isValid(String input, boolean detectMode, long count)
Is the supplied String an instance of this Semantic type?String
nextRandom()
nextRandom will generate a random (secure) valid example of this Semantic Type.-
Methods inherited from class com.cobber.fta.plugins.CheckDigitLT
analyzeSet, initialize, isCandidate
-
Methods inherited from class com.cobber.fta.LogicalTypeInfinite
isClosed, 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, isValid, setThreshold
-
-
-
-
Field Detail
-
SEMANTIC_TYPE
public static final String SEMANTIC_TYPE
The Semantic type for this Plugin.- See Also:
- Constant Field Values
-
REGEXP
public static final String REGEXP
The Regular Expression for this Semantic type.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CheckDigitIBAN
public CheckDigitIBAN(PluginDefinition plugin)
Construct a plugin to detect IBANs (International Bank Account Numbers) based on the Plugin Definition.- Parameters:
plugin
- The definition of this plugin.
-
-
Method Detail
-
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 classCheckDigitLT
- 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.
-
getRegExp
public String getRegExp()
Description copied from class:LogicalType
The Regular Expression that most closely matches (SeeLogicalType.isRegExpComplete()
) this Semantic Type. Note: All valid matches will match this RE, but the inverse is not necessarily true.- Overrides:
getRegExp
in classCheckDigitLT
- Returns:
- The Java Regular Expression that most closely matches this Semantic Type.
-
getSemanticType
public String getSemanticType()
Description copied from class:LogicalType
The name of the Semantic Type. For example, EMAIL for an email address.- Overrides:
getSemanticType
in classLogicalType
- Returns:
- The name of the Semantic Type.
-
getBaseType
public FTAType getBaseType()
Description copied from class:LogicalType
The underlying type we are qualifying.- Overrides:
getBaseType
in classCheckDigitLT
- Returns:
- The underlying type - e.g. STRING, LONG, etc.
-
nextRandom
public 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 classCheckDigitLT
- Returns:
- a new valid example of the Semantic Type.
-
-