Class PatternManager

    • Field Detail

      • pattern_family_state

        public java.util.Map<java.lang.Integer,​java.lang.Boolean> pattern_family_state
    • Constructor Detail

      • PatternManager

        public PatternManager​(java.io.InputStream s,
                              java.lang.String n)
                       throws java.io.IOException
        Pass in InputStream to provide yourself the most flexibility.
        Parameters:
        s - io stream
        n - name of patterns file
        Throws:
        java.io.IOException
    • Method Detail

      • initialize

        public void initialize​(java.io.InputStream io)
                        throws java.io.IOException
        Description copied from class: RegexPatternManager
        Initializes the pattern manager implementations. Reads the DEFINEs and RULEs from the pattern file and does the requisite substitutions. After initialization patterns HashMap will be populated.
        Overrides:
        initialize in class RegexPatternManager
        Parameters:
        io - stream
        Throws:
        java.io.IOException
      • create_pattern

        protected RegexPattern create_pattern​(java.lang.String fam,
                                              java.lang.String rule,
                                              java.lang.String desc)
        Description copied from class: RegexPatternManager
        Implementation must create a RegexPattern given the basic RULE define, #RULE FAMILY RID REGEX PatternManager here adds compiled pattern and DEFINES.
        Specified by:
        create_pattern in class RegexPatternManager
        Parameters:
        fam -
        rule -
        desc -
        Returns:
      • create_testcase

        protected PatternTestCase create_testcase​(java.lang.String id,
                                                  java.lang.String fam,
                                                  java.lang.String text)
        Description copied from class: RegexPatternManager
        Implementation must create TestCases given the #TEST directive, #TEST RID TID TEXT
        Specified by:
        create_testcase in class RegexPatternManager
        Parameters:
        id -
        fam -
        text -
        Returns:
      • enable_pattern_family

        public void enable_pattern_family​(int fam,
                                          boolean enabled)
        Parameters:
        fam -
        enabled -