📄 recognizer.html
字号:
</TR></TABLE><A NAME="Recognizer(mondrian.rolap.RolapStar, mondrian.rolap.aggmatcher.JdbcSchema.Table, mondrian.rolap.aggmatcher.JdbcSchema.Table, mondrian.recorder.MessageRecorder)"><!-- --></A><H3>Recognizer</H3><PRE>protected <B>Recognizer</B>(<A HREF="../../../mondrian/rolap/RolapStar.html" title="class in mondrian.rolap">RolapStar</A> star, <A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table</A> dbFactTable, <A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table</A> aggTable, <A HREF="../../../mondrian/recorder/MessageRecorder.html" title="interface in mondrian.recorder">MessageRecorder</A> msgRecorder)</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="check()"><!-- --></A><H3>check</H3><PRE>public boolean <B>check</B>()</PRE><DL><DD>Return true if the candidate aggregate table was successfully mapped into the fact table. This is the top-level checking method. <p> It first checks the ignore columns. <p> Next, the existence of a fact count column is checked. <p> Then the measures are checked. First the specified (defined, explicit) measures are all determined. There must be at least one such measure. This if followed by checking for implied measures (e.g., if base fact table as both sum and average of a column and the aggregate has a sum measure, the there is an implied average measure in the aggregate). <p> Now the levels are checked. This is in two parts. First, foreign keys are checked followed by level columns (for collapsed dimension aggregates). <p> If eveything checks out, returns true.<P><DD><DL></DL></DD></DL><HR><A NAME="getIgnoreMatcher()"><!-- --></A><H3>getIgnoreMatcher</H3><PRE>protected abstract <A HREF="../../../mondrian/rolap/aggmatcher/Recognizer.Matcher.html" title="interface in mondrian.rolap.aggmatcher">Recognizer.Matcher</A> <B>getIgnoreMatcher</B>()</PRE><DL><DD>Return the ignore column Matcher.<P><DD><DL></DL></DD></DL><HR><A NAME="checkIgnores()"><!-- --></A><H3>checkIgnores</H3><PRE>protected void <B>checkIgnores</B>()</PRE><DL><DD>Check all columns to be marked as ignore.<P><DD><DL></DL></DD></DL><HR><A NAME="makeIgnore(mondrian.rolap.aggmatcher.JdbcSchema.Table.Column)"><!-- --></A><H3>makeIgnore</H3><PRE>protected void <B>makeIgnore</B>(<A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column</A> aggColumn)</PRE><DL><DD>Create an ignore usage for the aggColumn.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>aggColumn</CODE> - </DL></DD></DL><HR><A NAME="getFactCountMatcher()"><!-- --></A><H3>getFactCountMatcher</H3><PRE>protected abstract <A HREF="../../../mondrian/rolap/aggmatcher/Recognizer.Matcher.html" title="interface in mondrian.rolap.aggmatcher">Recognizer.Matcher</A> <B>getFactCountMatcher</B>()</PRE><DL><DD>Return the fact count column Matcher.<P><DD><DL></DL></DD></DL><HR><A NAME="checkFactCount()"><!-- --></A><H3>checkFactCount</H3><PRE>protected void <B>checkFactCount</B>()</PRE><DL><DD>Make sure that the aggregate table has one fact count column and that its type is numeric.<P><DD><DL></DL></DD></DL><HR><A NAME="checkMeasures()"><!-- --></A><H3>checkMeasures</H3><PRE>protected abstract int <B>checkMeasures</B>()</PRE><DL><DD>Check all measure columns returning the number of measure columns.<P><DD><DL></DL></DD></DL><HR><A NAME="makeFactCount(mondrian.rolap.aggmatcher.JdbcSchema.Table.Column)"><!-- --></A><H3>makeFactCount</H3><PRE>protected void <B>makeFactCount</B>(<A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column</A> aggColumn)</PRE><DL><DD>Create a fact count usage for the aggColumn.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>aggColumn</CODE> - </DL></DD></DL><HR><A NAME="checkNosMeasures(int)"><!-- --></A><H3>checkNosMeasures</H3><PRE>protected void <B>checkNosMeasures</B>(int nosMeasures)</PRE><DL><DD>Make sure there was at least one measure column identified.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>nosMeasures</CODE> - </DL></DD></DL><HR><A NAME="generateImpliedMeasures()"><!-- --></A><H3>generateImpliedMeasures</H3><PRE>protected void <B>generateImpliedMeasures</B>()</PRE><DL><DD>An implied measure in an aggregate table is one where there is both a sum and average measures in the base fact table and the aggregate table has either a sum or average, the other measure is implied and can be generated from the measure and the fact_count column. <p> For each column in the fact table, get its measure usages. If there is both an average and sum aggregator associated with the column, then iterator over all of the column usage of type measure of the aggregator table. If only one aggregate column usage measure is found and this RolapStar.Measure measure instance variable is the same as the the fact table's usage's instance variable, then the other measure is implied and the measure is created for the aggregate table.<P><DD><DL></DL></DD></DL><HR><A NAME="makeMeasure(mondrian.rolap.aggmatcher.JdbcSchema.Table.Column.Usage, mondrian.rolap.aggmatcher.JdbcSchema.Table.Column.Usage)"><!-- --></A><H3>makeMeasure</H3><PRE>protected void <B>makeMeasure</B>(<A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.Usage.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column.Usage</A> factUsage, <A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.Usage.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column.Usage</A> aggSiblingUsage)</PRE><DL><DD>Here we have the fact usage of either sum or avg and an aggregate usage of the opposite type. We wish to make a new aggregate usage based on the existing usage's column of the same type as the fact usage.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>factUsage</CODE> - fact usage<DD><CODE>aggSiblingUsage</CODE> - existing sibling usage</DL></DD></DL><HR><A NAME="makeMeasure(mondrian.rolap.aggmatcher.JdbcSchema.Table.Column.Usage, mondrian.rolap.aggmatcher.JdbcSchema.Table.Column)"><!-- --></A><H3>makeMeasure</H3><PRE>protected void <B>makeMeasure</B>(<A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.Usage.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column.Usage</A> factUsage, <A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column</A> aggColumn)</PRE><DL><DD>This method creates an aggregate table column measure usage from a fact table column measure usage.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>factUsage</CODE> - <DD><CODE>aggColumn</CODE> - </DL></DD></DL><HR><A NAME="matchForeignKey(mondrian.rolap.aggmatcher.JdbcSchema.Table.Column.Usage)"><!-- --></A><H3>matchForeignKey</H3><PRE>protected abstract int <B>matchForeignKey</B>(<A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.Usage.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column.Usage</A> factUsage)</PRE><DL><DD>This method determine how may aggregate table column's match the fact table foreign key column return in the number matched. For each matching column a foreign key usage is created.<P><DD><DL></DL></DD></DL><HR><A NAME="checkForeignKeys()"><!-- --></A><H3>checkForeignKeys</H3><PRE>protected <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.Usage.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column.Usage</A>> <B>checkForeignKeys</B>()</PRE><DL><DD>This method checks the foreign key columns. <p> For each foreign key column usage in the fact table, determine how many aggregate table columns match that column usage. If there is more than one match, then that is an error. If there were no matches, then the foreign key usage is added to the list of fact column foreign key that were not in the aggregate table. This list is returned by this method. <p> This matches foreign keys that were not "lost" or "collapsed".<P><DD><DL><DT><B>Returns:</B><DD>list on not seen foreign key column usages</DL></DD></DL><HR><A NAME="checkLevels(java.util.List)"><!-- --></A><H3>checkLevels</H3><PRE>protected void <B>checkLevels</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../mondrian/rolap/aggmatcher/JdbcSchema.Table.Column.Usage.html" title="class in mondrian.rolap.aggmatcher">JdbcSchema.Table.Column.Usage</A>> notSeenForeignKeys)</PRE><DL><DD>This method identifies those columns in the aggregate table that match "collapsed" dimension columns. Remember that a collapsed dimension is one where the higher levels of some hierarchy are columns in the aggregate table (and all of the lower levels are missing - it has aggregated up to the first existing level). <p> Here, we do not start from the fact table, we iterator over each cube. For each of the cube's dimensions, the dimension's hirarchies are iterated over. In turn, each hierarchy's usage is iterated over. if the hierarchy's usage's foreign key is not in the list of not seen foreign keys (the notSeenForeignKeys parameter), then that hierarchy is not considered. If the hierarchy's usage's foreign key is in the not seen list, then starting with the hierarchy's top level, it is determined if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -