Package com.cobber.fta
Class PluginDefinition
- java.lang.Object
-
- com.cobber.fta.PluginDefinition
-
public class PluginDefinition extends java.lang.Object
Definition of a Plugin. There are three distinct types of plugins supported: - Finite - implementation is via providing a subclass of LogicalTypeFinite (or a child thereof, e.g. LogicalTypeFiniteSimple) - Infinite - implementation is via providing a subclass of LogicalTypeInfinite (or a child thereof) - RegExp - implementation is based on the detection of the supplied RegExp with a provided set of constraints.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
backout
com.cobber.fta.core.FTAType
baseType
The underlying base type (e.g.java.lang.String
clazz
Infinite/Finite plugins: this is the class used to implement.java.lang.String
content
Simple finite plugins: the content with the set of valid elements.java.lang.String
contentType
ContentType describes the supplied content and must be one of 'inline', 'file' or 'resource'.java.lang.String
description
English language description of the Semantic Type.int[]
headerRegExpConfidence
java.lang.String[]
headerRegExps
headerRegExps An optional array of RegExps that will be compared with the datastream name to boost confidence.java.util.Set<java.lang.String>
invalidList
RegExp plugins: a set of strings that match the regExp but are known to be invalid.boolean
isRegExpComplete
Is the returned Regular Expression a complete representation of the Logical Type.boolean
localeSensitive
Is this plugin sensitive to the input locale?java.lang.String
maximum
Maximum value to be considered as a valid instance of this type, e.g.java.lang.String
minimum
Minimum value to be considered as a valid instance of this type, e.g.boolean
minMaxPresent
Need to see both the minimum and maximum values to declare success.int
minSamples
Minimum number of samples required to declare success.int
priority
The relative priority of this plugin.static int
PRIORITY_EXTERNAL
Externally registered plugins can have a priority no lower than this.java.lang.String
qualifier
Semantic Type of Plugin (Qualifier).java.lang.String
regExpReturned
RegExp plugins: the RegExp to be returned for this Logical Type.java.lang.String[]
regExpsToMatch
RegExp plugins: the RegExps to be matched to qualify as this Logical Type.java.lang.String
signature
Signature (structure) - the MD5 Hash of the Qualifier and the Base Type.int
threshold
The required threshold to be matched (can be adjusted by presence of Hot Words.java.lang.String[]
validLocales
locales this plugin applies to - empty set, implies all locales.
-
Constructor Summary
Constructors Modifier Constructor Description PluginDefinition()
protected
PluginDefinition(java.lang.String qualifier, java.lang.String clazz)
PluginDefinition(java.lang.String qualifier, java.lang.String description, java.lang.String regExpReturned, java.lang.String[] regExpsToMatch, java.lang.String[] invalidList, java.lang.String content, java.lang.String contentType, java.lang.String backout, java.lang.String[] validLocales, boolean localeSensitive, java.lang.String[] headerRegExps, int[] headerRegExpConfidence, int threshold, com.cobber.fta.core.FTAType baseType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PluginDefinition
findByQualifier(java.lang.String qualifier)
Retrieve the Plugin Definition associated with this Qualifier.boolean
isSupported(java.util.Locale locale)
-
-
-
Field Detail
-
PRIORITY_EXTERNAL
public static final int PRIORITY_EXTERNAL
Externally registered plugins can have a priority no lower than this.- See Also:
- Constant Field Values
-
qualifier
public java.lang.String qualifier
Semantic Type of Plugin (Qualifier).
-
description
public java.lang.String description
English language description of the Semantic Type.
-
signature
public java.lang.String signature
Signature (structure) - the MD5 Hash of the Qualifier and the Base Type.
-
validLocales
public java.lang.String[] validLocales
locales this plugin applies to - empty set, implies all locales. Can use just language instead of tag, e.g. "en" rather than "en_US".
-
localeSensitive
public boolean localeSensitive
Is this plugin sensitive to the input locale?
-
priority
public int priority
The relative priority of this plugin.
-
clazz
public java.lang.String clazz
Infinite/Finite plugins: this is the class used to implement.
-
regExpsToMatch
public java.lang.String[] regExpsToMatch
RegExp plugins: the RegExps to be matched to qualify as this Logical Type.
-
regExpReturned
public java.lang.String regExpReturned
RegExp plugins: the RegExp to be returned for this Logical Type.
-
isRegExpComplete
public boolean isRegExpComplete
Is the returned Regular Expression a complete representation of the Logical Type.
-
invalidList
public java.util.Set<java.lang.String> invalidList
RegExp plugins: a set of strings that match the regExp but are known to be invalid.
-
content
public java.lang.String content
Simple finite plugins: the content with the set of valid elements.
-
contentType
public java.lang.String contentType
ContentType describes the supplied content and must be one of 'inline', 'file' or 'resource'.
-
backout
public java.lang.String backout
-
headerRegExps
public java.lang.String[] headerRegExps
headerRegExps An optional array of RegExps that will be compared with the datastream name to boost confidence.
-
headerRegExpConfidence
public int[] headerRegExpConfidence
-
threshold
public int threshold
The required threshold to be matched (can be adjusted by presence of Hot Words.
-
baseType
public com.cobber.fta.core.FTAType baseType
The underlying base type (e.g. STRING, DOUBLE, LONG, DATE, ...
-
minimum
public java.lang.String minimum
Minimum value to be considered as a valid instance of this type, e.g. 1 if the Semantic type is Financial Quarter.
-
maximum
public java.lang.String maximum
Maximum value to be considered as a valid instance of this type, e.g. 4 if the Semantic type is Financial Quarter.
-
minSamples
public int minSamples
Minimum number of samples required to declare success.
-
minMaxPresent
public boolean minMaxPresent
Need to see both the minimum and maximum values to declare success.
-
-
Constructor Detail
-
PluginDefinition
public PluginDefinition()
-
PluginDefinition
protected PluginDefinition(java.lang.String qualifier, java.lang.String clazz)
-
PluginDefinition
public PluginDefinition(java.lang.String qualifier, java.lang.String description, java.lang.String regExpReturned, java.lang.String[] regExpsToMatch, java.lang.String[] invalidList, java.lang.String content, java.lang.String contentType, java.lang.String backout, java.lang.String[] validLocales, boolean localeSensitive, java.lang.String[] headerRegExps, int[] headerRegExpConfidence, int threshold, com.cobber.fta.core.FTAType baseType)
-
-
Method Detail
-
findByQualifier
public static PluginDefinition findByQualifier(java.lang.String qualifier)
Retrieve the Plugin Definition associated with this Qualifier.- Parameters:
qualifier
- The Qualifier for this Logical Type- Returns:
- The Plugin Definition associated with the supplied Qualifier.
-
isSupported
public boolean isSupported(java.util.Locale locale)
-
-