Class DefaultRecognizer


  • class DefaultRecognizer
    extends Recognizer
    This is the default Recognizer. It uses the rules found in the file DefaultRules.xml to find aggregate tables and there columns.
    Author:
    Richard M. Emberson
    • Method Detail

      • getRules

        DefaultRules getRules()
        Get the DefaultRules instance associated with this object.
      • checkMeasures

        protected int checkMeasures()
        Create measures for an aggregate table.

        First, iterator through all fact table measure usages. Create a Matcher for each such usage. Iterate through all aggregate table columns. For each column that matches create a measure usage.

        Per fact table measure usage, at most only one aggregate measure should be created.

        Specified by:
        checkMeasures in class Recognizer
        Returns:
        number of measures created.
      • matchForeignKey

        protected int matchForeignKey​(JdbcSchema.Table.Column.Usage factUsage)
        This creates a foreign key usage.

        Using the foreign key Matcher with the fact usage's column name the aggregate table's columns are searched for one that matches. For each that matches a foreign key usage is created (thought if more than one is created its is an error which is handled in the calling code.

        Specified by:
        matchForeignKey in class Recognizer
      • matchLevels

        protected void matchLevels​(Hierarchy hierarchy,
                                   HierarchyUsage hierarchyUsage)
        Create level usages.

        A Matcher is created using the Hierarchy's name, the RolapLevel name, and the column name associated with the RolapLevel's key expression. The aggregate table columns are search for the first match and, if found, a level usage is created for that column.

        Specified by:
        matchLevels in class Recognizer