From 191b83aeb3902a2cd538e8ead882abf5a3aff58f Mon Sep 17 00:00:00 2001 From: Julian Hyde Date: Mon, 24 Oct 2011 17:54:40 +0000 Subject: [PATCH] Optimize & normalize imports. git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@476 c6a108a4-781c-0410-a6c6-c2d559e19af0 --- checkFile.awk | 68 ++++++++++++++++++- src/org/olap4j/Cell.java | 4 +- src/org/olap4j/CellSet.java | 4 +- src/org/olap4j/OlapConnection.java | 6 +- src/org/olap4j/OlapDataSource.java | 4 +- src/org/olap4j/OlapDatabaseMetaData.java | 2 +- src/org/olap4j/OlapStatement.java | 6 +- .../olap4j/driver/xmla/EmptyResultSet.java | 10 +-- src/org/olap4j/driver/xmla/Factory.java | 4 +- .../olap4j/driver/xmla/FactoryJdbc4Impl.java | 12 ++-- src/org/olap4j/driver/xmla/XmlaHelper.java | 6 +- .../olap4j/driver/xmla/XmlaOlap4jCatalog.java | 4 +- .../olap4j/driver/xmla/XmlaOlap4jCell.java | 5 +- .../olap4j/driver/xmla/XmlaOlap4jCellSet.java | 8 ++- .../driver/xmla/XmlaOlap4jCellSetAxis.java | 5 +- .../xmla/XmlaOlap4jCellSetAxisMetaData.java | 4 +- .../driver/xmla/XmlaOlap4jConnection.java | 16 +++-- .../olap4j/driver/xmla/XmlaOlap4jCube.java | 4 +- .../driver/xmla/XmlaOlap4jDatabase.java | 10 ++- .../xmla/XmlaOlap4jDatabaseMetaData.java | 6 +- .../driver/xmla/XmlaOlap4jDimension.java | 5 +- .../olap4j/driver/xmla/XmlaOlap4jDriver.java | 3 +- .../olap4j/driver/xmla/XmlaOlap4jLevel.java | 5 +- .../driver/xmla/XmlaOlap4jPositionMember.java | 6 +- .../olap4j/driver/xmla/XmlaOlap4jSchema.java | 3 +- .../driver/xmla/XmlaOlap4jStatement.java | 2 +- .../olap4j/driver/xmla/XmlaOlap4jUtil.java | 5 +- .../driver/xmla/cache/XmlaOlap4jCache.java | 6 +- .../XmlaOlap4jConcurrentMemoryCache.java | 11 +-- .../cache/XmlaOlap4jNamedMemoryCache.java | 9 +-- .../proxy/XmlaOlap4jAbstractHttpProxy.java | 10 ++- .../xmla/proxy/XmlaOlap4jCachedProxy.java | 6 +- .../xmla/proxy/XmlaOlap4jCookieManager.java | 8 ++- .../xmla/proxy/XmlaOlap4jHttpProxy.java | 8 +-- .../driver/xmla/proxy/XmlaOlap4jProxy.java | 4 +- src/org/olap4j/impl/IdentifierParser.java | 5 +- src/org/olap4j/impl/UnmodifiableArrayMap.java | 5 +- src/org/olap4j/layout/CellSetFormatter.java | 3 +- .../layout/RectangularCellSetFormatter.java | 4 +- .../layout/TraditionalCellSetFormatter.java | 4 +- src/org/olap4j/mdx/AxisNode.java | 10 +-- src/org/olap4j/mdx/CallNode.java | 8 +-- .../olap4j/mdx/DefaultMdxValidatorImpl.java | 12 ++-- src/org/olap4j/mdx/DimensionNode.java | 4 +- src/org/olap4j/mdx/HierarchyNode.java | 4 +- src/org/olap4j/mdx/IdentifierNode.java | 8 +-- src/org/olap4j/mdx/LevelNode.java | 4 +- src/org/olap4j/mdx/MdxUtil.java | 7 +- src/org/olap4j/mdx/MemberNode.java | 6 +- src/org/olap4j/mdx/ParseRegion.java | 4 +- src/org/olap4j/mdx/SelectNode.java | 4 +- src/org/olap4j/mdx/WithMemberNode.java | 4 +- src/org/olap4j/mdx/parser/MdxParser.java | 4 +- .../mdx/parser/impl/DefaultMdxParserImpl.java | 6 +- src/org/olap4j/mdx/parser/impl/Scanner.java | 13 ++-- src/org/olap4j/metadata/Catalog.java | 6 +- src/org/olap4j/metadata/Database.java | 6 +- src/org/olap4j/metadata/Level.java | 4 +- src/org/olap4j/metadata/Member.java | 6 +- src/org/olap4j/metadata/Property.java | 5 +- src/org/olap4j/metadata/Schema.java | 8 +-- src/org/olap4j/metadata/XmlaConstant.java | 5 +- src/org/olap4j/query/AbstractSelection.java | 4 +- src/org/olap4j/query/LevelSelectionImpl.java | 4 +- src/org/olap4j/query/MemberSelectionImpl.java | 4 +- src/org/olap4j/query/Olap4jNodeConverter.java | 22 +----- src/org/olap4j/query/Query.java | 4 +- src/org/olap4j/query/QueryAxis.java | 7 +- src/org/olap4j/query/QueryDimension.java | 8 +-- src/org/olap4j/query/QueryNodeImpl.java | 6 +- src/org/olap4j/query/Selection.java | 4 +- src/org/olap4j/sample/PaloConnection.java | 17 +++-- src/org/olap4j/sample/SimpleQuerySample.java | 6 +- src/org/olap4j/transform/AxisTransform.java | 6 +- .../DrillDownOnPositionTransform.java | 27 ++------ src/org/olap4j/transform/MdxHelper.java | 11 ++- src/org/olap4j/transform/TransformUtil.java | 11 ++- src/org/olap4j/type/CubeType.java | 7 +- src/org/olap4j/type/DimensionType.java | 6 +- src/org/olap4j/type/HierarchyType.java | 6 +- src/org/olap4j/type/LevelType.java | 4 +- src/org/olap4j/type/MemberType.java | 5 +- src/org/olap4j/type/NumericType.java | 5 +- src/org/olap4j/type/ScalarType.java | 6 +- src/org/olap4j/type/SetType.java | 6 +- src/org/olap4j/type/TupleType.java | 6 +- src/org/olap4j/type/Type.java | 6 +- src/org/olap4j/type/TypeUtil.java | 2 +- testsrc/org/olap4j/CellSetFormatterTest.java | 16 ++--- testsrc/org/olap4j/ConnectionTest.java | 11 +-- testsrc/org/olap4j/MetadataTest.java | 6 +- testsrc/org/olap4j/OlapTest.java | 5 +- testsrc/org/olap4j/OlapTreeTest.java | 17 ++--- testsrc/org/olap4j/RemoteXmlaTester.java | 8 +-- testsrc/org/olap4j/XmlaConnectionTest.java | 20 +++--- testsrc/org/olap4j/XmlaTester.java | 6 +- .../driver/xmla/cache/XmlaDatabaseCache.java | 7 +- .../driver/xmla/cache/XmlaShaEncoderTest.java | 4 +- .../xmla/proxy/XmlaCachedProxyTest.java | 10 +-- .../xmla/proxy/XmlaCookieManagerTest.java | 21 ++++-- testsrc/org/olap4j/impl/Base64Test.java | 11 ++- .../olap4j/impl/ConnectStringParserTest.java | 4 +- testsrc/org/olap4j/impl/Olap4jUtilTest.java | 3 +- testsrc/org/olap4j/mdx/MdxTest.java | 10 +-- testsrc/org/olap4j/test/ArrayMapTest.java | 5 +- testsrc/org/olap4j/test/ParserTest.java | 17 ++--- testsrc/org/olap4j/test/TestContext.java | 23 ++++--- .../org/olap4j/transform/TransformTest.java | 11 ++- 108 files changed, 423 insertions(+), 430 deletions(-) diff --git a/checkFile.awk b/checkFile.awk index bb21bd9..a25e3fd 100644 --- a/checkFile.awk +++ b/checkFile.awk @@ -79,6 +79,11 @@ function countLeadingSpaces(str) { return i; } +function startsWith(s, p) { + return length(s) > length(p) \ + && substr(s, 1, length(p)) == p; +} + BEGIN { # pre-compute regexp for quotes, linefeed apos = sprintf("%c", 39); @@ -96,6 +101,8 @@ FNR == 1 { isCpp = _isCpp(fname); isJava = _isJava(fname); mondrian = _isMondrian(fname); + prevImport = ""; + prevImportGroup = ""; } { if (previousLineEndedInCloseBrace > 0) { @@ -186,6 +193,63 @@ FNR == 1 { } } +/^package / { + thisPackage = $2; +} +/^package / && previousLineWasEmpty { + error(fname, FNR, "'package' declaration must not occur after empty line"); +} +/^import / { + if (previousLineWasEmpty) { + prevImport = ""; + } else { + if (!prevImport) { + error(fname, FNR, "Expected blank line before first import"); + } + } + thisImport = $2; + gsub(/;/, "", thisImport); + gsub(/\*/, "", thisImport); + importGroup = "zzzzzzzzzzzzzzzzz"; + if (thisPackage ~ /^mondrian.*/ && thisImport ~ /^mondrian.*/ \ + || thisPackage ~ /^org.olap4j.*/ && thisImport ~ /^org.olap4j.*/) + { + importGroup = "a"; + } else if (thisImport ~ /^static/) { + importGroup = "z"; + } else if (thisImport ~ /^java.*/) { + importGroup = "y"; + } else if (thisImport ~ /^junit.*/) { + importGroup = "b"; + } else if (thisImport ~ /^mondrian.*/) { + importGroup = "bb"; + } else if (thisImport ~ /^org.apache.*/) { + importGroup = "c"; + } else if (thisImport ~ /^org.eigenbase.*/) { + importGroup = "d"; + } else if (thisImport ~ /^org.olap4j.*/) { + importGroup = "e"; + } else { + importGroup = "f"; + } + if (importGroup != prevImportGroup \ + && prevImportGroup) + { + if (!previousLineWasEmpty) { + error(fname, FNR, "Expected blank line between import groups"); + } else if (prevImportGroup > importGroup) { + error(fname, FNR, "Import group out of sequence" importGroup prevImportGroup); + } + } else if (prevImport \ + && prevImport > thisImport \ + && !startsWith(prevImport, thisImport) \ + && !startsWith(thisImport, prevImport)) + { + error(fname, FNR, "Import out of sorted order"); + } + prevImport = thisImport; + prevImportGroup = importGroup; +} /^$/ { if (matchFile && previousLineEndedInOpenBrace) { error(fname, FNR, "Empty line following open brace"); @@ -521,10 +585,10 @@ s ~ /{/ { else if (s ~ /(\]\)?|=) *{/) {} # ignore e.g. "(int[]) {1, 2}" or "int[] x = {1, 2}" else if (s ~ /\({/) {} # ignore e.g. @SuppressWarnings({"unchecked"}) else if (s ~ /{ *(\/\/|\/\*)/) {} # ignore e.g. "do { // a comment" - else if (s ~ / {}$/) {} # ignore e.g. "Constructor() {}" + else if (s ~ / \{\}$/) {} # ignore e.g. "Constructor() {}" else if (s ~ / },$/) {} # ignore e.g. "{ yada }," else if (s ~ / };$/) {} # ignore e.g. "{ yada };" - else if (s ~ / {};$/) {} # ignore e.g. "template <> class Foo {};" + else if (s ~ / \{\};$/) {} # ignore e.g. "template <> class Foo {};" else if (s ~ / },? *\/\/.*$/) {} # ignore e.g. "{ yada }, // comment" else if (s ~ /\\$/) {} # ignore multiline macros else if (s ~ /{}/) { # e.g. "Constructor(){}" diff --git a/src/org/olap4j/Cell.java b/src/org/olap4j/Cell.java index 020f198..24b7b41 100755 --- a/src/org/olap4j/Cell.java +++ b/src/org/olap4j/Cell.java @@ -3,7 +3,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -11,8 +11,8 @@ import org.olap4j.metadata.Property; -import java.util.List; import java.sql.ResultSet; +import java.util.List; /** * Cell returned from a {@link CellSet}. diff --git a/src/org/olap4j/CellSet.java b/src/org/olap4j/CellSet.java index 8d77929..c11fc6e 100755 --- a/src/org/olap4j/CellSet.java +++ b/src/org/olap4j/CellSet.java @@ -3,15 +3,15 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j; +import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; -import java.sql.ResultSet; /** * Result of executing an OLAP Statement. diff --git a/src/org/olap4j/OlapConnection.java b/src/org/olap4j/OlapConnection.java index b7c547d..6db96a2 100644 --- a/src/org/olap4j/OlapConnection.java +++ b/src/org/olap4j/OlapConnection.java @@ -3,7 +3,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -12,9 +12,7 @@ import org.olap4j.mdx.parser.MdxParserFactory; import org.olap4j.metadata.*; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.DriverManager; +import java.sql.*; import java.util.List; import java.util.Locale; diff --git a/src/org/olap4j/OlapDataSource.java b/src/org/olap4j/OlapDataSource.java index 8c7a52f..6813896 100644 --- a/src/org/olap4j/OlapDataSource.java +++ b/src/org/olap4j/OlapDataSource.java @@ -2,14 +2,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2008-2010 Julian Hyde +// Copyright (C) 2008-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j; -import javax.sql.DataSource; import java.sql.SQLException; +import javax.sql.DataSource; /** *

A factory for connections to the physical OLAP data source that this diff --git a/src/org/olap4j/OlapDatabaseMetaData.java b/src/org/olap4j/OlapDatabaseMetaData.java index 046a026..6f94361 100644 --- a/src/org/olap4j/OlapDatabaseMetaData.java +++ b/src/org/olap4j/OlapDatabaseMetaData.java @@ -9,7 +9,7 @@ */ package org.olap4j; -import org.olap4j.metadata.*; +import org.olap4j.metadata.Member; import java.sql.*; import java.util.Set; diff --git a/src/org/olap4j/OlapStatement.java b/src/org/olap4j/OlapStatement.java index c37095a..bc483d7 100644 --- a/src/org/olap4j/OlapStatement.java +++ b/src/org/olap4j/OlapStatement.java @@ -3,17 +3,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j; +import org.olap4j.mdx.SelectNode; + import java.sql.SQLException; import java.sql.Statement; -import org.olap4j.mdx.SelectNode; - /** * Object used for statically executing an MDX statement and returning a * {@link CellSet}. diff --git a/src/org/olap4j/driver/xmla/EmptyResultSet.java b/src/org/olap4j/driver/xmla/EmptyResultSet.java index f23fc14..a746079 100644 --- a/src/org/olap4j/driver/xmla/EmptyResultSet.java +++ b/src/org/olap4j/driver/xmla/EmptyResultSet.java @@ -10,14 +10,14 @@ import org.olap4j.OlapWrapper; -import javax.sql.rowset.RowSetMetaDataImpl; -import java.sql.*; -import java.sql.Date; -import java.math.BigDecimal; import java.io.InputStream; import java.io.Reader; -import java.util.*; +import java.math.BigDecimal; import java.net.URL; +import java.sql.*; +import java.sql.Date; +import java.util.*; +import javax.sql.rowset.RowSetMetaDataImpl; /** * Implementation of {@link ResultSet} which returns 0 rows. diff --git a/src/org/olap4j/driver/xmla/Factory.java b/src/org/olap4j/driver/xmla/Factory.java index 351f24a..afe7016 100644 --- a/src/org/olap4j/driver/xmla/Factory.java +++ b/src/org/olap4j/driver/xmla/Factory.java @@ -2,7 +2,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -12,8 +12,8 @@ import org.olap4j.driver.xmla.proxy.XmlaOlap4jProxy; import java.sql.*; -import java.util.Properties; import java.util.List; +import java.util.Properties; /** * Instantiates classes to implement the olap4j API against the diff --git a/src/org/olap4j/driver/xmla/FactoryJdbc4Impl.java b/src/org/olap4j/driver/xmla/FactoryJdbc4Impl.java index 69087c0..742a1b8 100644 --- a/src/org/olap4j/driver/xmla/FactoryJdbc4Impl.java +++ b/src/org/olap4j/driver/xmla/FactoryJdbc4Impl.java @@ -2,20 +2,20 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.driver.xmla; -import java.sql.*; -import java.util.*; -import java.io.Reader; -import java.io.InputStream; - import org.olap4j.*; import org.olap4j.driver.xmla.proxy.XmlaOlap4jProxy; +import java.io.InputStream; +import java.io.Reader; +import java.sql.*; +import java.util.*; + /** * Implementation of {@link Factory} for JDBC 4.0. * diff --git a/src/org/olap4j/driver/xmla/XmlaHelper.java b/src/org/olap4j/driver/xmla/XmlaHelper.java index a9367f7..50dbac1 100644 --- a/src/org/olap4j/driver/xmla/XmlaHelper.java +++ b/src/org/olap4j/driver/xmla/XmlaHelper.java @@ -2,14 +2,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.driver.xmla; -import org.olap4j.OlapException; import org.olap4j.Cell; +import org.olap4j.OlapException; import java.sql.SQLException; @@ -58,4 +58,4 @@ public OlapException toOlapException(SQLException e) { } } -// End XmlaHelper.java \ No newline at end of file +// End XmlaHelper.java diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java b/src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java index 8568cd9..8e80a5d 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java @@ -9,14 +9,14 @@ */ package org.olap4j.driver.xmla; -import java.sql.SQLException; - import org.olap4j.OlapDatabaseMetaData; import org.olap4j.OlapException; import org.olap4j.impl.Named; import org.olap4j.impl.Olap4jUtil; import org.olap4j.metadata.*; +import java.sql.SQLException; + /** * Implementation of {@link org.olap4j.metadata.Catalog} * for XML/A providers. diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jCell.java b/src/org/olap4j/driver/xmla/XmlaOlap4jCell.java index 53e34c2..7f3cd65 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jCell.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jCell.java @@ -2,7 +2,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -13,7 +13,8 @@ import org.olap4j.metadata.Property; import java.sql.ResultSet; -import java.util.*; +import java.util.List; +import java.util.Map; /** * Implementation of {@link org.olap4j.Cell} diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java b/src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java index ec02662..e9c6e29 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java @@ -9,12 +9,12 @@ package org.olap4j.driver.xmla; import org.olap4j.*; -import org.olap4j.mdx.ParseTreeNode; import org.olap4j.impl.Olap4jUtil; -import static org.olap4j.driver.xmla.XmlaOlap4jUtil.*; +import org.olap4j.mdx.ParseTreeNode; import org.olap4j.metadata.*; -import org.w3c.dom.*; +import org.w3c.dom.Document; +import org.w3c.dom.Element; import org.xml.sax.SAXException; import java.io.*; @@ -24,6 +24,8 @@ import java.sql.Date; import java.util.*; +import static org.olap4j.driver.xmla.XmlaOlap4jUtil.*; + /** * Implementation of {@link org.olap4j.CellSet} * for XML/A providers. diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jCellSetAxis.java b/src/org/olap4j/driver/xmla/XmlaOlap4jCellSetAxis.java index 81dec97..1d03656 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jCellSetAxis.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jCellSetAxis.java @@ -2,7 +2,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -10,7 +10,8 @@ import org.olap4j.*; -import java.util.*; +import java.util.List; +import java.util.ListIterator; /** * Implementation of {@link org.olap4j.CellSetAxis} diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jCellSetAxisMetaData.java b/src/org/olap4j/driver/xmla/XmlaOlap4jCellSetAxisMetaData.java index 97b2dbc..b724fc0 100755 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jCellSetAxisMetaData.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jCellSetAxisMetaData.java @@ -2,7 +2,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -14,7 +14,7 @@ import org.olap4j.metadata.Hierarchy; import org.olap4j.metadata.Property; -import java.util.*; +import java.util.List; /** * Implementation of {@link org.olap4j.CellSetMetaData} diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java b/src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java index fcd8d68..994afd0 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java @@ -9,9 +9,6 @@ package org.olap4j.driver.xmla; import org.olap4j.*; - -import static org.olap4j.driver.xmla.XmlaOlap4jUtil.*; - import org.olap4j.driver.xmla.proxy.*; import org.olap4j.impl.*; import org.olap4j.mdx.ParseTreeWriter; @@ -21,15 +18,20 @@ import org.olap4j.metadata.*; import org.olap4j.metadata.Database.AuthenticationMode; import org.olap4j.metadata.Database.ProviderType; + import org.w3c.dom.*; import org.xml.sax.SAXException; -import java.io.*; -import java.net.*; +import java.io.IOException; +import java.io.StringWriter; +import java.net.MalformedURLException; +import java.net.URL; import java.sql.*; import java.util.*; -import java.util.Map.*; -import java.util.regex.*; +import java.util.Map.Entry; +import java.util.regex.Pattern; + +import static org.olap4j.driver.xmla.XmlaOlap4jUtil.*; /** * Implementation of {@link org.olap4j.OlapConnection} diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jCube.java b/src/org/olap4j/driver/xmla/XmlaOlap4jCube.java index 5e7ab80..fbc82c1 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jCube.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jCube.java @@ -10,11 +10,11 @@ import org.olap4j.OlapException; import org.olap4j.impl.*; -import org.olap4j.mdx.*; +import org.olap4j.mdx.IdentifierSegment; import org.olap4j.metadata.*; -import java.util.*; import java.lang.ref.SoftReference; +import java.util.*; /** * Implementation of {@link Cube} diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jDatabase.java b/src/org/olap4j/driver/xmla/XmlaOlap4jDatabase.java index c18b590..524c0bf 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jDatabase.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jDatabase.java @@ -8,16 +8,14 @@ */ package org.olap4j.driver.xmla; -import java.util.Collections; -import java.util.List; - import org.olap4j.OlapConnection; import org.olap4j.OlapException; import org.olap4j.impl.Named; import org.olap4j.impl.Olap4jUtil; -import org.olap4j.metadata.Catalog; -import org.olap4j.metadata.Database; -import org.olap4j.metadata.NamedList; +import org.olap4j.metadata.*; + +import java.util.Collections; +import java.util.List; /** * XMLA implementation of a database metadata object. diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jDatabaseMetaData.java b/src/org/olap4j/driver/xmla/XmlaOlap4jDatabaseMetaData.java index 16ff032..2b6d05f 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jDatabaseMetaData.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jDatabaseMetaData.java @@ -9,8 +9,10 @@ package org.olap4j.driver.xmla; import org.olap4j.*; -import org.olap4j.impl.*; -import org.olap4j.metadata.*; +import org.olap4j.impl.Olap4jUtil; +import org.olap4j.metadata.Member; +import org.olap4j.metadata.XmlaConstants; + import org.w3c.dom.Element; import java.sql.ResultSet; diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jDimension.java b/src/org/olap4j/driver/xmla/XmlaOlap4jDimension.java index 97beed7..36c77d4 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jDimension.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jDimension.java @@ -2,14 +2,15 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.driver.xmla; import org.olap4j.OlapException; -import org.olap4j.impl.*; +import org.olap4j.impl.Named; +import org.olap4j.impl.Olap4jUtil; import org.olap4j.metadata.*; /** diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java b/src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java index d24b8f3..e383cb7 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jDriver.java @@ -9,7 +9,8 @@ */ package org.olap4j.driver.xmla; -import org.olap4j.driver.xmla.proxy.*; +import org.olap4j.driver.xmla.proxy.XmlaOlap4jHttpProxy; +import org.olap4j.driver.xmla.proxy.XmlaOlap4jProxy; import org.olap4j.impl.Olap4jUtil; import java.sql.*; diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jLevel.java b/src/org/olap4j/driver/xmla/XmlaOlap4jLevel.java index b1ea586..9ec1b28 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jLevel.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jLevel.java @@ -2,7 +2,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -12,7 +12,8 @@ import org.olap4j.impl.*; import org.olap4j.metadata.*; -import java.util.*; +import java.util.Arrays; +import java.util.List; /** * Implementation of {@link org.olap4j.metadata.Level} diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jPositionMember.java b/src/org/olap4j/driver/xmla/XmlaOlap4jPositionMember.java index 02e4a6b..b257281 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jPositionMember.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jPositionMember.java @@ -2,16 +2,16 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.driver.xmla; +import org.olap4j.OlapException; import org.olap4j.impl.ArrayMap; -import org.olap4j.metadata.*; import org.olap4j.mdx.ParseTreeNode; -import org.olap4j.OlapException; +import org.olap4j.metadata.*; import java.util.*; diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jSchema.java b/src/org/olap4j/driver/xmla/XmlaOlap4jSchema.java index 689d90f..9eff658 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jSchema.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jSchema.java @@ -9,7 +9,8 @@ package org.olap4j.driver.xmla; import org.olap4j.OlapException; -import org.olap4j.impl.*; +import org.olap4j.impl.Named; +import org.olap4j.impl.Olap4jUtil; import org.olap4j.metadata.*; import java.util.*; diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jStatement.java b/src/org/olap4j/driver/xmla/XmlaOlap4jStatement.java index e8b9604..e8c236c 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jStatement.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jStatement.java @@ -11,8 +11,8 @@ import org.olap4j.*; import org.olap4j.mdx.*; +import java.io.StringWriter; import java.sql.*; -import java.io.*; import java.util.concurrent.*; /** diff --git a/src/org/olap4j/driver/xmla/XmlaOlap4jUtil.java b/src/org/olap4j/driver/xmla/XmlaOlap4jUtil.java index d2101ee..2ae7cef 100644 --- a/src/org/olap4j/driver/xmla/XmlaOlap4jUtil.java +++ b/src/org/olap4j/driver/xmla/XmlaOlap4jUtil.java @@ -2,18 +2,19 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.driver.xmla; -import org.xml.sax.*; import org.apache.xerces.impl.Constants; import org.apache.xerces.parsers.DOMParser; import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.XMLSerializer; + import org.w3c.dom.*; +import org.xml.sax.*; import java.io.*; import java.util.*; diff --git a/src/org/olap4j/driver/xmla/cache/XmlaOlap4jCache.java b/src/org/olap4j/driver/xmla/cache/XmlaOlap4jCache.java index b1e32ea..25fdc53 100644 --- a/src/org/olap4j/driver/xmla/cache/XmlaOlap4jCache.java +++ b/src/org/olap4j/driver/xmla/cache/XmlaOlap4jCache.java @@ -3,17 +3,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2008-2010 Julian Hyde +// Copyright (C) 2008-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.driver.xmla.cache; +import org.olap4j.OlapException; + import java.net.URL; import java.util.Map; -import org.olap4j.OlapException; - /** * XMLA driver cache. Implementations will have to declare those methods. * diff --git a/src/org/olap4j/driver/xmla/cache/XmlaOlap4jConcurrentMemoryCache.java b/src/org/olap4j/driver/xmla/cache/XmlaOlap4jConcurrentMemoryCache.java index c45a57c..1713aab 100644 --- a/src/org/olap4j/driver/xmla/cache/XmlaOlap4jConcurrentMemoryCache.java +++ b/src/org/olap4j/driver/xmla/cache/XmlaOlap4jConcurrentMemoryCache.java @@ -9,15 +9,16 @@ */ package org.olap4j.driver.xmla.cache; -import java.net.*; -import java.util.*; -import java.util.Map.*; -import java.util.concurrent.*; - import org.olap4j.driver.xmla.cache.XmlaOlap4jNamedMemoryCache.Mode; import org.olap4j.driver.xmla.cache.XmlaOlap4jNamedMemoryCache.Property; import org.olap4j.impl.Olap4jUtil; +import java.net.URL; +import java.util.Calendar; +import java.util.Map; +import java.util.Map.Entry; +import java.util.concurrent.ConcurrentHashMap; + /** * Thread-safe cache object which supports concurrent access. * diff --git a/src/org/olap4j/driver/xmla/cache/XmlaOlap4jNamedMemoryCache.java b/src/org/olap4j/driver/xmla/cache/XmlaOlap4jNamedMemoryCache.java index 1f28aa0..af8108e 100644 --- a/src/org/olap4j/driver/xmla/cache/XmlaOlap4jNamedMemoryCache.java +++ b/src/org/olap4j/driver/xmla/cache/XmlaOlap4jNamedMemoryCache.java @@ -9,12 +9,13 @@ */ package org.olap4j.driver.xmla.cache; -import java.net.*; -import java.util.*; -import java.util.concurrent.*; - import org.olap4j.impl.Olap4jUtil; +import java.net.URL; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; + /** *

Implementation of the XMLA SOAP cache that places its cache entries * in memory for later use. It is thread safe and at static class level. diff --git a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jAbstractHttpProxy.java b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jAbstractHttpProxy.java index 9c5b910..a0ad78b 100644 --- a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jAbstractHttpProxy.java +++ b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jAbstractHttpProxy.java @@ -9,17 +9,15 @@ */ package org.olap4j.driver.xmla.proxy; +import org.olap4j.OlapException; +import org.olap4j.driver.xmla.*; +import org.olap4j.driver.xmla.cache.XmlaOlap4jCache; + import java.net.URL; import java.net.URLConnection; import java.util.Map; import java.util.concurrent.Future; -import org.olap4j.OlapException; -import org.olap4j.driver.xmla.XmlaHelper; -import org.olap4j.driver.xmla.XmlaOlap4jDriver; -import org.olap4j.driver.xmla.XmlaOlap4jServerInfos; -import org.olap4j.driver.xmla.cache.XmlaOlap4jCache; - /** *

Abstract implementation of Proxy which adds a SOAP * cache layer between the driver and its proxy implementations. diff --git a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCachedProxy.java b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCachedProxy.java index fb5d753..3a1c33f 100644 --- a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCachedProxy.java +++ b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCachedProxy.java @@ -3,17 +3,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.driver.xmla.proxy; -import java.util.Map; - import org.olap4j.OlapException; import org.olap4j.driver.xmla.cache.XmlaOlap4jCache; +import java.util.Map; + /** * * Extended Proxy interface which supports cached SOAP calls. diff --git a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCookieManager.java b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCookieManager.java index 83ab2ee..86b5e13 100644 --- a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCookieManager.java +++ b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCookieManager.java @@ -9,10 +9,12 @@ */ package org.olap4j.driver.xmla.proxy; -import java.net.*; -import java.text.*; +import java.net.URL; +import java.net.URLConnection; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.util.*; -import java.util.concurrent.*; +import java.util.concurrent.ConcurrentHashMap; /** *

CookieManager is a simple utility for handling cookies when working diff --git a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jHttpProxy.java b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jHttpProxy.java index 7f42ca4..2ae641a 100644 --- a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jHttpProxy.java +++ b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jHttpProxy.java @@ -9,14 +9,14 @@ */ package org.olap4j.driver.xmla.proxy; -import java.io.*; -import java.net.*; -import java.util.concurrent.*; - import org.olap4j.driver.xmla.XmlaOlap4jDriver; import org.olap4j.driver.xmla.XmlaOlap4jServerInfos; import org.olap4j.impl.Base64; +import java.io.*; +import java.net.*; +import java.util.concurrent.Future; + /** * Extends the AbstractCachedProxy and serves as * a production ready http communication class. Every SOAP request diff --git a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jProxy.java b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jProxy.java index 561cc58..e7d38fc 100644 --- a/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jProxy.java +++ b/src/org/olap4j/driver/xmla/proxy/XmlaOlap4jProxy.java @@ -9,10 +9,10 @@ */ package org.olap4j.driver.xmla.proxy; -import java.util.concurrent.Future; - import org.olap4j.driver.xmla.XmlaOlap4jServerInfos; +import java.util.concurrent.Future; + /** * Defines a common set of methods for proxy objects. * @version $Id$ diff --git a/src/org/olap4j/impl/IdentifierParser.java b/src/org/olap4j/impl/IdentifierParser.java index ceed7dd..69a23d7 100644 --- a/src/org/olap4j/impl/IdentifierParser.java +++ b/src/org/olap4j/impl/IdentifierParser.java @@ -2,7 +2,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2010-2010 Julian Hyde +// Copyright (C) 2010-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -10,7 +10,8 @@ import org.olap4j.mdx.*; -import java.util.*; +import java.util.ArrayList; +import java.util.List; /** * Utilities for parsing fully-qualified member names, tuples, member lists, diff --git a/src/org/olap4j/impl/UnmodifiableArrayMap.java b/src/org/olap4j/impl/UnmodifiableArrayMap.java index a85d6a1..f85e271 100644 --- a/src/org/olap4j/impl/UnmodifiableArrayMap.java +++ b/src/org/olap4j/impl/UnmodifiableArrayMap.java @@ -3,13 +3,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2010-2010 Julian Hyde +// Copyright (C) 2010-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.impl; -import java.util.*; +import java.util.Collections; +import java.util.Map; /** * Unmodifiable map backed by an array. diff --git a/src/org/olap4j/layout/CellSetFormatter.java b/src/org/olap4j/layout/CellSetFormatter.java index 67ef827..3681901 100644 --- a/src/org/olap4j/layout/CellSetFormatter.java +++ b/src/org/olap4j/layout/CellSetFormatter.java @@ -3,13 +3,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2009-2010 Julian Hyde +// Copyright (C) 2009-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.layout; import org.olap4j.CellSet; + import java.io.PrintWriter; /** diff --git a/src/org/olap4j/layout/RectangularCellSetFormatter.java b/src/org/olap4j/layout/RectangularCellSetFormatter.java index 1a48345..252cf8e 100644 --- a/src/org/olap4j/layout/RectangularCellSetFormatter.java +++ b/src/org/olap4j/layout/RectangularCellSetFormatter.java @@ -3,16 +3,16 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2009-2010 Julian Hyde +// Copyright (C) 2009-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.layout; import org.olap4j.*; -import org.olap4j.metadata.Member; import org.olap4j.impl.CoordinateIterator; import org.olap4j.impl.Olap4jUtil; +import org.olap4j.metadata.Member; import java.io.PrintWriter; import java.util.*; diff --git a/src/org/olap4j/layout/TraditionalCellSetFormatter.java b/src/org/olap4j/layout/TraditionalCellSetFormatter.java index 2722bb1..e6d06fa 100644 --- a/src/org/olap4j/layout/TraditionalCellSetFormatter.java +++ b/src/org/olap4j/layout/TraditionalCellSetFormatter.java @@ -3,7 +3,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2009-2010 Julian Hyde +// Copyright (C) 2009-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -13,8 +13,8 @@ import org.olap4j.metadata.Member; import java.io.PrintWriter; -import java.util.List; import java.util.ArrayList; +import java.util.List; /** * Formatter that can convert a {@link CellSet} into Mondrian's traditional diff --git a/src/org/olap4j/mdx/AxisNode.java b/src/org/olap4j/mdx/AxisNode.java index d2dc5c3..8f0a262 100644 --- a/src/org/olap4j/mdx/AxisNode.java +++ b/src/org/olap4j/mdx/AxisNode.java @@ -3,19 +3,19 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; -import java.io.PrintWriter; -import java.util.List; -import java.util.Collections; - import org.olap4j.Axis; import org.olap4j.type.Type; +import java.io.PrintWriter; +import java.util.Collections; +import java.util.List; + /** * An axis in an MDX query. For example, the typical MDX query has two axes, * which appear as the "ON COLUMNS" and "ON ROWS" clauses. diff --git a/src/org/olap4j/mdx/CallNode.java b/src/org/olap4j/mdx/CallNode.java index 8538def..f0f6e2a 100644 --- a/src/org/olap4j/mdx/CallNode.java +++ b/src/org/olap4j/mdx/CallNode.java @@ -3,17 +3,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; -import java.util.List; -import java.util.Arrays; - import org.olap4j.type.Type; +import java.util.Arrays; +import java.util.List; + /** * A parse tree node representing a call to a function or operator. * diff --git a/src/org/olap4j/mdx/DefaultMdxValidatorImpl.java b/src/org/olap4j/mdx/DefaultMdxValidatorImpl.java index dcc0329..1d6cb4b 100644 --- a/src/org/olap4j/mdx/DefaultMdxValidatorImpl.java +++ b/src/org/olap4j/mdx/DefaultMdxValidatorImpl.java @@ -3,20 +3,20 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; +import org.olap4j.OlapException; +import org.olap4j.mdx.parser.MdxValidator; +import org.olap4j.type.Type; +import org.olap4j.type.TypeUtil; + import java.util.List; import java.util.Stack; -import org.olap4j.type.TypeUtil; -import org.olap4j.type.Type; -import org.olap4j.mdx.parser.MdxValidator; -import org.olap4j.OlapException; - /** * Visitor which passes over a tree of MDX nodes, checks that they are valid, * and assigns a type to each. diff --git a/src/org/olap4j/mdx/DimensionNode.java b/src/org/olap4j/mdx/DimensionNode.java index 76a6b7a..1ef62df 100644 --- a/src/org/olap4j/mdx/DimensionNode.java +++ b/src/org/olap4j/mdx/DimensionNode.java @@ -3,15 +3,15 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; import org.olap4j.metadata.Dimension; -import org.olap4j.type.Type; import org.olap4j.type.DimensionType; +import org.olap4j.type.Type; /** * Usage of a {@link org.olap4j.metadata.Dimension} as an expression in an MDX diff --git a/src/org/olap4j/mdx/HierarchyNode.java b/src/org/olap4j/mdx/HierarchyNode.java index abb8812..f0fbea1 100644 --- a/src/org/olap4j/mdx/HierarchyNode.java +++ b/src/org/olap4j/mdx/HierarchyNode.java @@ -3,15 +3,15 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; import org.olap4j.metadata.Hierarchy; -import org.olap4j.type.Type; import org.olap4j.type.HierarchyType; +import org.olap4j.type.Type; /** * Usage of a {@link org.olap4j.metadata.Hierarchy} as an expression in an MDX diff --git a/src/org/olap4j/mdx/IdentifierNode.java b/src/org/olap4j/mdx/IdentifierNode.java index a39f6b2..22d9c38 100644 --- a/src/org/olap4j/mdx/IdentifierNode.java +++ b/src/org/olap4j/mdx/IdentifierNode.java @@ -3,19 +3,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; -import java.util.AbstractList; -import java.util.ArrayList; -import java.util.List; - import org.olap4j.impl.*; import org.olap4j.type.Type; +import java.util.*; + /** * Multi-part identifier. * diff --git a/src/org/olap4j/mdx/LevelNode.java b/src/org/olap4j/mdx/LevelNode.java index 70b666e..f9b129b 100644 --- a/src/org/olap4j/mdx/LevelNode.java +++ b/src/org/olap4j/mdx/LevelNode.java @@ -3,15 +3,15 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; import org.olap4j.metadata.Level; -import org.olap4j.type.Type; import org.olap4j.type.LevelType; +import org.olap4j.type.Type; /** * Usage of a {@link org.olap4j.metadata.Level} as an expression in an MDX diff --git a/src/org/olap4j/mdx/MdxUtil.java b/src/org/olap4j/mdx/MdxUtil.java index db2f26f..9dc2f97 100644 --- a/src/org/olap4j/mdx/MdxUtil.java +++ b/src/org/olap4j/mdx/MdxUtil.java @@ -3,16 +3,15 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; -import java.util.regex.Pattern; -import java.util.*; import java.io.StringWriter; -import java.io.PrintWriter; +import java.util.*; +import java.util.regex.Pattern; /** * Utility methods for MDX parsing. diff --git a/src/org/olap4j/mdx/MemberNode.java b/src/org/olap4j/mdx/MemberNode.java index 99c1d15..6260685 100644 --- a/src/org/olap4j/mdx/MemberNode.java +++ b/src/org/olap4j/mdx/MemberNode.java @@ -3,15 +3,15 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; -import org.olap4j.type.Type; -import org.olap4j.type.MemberType; import org.olap4j.metadata.Member; +import org.olap4j.type.MemberType; +import org.olap4j.type.Type; /** * Usage of a {@link org.olap4j.metadata.Member} as an expression in an MDX diff --git a/src/org/olap4j/mdx/ParseRegion.java b/src/org/olap4j/mdx/ParseRegion.java index 091e984..55dc0ff 100644 --- a/src/org/olap4j/mdx/ParseRegion.java +++ b/src/org/olap4j/mdx/ParseRegion.java @@ -3,14 +3,12 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; -import org.olap4j.impl.Olap4jUtil; - /** * Region of parser source code. * diff --git a/src/org/olap4j/mdx/SelectNode.java b/src/org/olap4j/mdx/SelectNode.java index e085692..5829595 100644 --- a/src/org/olap4j/mdx/SelectNode.java +++ b/src/org/olap4j/mdx/SelectNode.java @@ -3,14 +3,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; -import org.olap4j.type.Type; import org.olap4j.Axis; +import org.olap4j.type.Type; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/src/org/olap4j/mdx/WithMemberNode.java b/src/org/olap4j/mdx/WithMemberNode.java index d06daa0..ba1fd94 100644 --- a/src/org/olap4j/mdx/WithMemberNode.java +++ b/src/org/olap4j/mdx/WithMemberNode.java @@ -3,7 +3,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -11,8 +11,8 @@ import org.olap4j.type.Type; -import java.util.List; import java.io.PrintWriter; +import java.util.List; /** * Parse tree node which declares a calculated member. Represented as the diff --git a/src/org/olap4j/mdx/parser/MdxParser.java b/src/org/olap4j/mdx/parser/MdxParser.java index fa0fb28..d5e7fe5 100644 --- a/src/org/olap4j/mdx/parser/MdxParser.java +++ b/src/org/olap4j/mdx/parser/MdxParser.java @@ -3,14 +3,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx.parser; -import org.olap4j.mdx.SelectNode; import org.olap4j.mdx.ParseTreeNode; +import org.olap4j.mdx.SelectNode; /** * Parser for the MDX query language. diff --git a/src/org/olap4j/mdx/parser/impl/DefaultMdxParserImpl.java b/src/org/olap4j/mdx/parser/impl/DefaultMdxParserImpl.java index 35b1c74..693f578 100644 --- a/src/org/olap4j/mdx/parser/impl/DefaultMdxParserImpl.java +++ b/src/org/olap4j/mdx/parser/impl/DefaultMdxParserImpl.java @@ -3,15 +3,15 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx.parser.impl; -import org.olap4j.mdx.parser.MdxParser; -import org.olap4j.mdx.SelectNode; import org.olap4j.mdx.ParseTreeNode; +import org.olap4j.mdx.SelectNode; +import org.olap4j.mdx.parser.MdxParser; /** * Default implementation of {@link org.olap4j.mdx.parser.MdxParser MDX Parser}. diff --git a/src/org/olap4j/mdx/parser/impl/Scanner.java b/src/org/olap4j/mdx/parser/impl/Scanner.java index dadb565..5cb937b 100644 --- a/src/org/olap4j/mdx/parser/impl/Scanner.java +++ b/src/org/olap4j/mdx/parser/impl/Scanner.java @@ -3,7 +3,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -12,15 +12,12 @@ import org.olap4j.mdx.ParseRegion; import org.olap4j.mdx.parser.MdxParseException; -import java.math.BigDecimal; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.ArrayList; -import java.util.HashMap; - import java_cup.runtime.Symbol; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.*; + /** * Lexical analyzer for MDX. * diff --git a/src/org/olap4j/metadata/Catalog.java b/src/org/olap4j/metadata/Catalog.java index c74404e..0e9de14 100644 --- a/src/org/olap4j/metadata/Catalog.java +++ b/src/org/olap4j/metadata/Catalog.java @@ -3,15 +3,13 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.metadata; -import org.olap4j.OlapConnection; -import org.olap4j.OlapException; -import org.olap4j.OlapDatabaseMetaData; +import org.olap4j.*; /** *

Catalogs are the second element of the hierarchy of metadata objects. diff --git a/src/org/olap4j/metadata/Database.java b/src/org/olap4j/metadata/Database.java index 658ba60..e51c036 100644 --- a/src/org/olap4j/metadata/Database.java +++ b/src/org/olap4j/metadata/Database.java @@ -3,17 +3,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.metadata; -import java.util.List; - import org.olap4j.OlapConnection; import org.olap4j.OlapException; +import java.util.List; + /** * Highest level element in the hierarchy of metadata objects. * diff --git a/src/org/olap4j/metadata/Level.java b/src/org/olap4j/metadata/Level.java index 9681378..a5b0e85 100644 --- a/src/org/olap4j/metadata/Level.java +++ b/src/org/olap4j/metadata/Level.java @@ -3,7 +3,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -11,7 +11,7 @@ import org.olap4j.OlapException; -import java.util.*; +import java.util.List; /** * Group of {@link Member} objects in a {@link Hierarchy}, diff --git a/src/org/olap4j/metadata/Member.java b/src/org/olap4j/metadata/Member.java index cdd83b2..a76683f 100644 --- a/src/org/olap4j/metadata/Member.java +++ b/src/org/olap4j/metadata/Member.java @@ -3,17 +3,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.metadata; -import java.util.List; - import org.olap4j.OlapException; import org.olap4j.mdx.ParseTreeNode; +import java.util.List; + /** * Member is a data value in an OLAP Dimension. * diff --git a/src/org/olap4j/metadata/Property.java b/src/org/olap4j/metadata/Property.java index da1b9f8..8ed45e2 100644 --- a/src/org/olap4j/metadata/Property.java +++ b/src/org/olap4j/metadata/Property.java @@ -3,7 +3,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -11,7 +11,8 @@ import org.olap4j.impl.Olap4jUtil; -import java.util.*; +import java.util.Collections; +import java.util.Set; /** * Definition of a property of a {@link Member} or diff --git a/src/org/olap4j/metadata/Schema.java b/src/org/olap4j/metadata/Schema.java index c36a14f..05e0f55 100644 --- a/src/org/olap4j/metadata/Schema.java +++ b/src/org/olap4j/metadata/Schema.java @@ -3,17 +3,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.metadata; -import java.util.Locale; -import java.util.Collection; - import org.olap4j.OlapException; +import java.util.Collection; +import java.util.Locale; + /** * A collection of database objects that contain structural information, or * metadata, about a database. diff --git a/src/org/olap4j/metadata/XmlaConstant.java b/src/org/olap4j/metadata/XmlaConstant.java index d4828d5..f2e1182 100644 --- a/src/org/olap4j/metadata/XmlaConstant.java +++ b/src/org/olap4j/metadata/XmlaConstant.java @@ -2,13 +2,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2010-2010 Julian Hyde +// Copyright (C) 2010-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.metadata; -import java.util.*; +import java.util.List; +import java.util.Set; /** * Enumerated value that belongs to a set of constants in the XML for Analysis diff --git a/src/org/olap4j/query/AbstractSelection.java b/src/org/olap4j/query/AbstractSelection.java index 438d28c..e862b06 100644 --- a/src/org/olap4j/query/AbstractSelection.java +++ b/src/org/olap4j/query/AbstractSelection.java @@ -9,11 +9,11 @@ */ package org.olap4j.query; +import org.olap4j.metadata.Dimension; + import java.util.ArrayList; import java.util.List; -import org.olap4j.metadata.Dimension; - /** * Abstract implementation of a selection. * @author LBoudreau diff --git a/src/org/olap4j/query/LevelSelectionImpl.java b/src/org/olap4j/query/LevelSelectionImpl.java index e5fe56c..40d219a 100644 --- a/src/org/olap4j/query/LevelSelectionImpl.java +++ b/src/org/olap4j/query/LevelSelectionImpl.java @@ -11,10 +11,8 @@ import org.olap4j.OlapException; import org.olap4j.mdx.ParseTreeNode; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Level; +import org.olap4j.metadata.*; import org.olap4j.metadata.Level.Type; -import org.olap4j.metadata.MetadataElement; /** * Abstract implementation of {@link Selection}. diff --git a/src/org/olap4j/query/MemberSelectionImpl.java b/src/org/olap4j/query/MemberSelectionImpl.java index c154323..9b18ccb 100644 --- a/src/org/olap4j/query/MemberSelectionImpl.java +++ b/src/org/olap4j/query/MemberSelectionImpl.java @@ -10,9 +10,7 @@ package org.olap4j.query; import org.olap4j.mdx.ParseTreeNode; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Member; -import org.olap4j.metadata.MetadataElement; +import org.olap4j.metadata.*; /** * Abstract implementation of {@link Selection}. diff --git a/src/org/olap4j/query/Olap4jNodeConverter.java b/src/org/olap4j/query/Olap4jNodeConverter.java index 2e9ce00..e1981d6 100644 --- a/src/org/olap4j/query/Olap4jNodeConverter.java +++ b/src/org/olap4j/query/Olap4jNodeConverter.java @@ -9,29 +9,13 @@ */ package org.olap4j.query; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import org.olap4j.Axis; -import org.olap4j.mdx.AxisNode; -import org.olap4j.mdx.CallNode; -import org.olap4j.mdx.CubeNode; -import org.olap4j.mdx.DimensionNode; -import org.olap4j.mdx.HierarchyNode; -import org.olap4j.mdx.IdentifierNode; -import org.olap4j.mdx.LevelNode; -import org.olap4j.mdx.LiteralNode; -import org.olap4j.mdx.MemberNode; -import org.olap4j.mdx.ParseTreeNode; -import org.olap4j.mdx.SelectNode; -import org.olap4j.mdx.Syntax; +import org.olap4j.mdx.*; import org.olap4j.metadata.Level; import org.olap4j.metadata.Member; +import java.util.*; + /** * Utility class to convert a Query object to a SelectNode. */ diff --git a/src/org/olap4j/query/Query.java b/src/org/olap4j/query/Query.java index 1588b9a..254b066 100644 --- a/src/org/olap4j/query/Query.java +++ b/src/org/olap4j/query/Query.java @@ -9,13 +9,13 @@ */ package org.olap4j.query; -import org.olap4j.metadata.*; import org.olap4j.*; import org.olap4j.mdx.SelectNode; +import org.olap4j.metadata.*; +import java.sql.SQLException; import java.util.*; import java.util.Map.Entry; -import java.sql.SQLException; /** * Base query model object. diff --git a/src/org/olap4j/query/QueryAxis.java b/src/org/olap4j/query/QueryAxis.java index 5cd1d84..85ad120 100644 --- a/src/org/olap4j/query/QueryAxis.java +++ b/src/org/olap4j/query/QueryAxis.java @@ -15,12 +15,7 @@ import org.olap4j.metadata.Measure; import org.olap4j.metadata.Member; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.AbstractList; -import java.util.Map; +import java.util.*; /** * An axis within an OLAP {@link Query}. diff --git a/src/org/olap4j/query/QueryDimension.java b/src/org/olap4j/query/QueryDimension.java index 0e1e1be..bcd8d8a 100644 --- a/src/org/olap4j/query/QueryDimension.java +++ b/src/org/olap4j/query/QueryDimension.java @@ -14,13 +14,7 @@ import org.olap4j.mdx.IdentifierSegment; import org.olap4j.metadata.*; -import java.util.HashMap; -import java.util.List; -import java.util.ArrayList; -import java.util.AbstractList; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; +import java.util.*; /** * Usage of a dimension for an OLAP query. diff --git a/src/org/olap4j/query/QueryNodeImpl.java b/src/org/olap4j/query/QueryNodeImpl.java index e20da6f..f37992d 100644 --- a/src/org/olap4j/query/QueryNodeImpl.java +++ b/src/org/olap4j/query/QueryNodeImpl.java @@ -3,15 +3,13 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2009-2010 Julian Hyde +// Copyright (C) 2009-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.query; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import java.util.*; /** * Abstract implementation of QueryNode that diff --git a/src/org/olap4j/query/Selection.java b/src/org/olap4j/query/Selection.java index 211c27c..96c38a5 100644 --- a/src/org/olap4j/query/Selection.java +++ b/src/org/olap4j/query/Selection.java @@ -9,12 +9,12 @@ */ package org.olap4j.query; -import java.util.List; - import org.olap4j.mdx.ParseTreeNode; import org.olap4j.metadata.Dimension; import org.olap4j.metadata.MetadataElement; +import java.util.List; + /** * A selection of members from an OLAP dimension hierarchy. The selection * is a conceptual list of members from a given hierarchy. Once a selection diff --git a/src/org/olap4j/sample/PaloConnection.java b/src/org/olap4j/sample/PaloConnection.java index d1da2af..5e7c76e 100644 --- a/src/org/olap4j/sample/PaloConnection.java +++ b/src/org/olap4j/sample/PaloConnection.java @@ -3,27 +3,26 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.sample; +import org.olap4j.*; +import org.olap4j.driver.xmla.XmlaOlap4jDriver; +import org.olap4j.layout.RectangularCellSetFormatter; + import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; -import org.olap4j.CellSet; -import org.olap4j.OlapConnection; -import org.olap4j.OlapStatement; -import org.olap4j.OlapWrapper; -import org.olap4j.driver.xmla.XmlaOlap4jDriver; -import org.olap4j.layout.RectangularCellSetFormatter; - /** * This class demonstrates how to connect the {@link XmlaOlap4jDriver} * to a Palo server. Thanks to Vladislav Malicevic for this * contribution. + * + * @version $Id$ * @author Luc Boudreau */ public class PaloConnection { @@ -63,4 +62,4 @@ public static void main(String[] args) throws Exception { } } -// End PaloConnection.java \ No newline at end of file +// End PaloConnection.java diff --git a/src/org/olap4j/sample/SimpleQuerySample.java b/src/org/olap4j/sample/SimpleQuerySample.java index f1b35c7..9dea093 100644 --- a/src/org/olap4j/sample/SimpleQuerySample.java +++ b/src/org/olap4j/sample/SimpleQuerySample.java @@ -3,19 +3,19 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde +// Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.sample; import org.olap4j.*; +import org.olap4j.layout.RectangularCellSetFormatter; +import org.olap4j.mdx.*; import org.olap4j.mdx.parser.MdxParser; import org.olap4j.mdx.parser.MdxParserFactory; -import org.olap4j.mdx.*; import org.olap4j.metadata.Dimension; import org.olap4j.metadata.Member; -import org.olap4j.layout.RectangularCellSetFormatter; import org.olap4j.type.MemberType; import java.io.PrintWriter; diff --git a/src/org/olap4j/transform/AxisTransform.java b/src/org/olap4j/transform/AxisTransform.java index 77cfba4..26365a5 100644 --- a/src/org/olap4j/transform/AxisTransform.java +++ b/src/org/olap4j/transform/AxisTransform.java @@ -3,16 +3,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2008-2010 Julian Hyde +// Copyright (C) 2008-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.transform; import org.olap4j.Axis; -import org.olap4j.mdx.AxisNode; -import org.olap4j.mdx.ParseTreeNode; -import org.olap4j.mdx.SelectNode; +import org.olap4j.mdx.*; /** * Abstract representation of an MDX query transform acting on diff --git a/src/org/olap4j/transform/DrillDownOnPositionTransform.java b/src/org/olap4j/transform/DrillDownOnPositionTransform.java index 4207a5d..7315f75 100644 --- a/src/org/olap4j/transform/DrillDownOnPositionTransform.java +++ b/src/org/olap4j/transform/DrillDownOnPositionTransform.java @@ -3,35 +3,18 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2008-2010 Julian Hyde +// Copyright (C) 2008-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.transform; -import java.util.List; - -import org.olap4j.Axis; -import org.olap4j.CellSet; -import org.olap4j.Position; -import org.olap4j.mdx.AxisNode; -import org.olap4j.mdx.CallNode; -import org.olap4j.mdx.CubeNode; -import org.olap4j.mdx.DimensionNode; -import org.olap4j.mdx.HierarchyNode; -import org.olap4j.mdx.IdentifierNode; -import org.olap4j.mdx.LevelNode; -import org.olap4j.mdx.LiteralNode; -import org.olap4j.mdx.MemberNode; -import org.olap4j.mdx.ParameterNode; -import org.olap4j.mdx.ParseTreeNode; -import org.olap4j.mdx.ParseTreeVisitor; -import org.olap4j.mdx.PropertyValueNode; -import org.olap4j.mdx.SelectNode; -import org.olap4j.mdx.WithMemberNode; -import org.olap4j.mdx.WithSetNode; +import org.olap4j.*; +import org.olap4j.mdx.*; import org.olap4j.metadata.Member; +import java.util.List; + /** * Drill down on position transform * diff --git a/src/org/olap4j/transform/MdxHelper.java b/src/org/olap4j/transform/MdxHelper.java index e05f36d..9da108e 100644 --- a/src/org/olap4j/transform/MdxHelper.java +++ b/src/org/olap4j/transform/MdxHelper.java @@ -3,21 +3,18 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2008-2010 Julian Hyde +// Copyright (C) 2008-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.transform; +import org.olap4j.mdx.*; +import org.olap4j.metadata.Member; + import java.util.ArrayList; import java.util.List; -import org.olap4j.mdx.CallNode; -import org.olap4j.mdx.MemberNode; -import org.olap4j.mdx.ParseTreeNode; -import org.olap4j.mdx.Syntax; -import org.olap4j.metadata.Member; - /** * Helper class for generating MDX expressions in query transforms. * diff --git a/src/org/olap4j/transform/TransformUtil.java b/src/org/olap4j/transform/TransformUtil.java index fbac8f7..7e576ee 100644 --- a/src/org/olap4j/transform/TransformUtil.java +++ b/src/org/olap4j/transform/TransformUtil.java @@ -3,21 +3,18 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2008-2010 Julian Hyde +// Copyright (C) 2008-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.transform; +import org.olap4j.*; +import org.olap4j.metadata.Member; + import java.util.ArrayList; import java.util.List; -import org.olap4j.Axis; -import org.olap4j.CellSet; -import org.olap4j.CellSetAxis; -import org.olap4j.Position; -import org.olap4j.metadata.Member; - /** * Various helper functions for MDX query transforms. * diff --git a/src/org/olap4j/type/CubeType.java b/src/org/olap4j/type/CubeType.java index c487b77..1cf8c1c 100755 --- a/src/org/olap4j/type/CubeType.java +++ b/src/org/olap4j/type/CubeType.java @@ -3,16 +3,13 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2005-2010 Julian Hyde +// Copyright (C) 2005-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.type; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Level; -import org.olap4j.metadata.Cube; +import org.olap4j.metadata.*; /** * The type of an expression which represents a Cube or Virtual Cube. diff --git a/src/org/olap4j/type/DimensionType.java b/src/org/olap4j/type/DimensionType.java index dc36d23..3f7f7a0 100755 --- a/src/org/olap4j/type/DimensionType.java +++ b/src/org/olap4j/type/DimensionType.java @@ -3,15 +3,13 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2005-2010 Julian Hyde +// Copyright (C) 2005-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.type; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Level; +import org.olap4j.metadata.*; /** * The type of an expression which represents a Dimension. diff --git a/src/org/olap4j/type/HierarchyType.java b/src/org/olap4j/type/HierarchyType.java index dcff2b3..59862b2 100755 --- a/src/org/olap4j/type/HierarchyType.java +++ b/src/org/olap4j/type/HierarchyType.java @@ -3,16 +3,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2005-2010 Julian Hyde +// Copyright (C) 2005-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.type; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Level; import org.olap4j.OlapException; +import org.olap4j.metadata.*; /** * The type of an expression which represents a hierarchy. diff --git a/src/org/olap4j/type/LevelType.java b/src/org/olap4j/type/LevelType.java index 6969382..070a715 100755 --- a/src/org/olap4j/type/LevelType.java +++ b/src/org/olap4j/type/LevelType.java @@ -9,10 +9,8 @@ */ package org.olap4j.type; -import org.olap4j.metadata.Level; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; import org.olap4j.OlapException; +import org.olap4j.metadata.*; /** * The type of an expression which represents a level. diff --git a/src/org/olap4j/type/MemberType.java b/src/org/olap4j/type/MemberType.java index 135b640..9f91664 100644 --- a/src/org/olap4j/type/MemberType.java +++ b/src/org/olap4j/type/MemberType.java @@ -9,11 +9,8 @@ */ package org.olap4j.type; -import org.olap4j.metadata.Member; -import org.olap4j.metadata.Level; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Dimension; import org.olap4j.OlapException; +import org.olap4j.metadata.*; /** * The type of an expression which represents a member. diff --git a/src/org/olap4j/type/NumericType.java b/src/org/olap4j/type/NumericType.java index 19c04f8..1d6151a 100755 --- a/src/org/olap4j/type/NumericType.java +++ b/src/org/olap4j/type/NumericType.java @@ -3,15 +3,12 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2005-2010 Julian Hyde +// Copyright (C) 2005-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.type; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; - /** * The type of a numeric expression. * diff --git a/src/org/olap4j/type/ScalarType.java b/src/org/olap4j/type/ScalarType.java index 4dc7f0c..af54730 100755 --- a/src/org/olap4j/type/ScalarType.java +++ b/src/org/olap4j/type/ScalarType.java @@ -3,15 +3,13 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2005-2010 Julian Hyde +// Copyright (C) 2005-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.type; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Level; +import org.olap4j.metadata.*; /** * Base class for types which represent scalar values. diff --git a/src/org/olap4j/type/SetType.java b/src/org/olap4j/type/SetType.java index 12a4eff..e0daef0 100755 --- a/src/org/olap4j/type/SetType.java +++ b/src/org/olap4j/type/SetType.java @@ -3,15 +3,13 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2005-2010 Julian Hyde +// Copyright (C) 2005-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.type; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Level; +import org.olap4j.metadata.*; /** * Set type. diff --git a/src/org/olap4j/type/TupleType.java b/src/org/olap4j/type/TupleType.java index ebfba23..e51491e 100755 --- a/src/org/olap4j/type/TupleType.java +++ b/src/org/olap4j/type/TupleType.java @@ -3,16 +3,14 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2005-2010 Julian Hyde +// Copyright (C) 2005-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.type; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Level; import org.olap4j.OlapException; +import org.olap4j.metadata.*; /** * Tuple type. diff --git a/src/org/olap4j/type/Type.java b/src/org/olap4j/type/Type.java index 12f328f..1c9fc0a 100644 --- a/src/org/olap4j/type/Type.java +++ b/src/org/olap4j/type/Type.java @@ -3,15 +3,13 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2005-2010 Julian Hyde +// Copyright (C) 2005-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.type; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Level; +import org.olap4j.metadata.*; /** * Type of an MDX expression. diff --git a/src/org/olap4j/type/TypeUtil.java b/src/org/olap4j/type/TypeUtil.java index 1038ded..9925cf1 100755 --- a/src/org/olap4j/type/TypeUtil.java +++ b/src/org/olap4j/type/TypeUtil.java @@ -9,8 +9,8 @@ */ package org.olap4j.type; -import org.olap4j.metadata.Hierarchy; import org.olap4j.OlapException; +import org.olap4j.metadata.Hierarchy; /** * Utility methods relating to types. diff --git a/testsrc/org/olap4j/CellSetFormatterTest.java b/testsrc/org/olap4j/CellSetFormatterTest.java index d0862b1..a05b4b4 100644 --- a/testsrc/org/olap4j/CellSetFormatterTest.java +++ b/testsrc/org/olap4j/CellSetFormatterTest.java @@ -3,22 +3,22 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2009-2010 Julian Hyde +// Copyright (C) 2009-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j; -import junit.framework.TestCase; - -import org.olap4j.test.TestContext; -import org.olap4j.layout.TraditionalCellSetFormatter; import org.olap4j.layout.RectangularCellSetFormatter; +import org.olap4j.layout.TraditionalCellSetFormatter; +import org.olap4j.test.TestContext; + +import junit.framework.TestCase; -import java.sql.SQLException; -import java.sql.Connection; -import java.io.StringWriter; import java.io.PrintWriter; +import java.io.StringWriter; +import java.sql.Connection; +import java.sql.SQLException; /** * Unit test for converting MDX CellSets to text. diff --git a/testsrc/org/olap4j/ConnectionTest.java b/testsrc/org/olap4j/ConnectionTest.java index db261d8..348a04b 100644 --- a/testsrc/org/olap4j/ConnectionTest.java +++ b/testsrc/org/olap4j/ConnectionTest.java @@ -9,11 +9,9 @@ */ package org.olap4j; -import junit.framework.AssertionFailedError; -import junit.framework.TestCase; +import org.olap4j.driver.xmla.XmlaOlap4jDriver; import org.olap4j.impl.Bug; import org.olap4j.impl.Olap4jUtil; -import org.olap4j.driver.xmla.*; import org.olap4j.mdx.*; import org.olap4j.mdx.parser.*; import org.olap4j.metadata.*; @@ -22,6 +20,9 @@ import org.olap4j.test.TestContext.Tester.Flavor; import org.olap4j.type.*; +import junit.framework.AssertionFailedError; +import junit.framework.TestCase; + import java.io.*; import java.lang.reflect.InvocationTargetException; import java.sql.*; @@ -3198,8 +3199,8 @@ public void testParentChildAccessControl() throws Exception { .getLevels().get("City") .getMembers().get(0); assertEquals( - 0, - city.getChildMembers().size()); + 0, + city.getChildMembers().size()); final Member state = olapConnection.getOlapSchema() .getCubes().get("Sales") diff --git a/testsrc/org/olap4j/MetadataTest.java b/testsrc/org/olap4j/MetadataTest.java index 395d462..97d33f5 100644 --- a/testsrc/org/olap4j/MetadataTest.java +++ b/testsrc/org/olap4j/MetadataTest.java @@ -2,18 +2,18 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j; -import junit.framework.TestCase; - import org.olap4j.impl.Olap4jUtil; import org.olap4j.metadata.*; import org.olap4j.test.TestContext; +import junit.framework.TestCase; + import java.sql.*; import java.util.*; diff --git a/testsrc/org/olap4j/OlapTest.java b/testsrc/org/olap4j/OlapTest.java index 365ea24..d93a84f 100644 --- a/testsrc/org/olap4j/OlapTest.java +++ b/testsrc/org/olap4j/OlapTest.java @@ -15,11 +15,12 @@ import org.olap4j.query.QueryDimension.HierarchizeMode; import org.olap4j.query.Selection.Operator; import org.olap4j.test.TestContext; -import java.sql.Connection; -import java.sql.DriverManager; import junit.framework.TestCase; +import java.sql.Connection; +import java.sql.DriverManager; + import static org.olap4j.test.TestContext.nameList; /** diff --git a/testsrc/org/olap4j/OlapTreeTest.java b/testsrc/org/olap4j/OlapTreeTest.java index 6375e56..b340059 100644 --- a/testsrc/org/olap4j/OlapTreeTest.java +++ b/testsrc/org/olap4j/OlapTreeTest.java @@ -3,24 +3,21 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j; -import java.sql.Connection; -import java.util.HashMap; -import java.util.Map; - -import org.olap4j.metadata.Cube; -import org.olap4j.metadata.Dimension; -import org.olap4j.metadata.Hierarchy; -import org.olap4j.metadata.Schema; +import org.olap4j.metadata.*; import org.olap4j.test.TestContext; import junit.framework.TestCase; +import java.sql.Connection; +import java.util.HashMap; +import java.util.Map; + /** * Tests some particularities of the OLAP tree objects. * @author Luc Boudreau @@ -74,4 +71,4 @@ public void testHashCompatibility() throws Exception { assertTrue(dimensionMap.containsKey(hchy1.getDimension())); } } -// End OlapTreeTest.java \ No newline at end of file +// End OlapTreeTest.java diff --git a/testsrc/org/olap4j/RemoteXmlaTester.java b/testsrc/org/olap4j/RemoteXmlaTester.java index 7877f2e..5f22190 100644 --- a/testsrc/org/olap4j/RemoteXmlaTester.java +++ b/testsrc/org/olap4j/RemoteXmlaTester.java @@ -8,15 +8,13 @@ */ package org.olap4j; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.util.Properties; - import org.olap4j.test.TestContext; import org.olap4j.test.TestContext.Tester; import org.olap4j.test.TestContext.Wrapper; +import java.sql.*; +import java.util.Properties; + /** * Implementation of {@link org.olap4j.test.TestContext.Tester} which speaks * to remote XML/A servers. diff --git a/testsrc/org/olap4j/XmlaConnectionTest.java b/testsrc/org/olap4j/XmlaConnectionTest.java index 33e474c..2140e2d 100644 --- a/testsrc/org/olap4j/XmlaConnectionTest.java +++ b/testsrc/org/olap4j/XmlaConnectionTest.java @@ -1,18 +1,20 @@ package org.olap4j; -import java.sql.*; -import java.util.*; -import java.util.concurrent.Future; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import org.olap4j.driver.xmla.*; -import org.olap4j.driver.xmla.proxy.*; -import org.olap4j.test.*; +import org.olap4j.driver.xmla.XmlaOlap4jDriver; +import org.olap4j.driver.xmla.XmlaOlap4jServerInfos; +import org.olap4j.driver.xmla.proxy.XmlaOlap4jProxy; +import org.olap4j.driver.xmla.proxy.XmlaOlap4jProxyException; +import org.olap4j.test.TestContext; import org.olap4j.test.TestContext.Tester; import junit.framework.TestCase; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.sql.*; +import java.util.*; +import java.util.concurrent.Future; + public class XmlaConnectionTest extends TestCase { public static final String DRIVER_CLASS_NAME = diff --git a/testsrc/org/olap4j/XmlaTester.java b/testsrc/org/olap4j/XmlaTester.java index 8b3f6c7..74734f0 100644 --- a/testsrc/org/olap4j/XmlaTester.java +++ b/testsrc/org/olap4j/XmlaTester.java @@ -2,7 +2,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -12,10 +12,10 @@ import org.olap4j.driver.xmla.proxy.XmlaOlap4jProxy; import org.olap4j.test.TestContext; -import java.sql.*; -import java.util.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.sql.*; +import java.util.*; /** * Implementation of {@link org.olap4j.test.TestContext.Tester} which speaks diff --git a/testsrc/org/olap4j/driver/xmla/cache/XmlaDatabaseCache.java b/testsrc/org/olap4j/driver/xmla/cache/XmlaDatabaseCache.java index 461a96c..75de591 100644 --- a/testsrc/org/olap4j/driver/xmla/cache/XmlaDatabaseCache.java +++ b/testsrc/org/olap4j/driver/xmla/cache/XmlaDatabaseCache.java @@ -1,12 +1,7 @@ package org.olap4j.driver.xmla.cache; import java.net.URL; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; +import java.sql.*; import java.util.Map; /** diff --git a/testsrc/org/olap4j/driver/xmla/cache/XmlaShaEncoderTest.java b/testsrc/org/olap4j/driver/xmla/cache/XmlaShaEncoderTest.java index 85ee460..26877c4 100644 --- a/testsrc/org/olap4j/driver/xmla/cache/XmlaShaEncoderTest.java +++ b/testsrc/org/olap4j/driver/xmla/cache/XmlaShaEncoderTest.java @@ -3,7 +3,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2008-2010 Julian Hyde +// Copyright (C) 2008-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -11,8 +11,6 @@ import junit.framework.TestCase; -import org.olap4j.driver.xmla.cache.XmlaOlap4jShaEncoder; - /** *

Test for {@link org.olap4j.driver.xmla.cache.XmlaOlap4jShaEncoder}. * diff --git a/testsrc/org/olap4j/driver/xmla/proxy/XmlaCachedProxyTest.java b/testsrc/org/olap4j/driver/xmla/proxy/XmlaCachedProxyTest.java index e99283c..fba507d 100644 --- a/testsrc/org/olap4j/driver/xmla/proxy/XmlaCachedProxyTest.java +++ b/testsrc/org/olap4j/driver/xmla/proxy/XmlaCachedProxyTest.java @@ -8,15 +8,15 @@ */ package org.olap4j.driver.xmla.proxy; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.TestCase; - import org.olap4j.OlapException; import org.olap4j.driver.xmla.XmlaOlap4jDriver; import org.olap4j.driver.xmla.cache.XmlaOlap4jNamedMemoryCache; +import junit.framework.TestCase; + +import java.util.HashMap; +import java.util.Map; + /** *

Tests both the CachedProxy implementation (HttpProxy) and the * IXmlaOlap4jCache implementation (XmlaOlap4jNamedMemoryCache). diff --git a/testsrc/org/olap4j/driver/xmla/proxy/XmlaCookieManagerTest.java b/testsrc/org/olap4j/driver/xmla/proxy/XmlaCookieManagerTest.java index 74b00ea..213c973 100644 --- a/testsrc/org/olap4j/driver/xmla/proxy/XmlaCookieManagerTest.java +++ b/testsrc/org/olap4j/driver/xmla/proxy/XmlaCookieManagerTest.java @@ -1,13 +1,26 @@ +/* +// $Id$ +// This software is subject to the terms of the Eclipse Public License v1.0 +// Agreement, available at the following URL: +// http://www.eclipse.org/legal/epl-v10.html. +// Copyright (C) 2008-2011 Julian Hyde and others +// All Rights Reserved. +// You must accept the terms of that agreement to use this software. +*/ package org.olap4j.driver.xmla.proxy; +import junit.framework.TestCase; + import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; -import junit.framework.TestCase; - -import org.olap4j.driver.xmla.proxy.XmlaOlap4jCookieManager; - +/** + * Unit test for cookie manager. + * + * @version $Id$ + * @author Luc Boudreau + */ public class XmlaCookieManagerTest extends TestCase { private static final String receivedCookieKey = "Set-Cookie"; diff --git a/testsrc/org/olap4j/impl/Base64Test.java b/testsrc/org/olap4j/impl/Base64Test.java index 33ef3e5..32cbd47 100644 --- a/testsrc/org/olap4j/impl/Base64Test.java +++ b/testsrc/org/olap4j/impl/Base64Test.java @@ -3,21 +3,18 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2006-2010 Julian Hyde and others +// Copyright (C) 2006-2011 Julian Hyde and others // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ - package org.olap4j.impl; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; +import junit.framework.TestCase; + +import java.io.*; import java.util.Arrays; import java.util.Random; -import junit.framework.TestCase; - /** * Test case for {@link Base64}. * diff --git a/testsrc/org/olap4j/impl/ConnectStringParserTest.java b/testsrc/org/olap4j/impl/ConnectStringParserTest.java index 95ebd7c..1dd8d99 100644 --- a/testsrc/org/olap4j/impl/ConnectStringParserTest.java +++ b/testsrc/org/olap4j/impl/ConnectStringParserTest.java @@ -2,7 +2,7 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ @@ -10,7 +10,7 @@ import junit.framework.TestCase; -import java.util.*; +import java.util.Map; /** * Unit test for {@link org.olap4j.impl.ConnectStringParser}. diff --git a/testsrc/org/olap4j/impl/Olap4jUtilTest.java b/testsrc/org/olap4j/impl/Olap4jUtilTest.java index c18f997..1a6829e 100644 --- a/testsrc/org/olap4j/impl/Olap4jUtilTest.java +++ b/testsrc/org/olap4j/impl/Olap4jUtilTest.java @@ -8,9 +8,10 @@ */ package org.olap4j.impl; -import junit.framework.TestCase; import org.olap4j.mdx.*; +import junit.framework.TestCase; + import java.util.*; /** diff --git a/testsrc/org/olap4j/mdx/MdxTest.java b/testsrc/org/olap4j/mdx/MdxTest.java index e5b0d4e..81e1105 100644 --- a/testsrc/org/olap4j/mdx/MdxTest.java +++ b/testsrc/org/olap4j/mdx/MdxTest.java @@ -2,20 +2,20 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.mdx; -import junit.framework.TestCase; - -import java.util.*; - import org.olap4j.mdx.parser.MdxParser; import org.olap4j.mdx.parser.impl.DefaultMdxParserImpl; import org.olap4j.test.TestContext; +import junit.framework.TestCase; + +import java.util.*; + /** * Testcase for org.olap4j.mdx package. * diff --git a/testsrc/org/olap4j/test/ArrayMapTest.java b/testsrc/org/olap4j/test/ArrayMapTest.java index 514bf51..dc79001 100644 --- a/testsrc/org/olap4j/test/ArrayMapTest.java +++ b/testsrc/org/olap4j/test/ArrayMapTest.java @@ -2,16 +2,17 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.test; -import junit.framework.TestCase; import org.olap4j.impl.ArrayMap; import org.olap4j.impl.UnmodifiableArrayMap; +import junit.framework.TestCase; + import java.util.*; /** diff --git a/testsrc/org/olap4j/test/ParserTest.java b/testsrc/org/olap4j/test/ParserTest.java index f739cb2..fd82770 100644 --- a/testsrc/org/olap4j/test/ParserTest.java +++ b/testsrc/org/olap4j/test/ParserTest.java @@ -3,22 +3,23 @@ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. -// Copyright (C) 2007-2010 Julian Hyde +// Copyright (C) 2007-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package org.olap4j.test; -import junit.framework.TestCase; -import junit.framework.AssertionFailedError; -import org.olap4j.mdx.parser.MdxParser; -import org.olap4j.mdx.parser.MdxParseException; -import org.olap4j.mdx.*; -import org.olap4j.OlapConnection; import org.olap4j.Axis; +import org.olap4j.OlapConnection; +import org.olap4j.mdx.*; +import org.olap4j.mdx.parser.MdxParseException; +import org.olap4j.mdx.parser.MdxParser; + +import junit.framework.AssertionFailedError; +import junit.framework.TestCase; -import java.sql.SQLException; import java.sql.Connection; +import java.sql.SQLException; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; diff --git a/testsrc/org/olap4j/test/TestContext.java b/testsrc/org/olap4j/test/TestContext.java index 7488751..ac3cae8 100644 --- a/testsrc/org/olap4j/test/TestContext.java +++ b/testsrc/org/olap4j/test/TestContext.java @@ -9,21 +9,24 @@ */ package org.olap4j.test; -import java.io.*; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.*; -import java.util.regex.Pattern; -import java.sql.*; - -import junit.framework.*; -import org.olap4j.*; +import org.olap4j.CellSet; +import org.olap4j.OlapWrapper; import org.olap4j.impl.Olap4jUtil; -import org.olap4j.mdx.*; import org.olap4j.layout.TraditionalCellSetFormatter; +import org.olap4j.mdx.*; + +import junit.framework.*; import org.apache.commons.dbcp.*; +import java.io.*; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.sql.*; +import java.util.List; +import java.util.Properties; +import java.util.regex.Pattern; + /** * Context for olap4j tests. * diff --git a/testsrc/org/olap4j/transform/TransformTest.java b/testsrc/org/olap4j/transform/TransformTest.java index 088b81b..26c94bd 100644 --- a/testsrc/org/olap4j/transform/TransformTest.java +++ b/testsrc/org/olap4j/transform/TransformTest.java @@ -9,19 +9,16 @@ */ package org.olap4j.transform; -import java.sql.Connection; -import java.sql.SQLException; - -import org.olap4j.Axis; -import org.olap4j.CellSet; -import org.olap4j.OlapConnection; -import org.olap4j.OlapStatement; +import org.olap4j.*; import org.olap4j.mdx.SelectNode; import org.olap4j.mdx.parser.MdxParser; import org.olap4j.test.TestContext; import junit.framework.TestCase; +import java.sql.Connection; +import java.sql.SQLException; + /** * Testcase for org.olap4j.transform package. *