Class LogicalTypeFinite

    • Field Detail

      • minLength

        protected int minLength
      • maxLength

        protected int maxLength
    • Constructor Detail

    • Method Detail

      • getMembers

        public abstract Set<String> getMembers()
      • 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?
        Specified by:
        isValid in class LogicalType
        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.
      • initialize

        public boolean initialize​(AnalysisConfig analysisConfig)
                           throws FTAPluginException
        Description copied from class: LogicalType
        Called to perform any initialization.
        Overrides:
        initialize in class LogicalTypeCode
        Parameters:
        analysisConfig - The Analysis configuration used for this analysis
        Returns:
        True if initialization was successful.
        Throws:
        FTAPluginException - Thrown when the plugin is incorrectly configured.
      • isRegExpComplete

        public boolean isRegExpComplete()
        Description copied from class: LogicalType
        Is the returned Regular Expression a true and complete representation of the Semantic Type. For example, \\d{5} is not for US ZIP codes (e.g. 00000 is not a valid Zip), whereas (?i)(male|female) could be valid for a Gender.
        Overrides:
        isRegExpComplete in class LogicalType
        Returns:
        The Java Regular Expression that most closely matches this Semantic Type.
      • 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.
        Specified by:
        isClosed in class LogicalType
        Returns:
        A boolean indicating if the set is closed.
      • getSize

        public int getSize()
        Get the number of members in this Semantic Type.
        Returns:
        The number of members
      • getIgnorable

        public Set<String> getIgnorable()
      • getMinLength

        public int getMinLength()
        Get the minimum length of instances of this Semantic Type.
        Returns:
        The minimum length of instances
      • getMaxLength

        public int getMaxLength()
        Get the maximum length of instances of this Semantic Type.
        Returns:
        The maximum length of instances