From 07107aad85e5c5752c720f52dcab2cac2fb8c906 Mon Sep 17 00:00:00 2001 From: Julian Hyde Date: Mon, 21 May 2012 18:49:27 +0000 Subject: [PATCH] Code formatting: disallow multi-line C-style comments /* ... */. git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@534 c6a108a4-781c-0410-a6c6-c2d559e19af0 --- checkFile.awk | 3 + checkFile.sh | 30 +- .../olap4j/driver/xmla/XmlaOlap4jCatalog.java | 8 +- .../olap4j/driver/xmla/XmlaOlap4jCellSet.java | 82 ++-- .../driver/xmla/XmlaOlap4jConnection.java | 377 ++++++++---------- .../olap4j/driver/xmla/XmlaOlap4jDriver.java | 23 -- .../olap4j/driver/xmla/XmlaOlap4jMember.java | 5 +- src/org/olap4j/impl/ConnectStringParser.java | 6 +- .../olap4j/mdx/DefaultMdxValidatorImpl.java | 6 +- src/org/olap4j/metadata/Datatype.java | 19 +- src/org/olap4j/metadata/XmlaConstants.java | 101 ++--- src/org/olap4j/query/Olap4jNodeConverter.java | 4 +- testsrc/org/olap4j/ConnectionTest.java | 63 ++- 13 files changed, 318 insertions(+), 409 deletions(-) diff --git a/checkFile.awk b/checkFile.awk index e6a9d50..5209428 100644 --- a/checkFile.awk +++ b/checkFile.awk @@ -197,6 +197,9 @@ FNR < headerCount { # beginning of multiline comment "/*" inComment = 1; gsub(/\/\*.*$/, "/* comment */", s); + if (strict > 0 && FNR > 1 && $0 !~ /\/\*\*/) { + error(fname, FNR, "Multi-line c-style comment not allowed"); + } } else { # mask out /* */ comments gsub(/\/\*.*\*\//, "/* comment */", s); diff --git a/checkFile.sh b/checkFile.sh index 7b12e26..69d73df 100755 --- a/checkFile.sh +++ b/checkFile.sh @@ -161,7 +161,7 @@ doCheck() { else gawk -f "$CHECKFILE_AWK" \ -v fname="$filePath" \ - -v lenient="$lenient" \ + -v strict="$strict" \ -v maxLineLength="$maxLineLength" \ "$file" fi @@ -172,12 +172,23 @@ doCheckDeferred() { maxLineLength=80 cat "${deferred_file}" | xargs gawk -f "$CHECKFILE_AWK" \ - -v lenient="$lenient" \ + -v strict="$strict" \ -v maxLineLength="$maxLineLength" fi rm -f "${deferred_file}" } +function guessCoreCount() { + if [ -f /proc/cpuinfo ]; then + cat /proc/cpuinfo | awk '$1 == "processor"' | wc -l + else + # File doe not exist on Darwin or cygwin + echo 2 + fi +} + +export CORE_COUNT=$(guessCoreCount) + export deferred=true # 'test' is an undocumented flag, overriding the default behavior which is @@ -188,9 +199,9 @@ if [ "$1" == --test ]; then shift fi -lenient= +strict=1 if [ "$1" == --lenient ]; then - lenient=true + strict=0 shift fi @@ -199,9 +210,8 @@ if [ "$1" == --help ]; then exit 0 fi -strict= if [ "$1" == --strict ]; then - strict=true + strict=2 shift fi @@ -240,7 +250,12 @@ fi if [ ! -f "$CHECKFILE_AWK" ] then - export CHECKFILE_AWK="$(dirname $(readlink -f $0))/checkFile.awk" + case $(uname) in + (Darwin) + export CHECKFILE_AWK="$(cd $(dirname $0); pwd -P)/checkFile.awk";; + (*) + export CHECKFILE_AWK="$(dirname $(readlink -f $0))/checkFile.awk";; + esac fi export deferred_file=/tmp/checkFile_deferred_$$.txt @@ -282,7 +297,6 @@ status=0 if [ -s /tmp/checkFile_output_$$.txt ]; then status=1 fi - rm -f /tmp/checkFile_output_$$.txt exit $status diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java b/src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java index 5f9d02d..7c74b15 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java @@ -83,11 +83,9 @@ protected void populateList( throws OlapException { try { - /* - * Some OLAP servers don't support DBSCHEMA_SCHEMATA - * so we fork the behavior here according to the - * database product name. - */ + // Some OLAP servers don't support DBSCHEMA_SCHEMATA so + // we fork the behavior here according to the database + // product name. if (XmlaOlap4jCatalog.this.olap4jDatabaseMetaData .getDatabaseProductName().contains("Mondrian")) { diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java b/src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java index e652ee5..2feeaa3 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java @@ -128,20 +128,20 @@ void populate() throws OlapException { Element fault = findChild(body, SOAP_NS, "Fault"); if (fault != null) { - /* - - SOAP-ENV:Client.00HSBC01 - XMLA connection datasource not found - Mondrian - - - 00HSBC01 - The Mondrian XML: Mondrian Error:Internal - error: no catalog named 'LOCALDB' - - - - */ + // + // SOAP-ENV:Client.00HSBC01 + // XMLA connection datasource not + // found + // Mondrian + // + // + // 00HSBC01 + // The Mondrian XML: Mondrian Error:Internal + // error: no catalog named 'LOCALDB' + // + // + // + // // TODO: log doc to logfile throw getHelper().createException( "XMLA provider gave exception: " @@ -186,14 +186,12 @@ void populate() throws OlapException { // todo: use CellInfo element to determine mapping of cell properties // to XML tags - /* - - - - - - */ - + // + // + // + // + // + // final Element axesNode = findChild(root, MDDATASET_NS, "Axes"); // First pass, gather up a list of member unique names to fetch @@ -427,27 +425,25 @@ private XmlaOlap4jCellSetMetaData createMetaData(Element root) findChildren(axisInfo, MDDATASET_NS, "HierarchyInfo"); final List hierarchyList = new ArrayList(); - /* - - - - - - - - - - - - ... - - - - - - - - */ + // + // + // + // + // + // + // + // + // + // + // + // ... + // + // + // + // + // + // + // final List propertyList = new ArrayList(); for (Element hierarchyInfo : hierarchyInfos) { diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java b/src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java index f8d036f..ebff731 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java @@ -918,20 +918,20 @@ Element executeMetadataRequest(String request) throws OlapException { Element fault = findChild(body, SOAP_NS, "Fault"); if (fault != null) { - /* - - SOAP-ENV:Client.00HSBC01 - XMLA connection datasource not found - Mondrian - - - 00HSBC01 - The Mondrian XML: Mondrian Error:Internal - error: no catalog named 'LOCALDB' - - - - */ + // + // SOAP-ENV:Client.00HSBC01 + // XMLA connection datasource not + // found + // Mondrian + // + // + // 00HSBC01 + // The Mondrian XML: Mondrian Error:Internal + // error: no catalog named 'LOCALDB' + // + // + // + // // TODO: log doc to logfile throw getHelper().createException( "XMLA provider gave exception: " @@ -1227,15 +1227,13 @@ public void handle( Context context, List list) { - /* - Example: - - - FoodMart - No description available - California manager,No HR Cube - - */ + // Example: + // + // + // FoodMart + // No description available + // California manager,No HR Cube + // String catalogName = XmlaOlap4jUtil.stringElement(row, "CATALOG_NAME"); String roles = @@ -1263,21 +1261,20 @@ public void handle( List list) throws OlapException { - /* - Example: - - - FoodMart - FoodMart - HR - CUBE - true - false - false - false - FoodMart Schema - HR Cube - - */ + // Example: + // + // + // FoodMart + // FoodMart + // HR + // CUBE + // true + // false + // false + // false + // FoodMart Schema - HR Cube + // + // // Unused: CATALOG_NAME, SCHEMA_NAME, CUBE_TYPE, // IS_DRILLTHROUGH_ENABLED, IS_WRITE_ENABLED, IS_LINKABLE, // IS_SQL_ENABLED @@ -1305,28 +1302,25 @@ public void handle( Context context, List list) { - /* - Example: - - - FoodMart - FoodMart - HR - Department - [Department] - Department - 6 - 3 - 13 - [Department] - HR Cube - Department Dimension - false - false - 0 - true - - - */ + // Example: + // + // + // FoodMart + // FoodMart + // HR + // Department + // [Department] + // Department + // 6 + // 3 + // 13 + // [Department] + // HR Cube - Department Dimension + // false + // false + // 0 + // true + // final String dimensionName = stringElement(row, "DIMENSION_NAME"); final String dimensionUniqueName = @@ -1387,34 +1381,30 @@ public void handle( Element row, Context context, List list) throws OlapException { - /* - Example: - - - FoodMart - FoodMart - Sales - [Customers] - Customers - [Customers] - Customers - 3 - 10407 - [Customers].[All Customers] - [Customers].[All Customers] - Sales Cube - Customers Hierarchy - 0 - false - false - 0 - true - 9 - true - false - - - */ - + // Example: + // + // + // FoodMart + // FoodMart + // Sales + // [Customers] + // Customers + // [Customers] + // Customers + // 3 + // 10407 + // [Customers].[All Customers] + // [Customers].[All Customers] + // Sales Cube - Customers Hierarchy + // 0 + // false + // false + // 0 + // true + // 9 + // true + // false + // final String hierarchyUniqueName = stringElement(row, "HIERARCHY_UNIQUE_NAME"); // SAP BW doesn't return a HIERARCHY_NAME attribute, @@ -1462,30 +1452,26 @@ public void handle( Context context, List list) { - /* - Example: - - - FoodMart - FoodMart - Sales - [Customers] - [Customers] - (All) - [Customers].[(All)] - (All) - 0 - 1 - 1 - 0 - 3 - true - Sales Cube - Customers Hierarchy - (All) - Level - - - */ - + // Example: + // + // + // FoodMart + // FoodMart + // Sales + // [Customers] + // [Customers] + // (All) + // [Customers].[(All)] + // (All) + // 0 + // 1 + // 1 + // 0 + // 3 + // true + // Sales Cube - Customers Hierarchy - (All) + // Level + // final String levelUniqueName = stringElement(row, "LEVEL_UNIQUE_NAME"); // SAP BW doesn't return a HIERARCHY_NAME attribute, @@ -1527,22 +1513,21 @@ public void handle( List list) throws OlapException { - /* - Example: - - FoodMart - FoodMart - Sales - Profit - [Measures].[Profit] - Profit - 127 - 130 - true - Sales Cube - Profit Member - - - */ + // Example: + // + // + // FoodMart + // FoodMart + // Sales + // Profit + // [Measures].[Profit] + // Profit + // 127 + // 130 + // true + // Sales Cube - Profit Member + // + final String measureName = stringElement(row, "MEASURE_NAME"); final String measureUniqueName = @@ -1646,30 +1631,27 @@ public void handle( Context context, List list) { - /* - Example: - - - FoodMart - FoodMart - Sales - [Gender] - [Gender] - [Gender].[Gender] - 1 - 1 - F - [Gender].[F] - 1 - F - 0 - 0 - [Gender].[All Gender] - 1 - 1 - - - */ + // Example: + // + // + // FoodMart + // FoodMart + // Sales + // [Gender] + // [Gender] + // [Gender].[Gender] + // 1 + // 1 + // F + // [Gender].[F] + // 1 + // F + // 0 + // 0 + // [Gender].[All Gender] + // 1 + // 1 + // if (false) { int levelNumber = integerElement( @@ -1773,18 +1755,15 @@ public void handle( Context context, List list) { - /* - Example: - - - FoodMart - FoodMart - Warehouse - [Top Sellers] - 1 - - - */ + // Example: + // + // + // FoodMart + // FoodMart + // Warehouse + // [Top Sellers] + // 1 + // final String setName = stringElement(row, "SET_NAME"); list.add( @@ -1800,15 +1779,13 @@ public void handle( List list) throws OlapException { - /* - Example: - - - LOCALDB - FoodMart - dbo - - */ + // Example: + // + // + // LOCALDB + // FoodMart + // dbo + // String schemaName = stringElement(row, "SCHEMA_NAME"); list.add( new XmlaOlap4jSchema( @@ -1837,16 +1814,14 @@ public void handle( List list) throws OlapException { - /* - Example: - - - CatalogName - FoodMart - dbo - - */ - + // Example: + // + // + // CatalogName + // FoodMart + // dbo + // + // // We are looking for a schema name from the cubes query restricted // on the catalog name. Some servers don't support nor include the // SCHEMA_NAME column in its response. If it's null, we convert it @@ -1870,25 +1845,23 @@ public void handle( Element row, Context context, List list) throws OlapException { - /* - Example: - - - FoodMart - FoodMart - HR - [Store] - [Store] - [Store].[Store Name] - Store Manager - Store Manager - 1 - 130 - 0 - HR Cube - Store Hierarchy - Store - Name Level - Store Manager Property - - */ + // Example: + // + // + // FoodMart + // FoodMart + // HR + // [Store] + // [Store] + // [Store].[Store Name] + // Store Manager + // Store Manager + // 1 + // 130 + // 0 + // HR Cube - Store Hierarchy - Store + // Name Level - Store Manager Property + // String description = stringElement(row, "DESCRIPTION"); String uniqueName = stringElement(row, "DESCRIPTION"); String caption = stringElement(row, "PROPERTY_CAPTION"); diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java b/src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java index 1b19332..9c1217b 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java @@ -184,29 +184,6 @@ private static Factory createFactory() { } } - /* - - String factoryClassName; - try { - Class.forName("java.sql.Wrapper"); - factoryClassName = "org.olap4j.driver.xmla.FactoryJdbc4Impl"; - } catch (ClassNotFoundException e) { - // java.sql.Wrapper is not present. This means we are running JDBC - // 3.0 or earlier (probably JDK 1.5). Load the JDBC 3.0 factory - factoryClassName = "org.olap4j.driver.xmla.FactoryJdbc3Impl"; - } - try { - final Class clazz = Class.forName(factoryClassName); - factory = (Factory) clazz.newInstance(); - } catch (ClassNotFoundException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InstantiationException e) { - throw new RuntimeException(e); - } - */ - private static String getFactoryClassName() { try { // If java.sql.PseudoColumnUsage is present, we are running JDBC 4.1 diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jMember.java b/src/org/olap4j/driver/xmla/XmlaOlap4jMember.java index 9b92336..fa3ba01 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jMember.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jMember.java @@ -47,10 +47,7 @@ class XmlaOlap4jMember private final XmlaOlap4jLevel olap4jLevel; // TODO: We would rather have a refernce to the parent member, but it is - // tricky to populate - /* - private final XmlaOlap4jMember parentMember; - */ + // tricky to populate. private final String parentMemberUniqueName; private final Type type; private XmlaOlap4jMember parentMember; diff --git a/src/org/olap4j/impl/ConnectStringParser.java b/src/org/olap4j/impl/ConnectStringParser.java index ad3e8d7..6eea006 100644 --- a/src/org/olap4j/impl/ConnectStringParser.java +++ b/src/org/olap4j/impl/ConnectStringParser.java @@ -280,10 +280,8 @@ public String toString() { if (value == null) { sb.append("'null'"); } else { - /* - * Quote a property value if is has a semi colon in it - * 'xxx;yyy'; - */ + // Quote a property value if is has a semi colon in it + // 'xxx;yyy' if (value.indexOf(';') >= 0 && value.charAt(0) != '\'') { sb.append("'"); } diff --git a/src/org/olap4j/mdx/DefaultMdxValidatorImpl.java b/src/org/olap4j/mdx/DefaultMdxValidatorImpl.java index af41975..40c4864 100644 --- a/src/org/olap4j/mdx/DefaultMdxValidatorImpl.java +++ b/src/org/olap4j/mdx/DefaultMdxValidatorImpl.java @@ -229,10 +229,8 @@ private ParseTreeNode lookup( List segments, boolean allowProp) { - // todo: something like - /* - final Exp element = Util.lookup(select, names, true); - */ + // todo: something like this: + // final Exp element = Util.lookup(select, names, true); throw new UnsupportedOperationException(); } } diff --git a/src/org/olap4j/metadata/Datatype.java b/src/org/olap4j/metadata/Datatype.java index 3b611dd..8b95314 100644 --- a/src/org/olap4j/metadata/Datatype.java +++ b/src/org/olap4j/metadata/Datatype.java @@ -30,10 +30,9 @@ * @since Aug 23, 2006 */ public enum Datatype implements XmlaConstant { - /* - * The following values exactly match VARENUM - * in Automation and may be used in VARIANT. - */ + // The following values exactly match VARENUM + // in Automation and may be used in VARIANT. + INTEGER(3, "DBTYPE_I4", "A four-byte, signed integer: INTEGER"), DOUBLE(5, "DBTYPE_R8", "A double-precision floating-point value: Double"), @@ -67,18 +66,16 @@ public enum Datatype implements XmlaConstant { */ UNSIGNED_INTEGER(19, "DBTYPE_UI4", "A four-byte, unsigned integer"), - /* - * The following values exactly match VARENUM - * in Automation but cannot be used in VARIANT. - */ + // The following values exactly match VARENUM + // in Automation but cannot be used in VARIANT. + LARGE_INTEGER( 20, "DBTYPE_I8", "An eight-byte, signed integer: LARGE_INTEGER"), - /* - * The following values are not in VARENUM in OLE. - */ + // The following values are not in VARENUM in OLE. + STRING( 130, "DBTYPE_WSTR", diff --git a/src/org/olap4j/metadata/XmlaConstants.java b/src/org/olap4j/metadata/XmlaConstants.java index 25d5c2a..c06a0ed 100644 --- a/src/org/olap4j/metadata/XmlaConstants.java +++ b/src/org/olap4j/metadata/XmlaConstants.java @@ -470,10 +470,8 @@ public int xmlaOrdinal() { * below. */ public enum DBType implements XmlaConstant { - /* - * The following values exactly match VARENUM - * in Automation and may be used in VARIANT. - */ + // The following values exactly match VARENUM + // in Automation and may be used in VARIANT. I4( "INTEGER", 3, "DBTYPE_I4", "A four-byte, signed integer: INTEGER"), @@ -511,17 +509,13 @@ public enum DBType implements XmlaConstant { "UNSIGNED_INTEGER", 19, "DBTYPE_UI4", "A four-byte, unsigned integer"), - /* - * The following values exactly match VARENUM - * in Automation but cannot be used in VARIANT. - */ + // The following values exactly match VARENUM + // in Automation but cannot be used in VARIANT. I8( "LARGE_INTEGER", 20, "DBTYPE_I8", "An eight-byte, signed integer: LARGE_INTEGER"), - /* - * The following values are not in VARENUM in OLE. - */ + // The following values are not in VARENUM in OLE. WSTR( "STRING", 130, "DBTYPE_WSTR", "A null-terminated Unicode character string: wchar_t[length]; If " @@ -539,30 +533,8 @@ public enum DBType implements XmlaConstant { public final String userName; - /** - * The length of a non-numeric column or parameter that refers to either - * the maximum or the length defined for this type by the provider. For - * character data, this is the maximum or defined length in characters. - * For DateTime data types, this is the length of the string - * representation (assuming the maximum allowed precision of the - * fractional seconds component). - * - * If the data type is numeric, this is the upper bound on the maximum - * precision of the data type. - int columnSize; - */ - private final int xmlaOrdinal; - /* - * A Boolean that indicates whether the data type is nullable. - * VARIANT_TRUE indicates that the data type is nullable. - * VARIANT_FALSE indicates that the data type is not nullable. - * NULL-- indicates that it is not known whether the data type is - * nullable. - boolean isNullable; - */ - private String description; private static final Dictionary DICTIONARY = @@ -742,39 +714,38 @@ public enum Literal implements XmlaConstant { "A text command, such as an SQL statement."), USER_NAME(19, null, 0, null, null, null); - /* // Enum DBLITERALENUM and DBLITERALENUM20, OLEDB.H. - public static final int DBLITERAL_INVALID = 0, - DBLITERAL_BINARY_LITERAL = 1, - DBLITERAL_CATALOG_NAME = 2, - DBLITERAL_CATALOG_SEPARATOR = 3, - DBLITERAL_CHAR_LITERAL = 4, - DBLITERAL_COLUMN_ALIAS = 5, - DBLITERAL_COLUMN_NAME = 6, - DBLITERAL_CORRELATION_NAME = 7, - DBLITERAL_CURSOR_NAME = 8, - DBLITERAL_ESCAPE_PERCENT = 9, - DBLITERAL_ESCAPE_UNDERSCORE = 10, - DBLITERAL_INDEX_NAME = 11, - DBLITERAL_LIKE_PERCENT = 12, - DBLITERAL_LIKE_UNDERSCORE = 13, - DBLITERAL_PROCEDURE_NAME = 14, - DBLITERAL_QUOTE = 15, - DBLITERAL_QUOTE_PREFIX = DBLITERAL_QUOTE, - DBLITERAL_SCHEMA_NAME = 16, - DBLITERAL_TABLE_NAME = 17, - DBLITERAL_TEXT_COMMAND = 18, - DBLITERAL_USER_NAME = 19, - DBLITERAL_VIEW_NAME = 20, - DBLITERAL_CUBE_NAME = 21, - DBLITERAL_DIMENSION_NAME = 22, - DBLITERAL_HIERARCHY_NAME = 23, - DBLITERAL_LEVEL_NAME = 24, - DBLITERAL_MEMBER_NAME = 25, - DBLITERAL_PROPERTY_NAME = 26, - DBLITERAL_SCHEMA_SEPARATOR = 27, - DBLITERAL_QUOTE_SUFFIX = 28; -*/ + // + // public static final int DBLITERAL_INVALID = 0, + // DBLITERAL_BINARY_LITERAL = 1, + // DBLITERAL_CATALOG_NAME = 2, + // DBLITERAL_CATALOG_SEPARATOR = 3, + // DBLITERAL_CHAR_LITERAL = 4, + // DBLITERAL_COLUMN_ALIAS = 5, + // DBLITERAL_COLUMN_NAME = 6, + // DBLITERAL_CORRELATION_NAME = 7, + // DBLITERAL_CURSOR_NAME = 8, + // DBLITERAL_ESCAPE_PERCENT = 9, + // DBLITERAL_ESCAPE_UNDERSCORE = 10, + // DBLITERAL_INDEX_NAME = 11, + // DBLITERAL_LIKE_PERCENT = 12, + // DBLITERAL_LIKE_UNDERSCORE = 13, + // DBLITERAL_PROCEDURE_NAME = 14, + // DBLITERAL_QUOTE = 15, + // DBLITERAL_QUOTE_PREFIX = DBLITERAL_QUOTE, + // DBLITERAL_SCHEMA_NAME = 16, + // DBLITERAL_TABLE_NAME = 17, + // DBLITERAL_TEXT_COMMAND = 18, + // DBLITERAL_USER_NAME = 19, + // DBLITERAL_VIEW_NAME = 20, + // DBLITERAL_CUBE_NAME = 21, + // DBLITERAL_DIMENSION_NAME = 22, + // DBLITERAL_HIERARCHY_NAME = 23, + // DBLITERAL_LEVEL_NAME = 24, + // DBLITERAL_MEMBER_NAME = 25, + // DBLITERAL_PROPERTY_NAME = 26, + // DBLITERAL_SCHEMA_SEPARATOR = 27, + // DBLITERAL_QUOTE_SUFFIX = 28; private int xmlaOrdinal; private final String literalValue; diff --git a/src/org/olap4j/query/Olap4jNodeConverter.java b/src/org/olap4j/query/Olap4jNodeConverter.java index fc5b60c..4c4ca1a 100644 --- a/src/org/olap4j/query/Olap4jNodeConverter.java +++ b/src/org/olap4j/query/Olap4jNodeConverter.java @@ -269,8 +269,8 @@ private static void generateUnionsRecursively( } } - /* - * This method merges the selections into a single + /** + * Merges the selections into a single * MDX axis selection. Right now we do a simple * crossjoin. * It might return null if there are no dimensions placed on the axis. diff --git a/testsrc/org/olap4j/ConnectionTest.java b/testsrc/org/olap4j/ConnectionTest.java index 65514b9..2b71eab 100644 --- a/testsrc/org/olap4j/ConnectionTest.java +++ b/testsrc/org/olap4j/ConnectionTest.java @@ -1294,20 +1294,19 @@ public void testCell() throws Exception { } // todo: test CellSetAxis methods - /* - public int getAxisOrdinal() - public CellSet getCellSet() - public CellSetAxisMetaData getAxisMetaData() - public List getPositions() - public int getPositionCount() - public ListIterator iterate() - - todo: test OlapResultAxisMetaData methods - - public org.olap4j.Axis getAxisOrdinal() - public List getHierarchies() - public List getProperties() - */ + // + // public int getAxisOrdinal() + // public CellSet getCellSet() + // public CellSetAxisMetaData getAxisMetaData() + // public List getPositions() + // public int getPositionCount() + // public ListIterator iterate() + // + // todo: test OlapResultAxisMetaData methods + // + // public org.olap4j.Axis getAxisOrdinal() + // public List getHierarchies() + // public List getProperties() } /** @@ -3292,10 +3291,8 @@ public void testSchemaAccessControl() throws Exception { if (tester.getFlavor() == Flavor.XMLA || tester.getFlavor() == Flavor.REMOTE_XMLA) { - /* - * TODO Implement a way to pass an XmlaRequestCallback to - * the tested servlet so we can pass the roles down. - */ + // TODO Implement a way to pass an XmlaRequestCallback to + // the tested servlet so we can pass the roles down. return; } connection = tester.createConnection(); @@ -3322,10 +3319,8 @@ public void testCubeAccessControl() throws Exception { if (tester.getFlavor() == Flavor.XMLA || tester.getFlavor() == Flavor.REMOTE_XMLA) { - /* - * TODO Implement a way to pass an XmlaRequestCallback to - * the tested servlet so we can pass the roles down. - */ + // TODO Implement a way to pass an XmlaRequestCallback to + // the tested servlet so we can pass the roles down. return; } connection = tester.createConnection(); @@ -3364,10 +3359,8 @@ public void testDimensionAccessControl() throws Exception { if (tester.getFlavor() == Flavor.XMLA || tester.getFlavor() == Flavor.REMOTE_XMLA) { - /* - * TODO Implement a way to pass an XmlaRequestCallback to - * the tested servlet so we can pass the roles down. - */ + // TODO Implement a way to pass an XmlaRequestCallback to + // the tested servlet so we can pass the roles down. return; } connection = tester.createConnection(); @@ -3406,10 +3399,8 @@ public void testLevelAccessControl() throws Exception { if (tester.getFlavor() == Flavor.XMLA || tester.getFlavor() == Flavor.REMOTE_XMLA) { - /* - * TODO Implement a way to pass an XmlaRequestCallback to - * the tested servlet so we can pass the roles down. - */ + // TODO Implement a way to pass an XmlaRequestCallback to + // the tested servlet so we can pass the roles down. return; } connection = tester.createConnection(); @@ -3441,10 +3432,8 @@ public void testLevelMembersAccessControl() throws Exception { if (tester.getFlavor() == Flavor.XMLA || tester.getFlavor() == Flavor.REMOTE_XMLA) { - /* - * TODO Implement a way to pass an XmlaRequestCallback to - * the tested servlet so we can pass the roles down. - */ + // TODO Implement a way to pass an XmlaRequestCallback to + // the tested servlet so we can pass the roles down. return; } connection = tester.createConnection(); @@ -3509,10 +3498,8 @@ public void testParentChildAccessControl() throws Exception { if (tester.getFlavor() == Flavor.XMLA || tester.getFlavor() == Flavor.REMOTE_XMLA) { - /* - * TODO Implement a way to pass an XmlaRequestCallback to - * the tested servlet so we can pass the roles down. - */ + // TODO Implement a way to pass an XmlaRequestCallback to + // the tested servlet so we can pass the roles down. return; } connection = tester.createConnection();