Skip to content

Commit

Permalink
Enforce formatting for hanging arguments; update copyright notices. C…
Browse files Browse the repository at this point in the history
…osmetic changes only.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@455 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed May 24, 2011
1 parent f15a3bb commit 57c37b8
Show file tree
Hide file tree
Showing 27 changed files with 306 additions and 215 deletions.
10 changes: 7 additions & 3 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCatalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -62,9 +62,10 @@ class XmlaOlap4jCatalog implements Catalog, Named {
null)
{
private boolean useSchemata = false;

@Override
protected void populateList(
NamedList<XmlaOlap4jSchema> list)
NamedList<XmlaOlap4jSchema> list)
throws OlapException
{
try {
Expand Down Expand Up @@ -95,8 +96,9 @@ protected void populateList(
// Fallback to MDSCHEMA_CUBES trick
populateInternal(list);
}

private void populateInternal(
NamedList<XmlaOlap4jSchema> list)
NamedList<XmlaOlap4jSchema> list)
throws OlapException
{
XmlaOlap4jConnection conn =
Expand Down Expand Up @@ -148,3 +150,5 @@ public XmlaOlap4jDatabase getDatabase() {
}

// End XmlaOlap4jCatalog.java


7 changes: 4 additions & 3 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -258,8 +258,8 @@ void populate() throws OlapException {
XmlaOlap4jCellSetMemberProperty property =
((XmlaOlap4jCellSetAxisMetaData)
cellSetAxis.getAxisMetaData()).lookupProperty(
hierarchyName,
childNode.getLocalName());
hierarchyName,
childNode.getLocalName());
if (property != null) {
String value = childNode.getTextContent();
propertyValues.put(property, value);
Expand Down Expand Up @@ -1488,3 +1488,4 @@ public boolean isVisible() {
}

// End XmlaOlap4jCellSet.java

30 changes: 20 additions & 10 deletions src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private void initSoapCache(Map<String, String> map) throws OlapException {
for (Entry<String, String> entry : map.entrySet()) {
// Check if the current entry relates to cache config.
if (entry.getKey().startsWith(
XmlaOlap4jDriver.Property.CACHE.name() + "."))
XmlaOlap4jDriver.Property.CACHE.name() + "."))
{
props.put(entry.getKey().substring(
XmlaOlap4jDriver.Property.CACHE.name()
Expand Down Expand Up @@ -454,9 +454,9 @@ public void setSchema(String schemaName) throws OlapException {
(XmlaOlap4jSchema) catalog.getSchemas().get(schemaName);
if (this.olap4jSchema == null) {
throw new OlapException(
"No schema named " + schemaName
+ " could be found in catalog "
+ catalog.getName());
"No schema named " + schemaName
+ " could be found in catalog "
+ catalog.getName());
}
this.schemaName = schemaName;
}
Expand Down Expand Up @@ -1139,9 +1139,14 @@ public void handle(
stringElement(row, "DEFAULT_HIERARCHY");
final Integer dimensionOrdinal =
integerElement(row, "DIMENSION_ORDINAL");
XmlaOlap4jDimension dimension = new XmlaOlap4jDimension(
context.olap4jCube, dimensionUniqueName, dimensionName,
dimensionCaption, description, type,
XmlaOlap4jDimension dimension =
new XmlaOlap4jDimension(
context.olap4jCube,
dimensionUniqueName,
dimensionName,
dimensionCaption,
description,
type,
defaultHierarchyUniqueName,
dimensionOrdinal == null ? 0 : dimensionOrdinal);
list.add(dimension);
Expand All @@ -1150,8 +1155,8 @@ public void handle(
list,
new Comparator<XmlaOlap4jDimension> () {
public int compare(
XmlaOlap4jDimension d1,
XmlaOlap4jDimension d2)
XmlaOlap4jDimension d1,
XmlaOlap4jDimension d2)
{
if (d1.getOrdinal() == d2.getOrdinal()) {
return 0;
Expand Down Expand Up @@ -1549,7 +1554,7 @@ private void addUserDefinedDimensionProperties(
for (Property property : level.getProperties()) {
if (property instanceof XmlaOlap4jProperty
&& property.getName().equalsIgnoreCase(
node.getLocalName()))
node.getLocalName()))
{
map.put(property, node.getTextContent());
}
Expand Down Expand Up @@ -2303,3 +2308,8 @@ public SelectNode validateSelect(
}

// End XmlaOlap4jConnection.java





19 changes: 10 additions & 9 deletions src/org/olap4j/driver/xmla/XmlaOlap4jDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ class XmlaOlap4jDatabase implements Database, Named {
private final List<AuthenticationMode> authenticationMode;

public XmlaOlap4jDatabase(
XmlaOlap4jConnection olap4jConnection,
String name,
String description,
String providerName,
String url,
String dataSourceInfo,
List<ProviderType> providerType,
List<AuthenticationMode> authenticationMode)
XmlaOlap4jConnection olap4jConnection,
String name,
String description,
String providerName,
String url,
String dataSourceInfo,
List<ProviderType> providerType,
List<AuthenticationMode> authenticationMode)
{
this.olap4jConnection = olap4jConnection;
this.name = name;
Expand Down Expand Up @@ -106,4 +106,5 @@ public String getDataSourceInfo() throws OlapException {
return this.dataSourceInfo;
}
}
// End XmlaOlap4jDatabase.java
// End XmlaOlap4jDatabase.java

12 changes: 7 additions & 5 deletions src/org/olap4j/driver/xmla/XmlaOlap4jDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -129,8 +129,8 @@ private ResultSet getMetadata(
rowLoop:
for (Element row : XmlaOlap4jUtil.childElements(root)) {
if (row.getNamespaceURI() != null
&& !row.getNamespaceURI().equals(
"urn:schemas-microsoft-com:xml-analysis:rowset"))
&& !row.getNamespaceURI().equals(
"urn:schemas-microsoft-com:xml-analysis:rowset"))
{
// Ignore any vendor specific namespaced elements that
// are not part of the rowset namespace
Expand Down Expand Up @@ -245,8 +245,8 @@ public String getDatabaseProductVersion() throws SQLException {
try {
while (rs.next()) {
if (rs.getString(
XmlaConstants.Literal.PROPERTY_NAME.name())
.equals("ProviderVersion"))
XmlaConstants.Literal.PROPERTY_NAME.name())
.equals("ProviderVersion"))
{
return rs.getString("PROPERTY_VALUE");
}
Expand Down Expand Up @@ -1241,3 +1241,5 @@ static class Wildcard {
}

// End XmlaOlap4jDatabaseMetaData.java


Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -85,17 +85,17 @@ public XmlaOlap4jConcurrentMemoryCache(
{
for (Entry<String, String> entry : props.entrySet()) {
if (Property.SIZE.name().equalsIgnoreCase(
entry.getKey().toString()))
entry.getKey().toString()))
{
this.setCacheSize(
Integer.parseInt(entry.getValue().toString()));
Integer.parseInt(entry.getValue().toString()));
} else if (Property.TIMEOUT.name().equalsIgnoreCase(
entry.getKey().toString()))
entry.getKey().toString()))
{
this.setCacheTimeout(
Integer.parseInt(entry.getValue().toString()));
Integer.parseInt(entry.getValue().toString()));
} else if (Property.MODE.name().equalsIgnoreCase(
entry.getKey().toString()))
entry.getKey().toString()))
{
this.setCacheMode(
entry.getValue().toString());
Expand Down Expand Up @@ -328,3 +328,6 @@ private String hitBasedEviction(boolean makeRoom)
}

// End XmlaOlap4jConcurrentMemoryCache.java



12 changes: 7 additions & 5 deletions src/org/olap4j/driver/xmla/cache/XmlaOlap4jNamedMemoryCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -151,8 +151,8 @@ public String setParameters(
if (props.containsKey(
XmlaOlap4jNamedMemoryCache.Property.NAME.name()))
{
refId = (String)props.get(
XmlaOlap4jNamedMemoryCache.Property.NAME.name());
refId = (String) props.get(
XmlaOlap4jNamedMemoryCache.Property.NAME.name());
} else {
refId = String.valueOf(UUID.randomUUID());
props.put(XmlaOlap4jNamedMemoryCache.Property.NAME.name(), refId);
Expand All @@ -163,8 +163,8 @@ public String setParameters(
synchronized (caches) {
// Create a cache for this URL if it is not created yet
if (!caches.containsKey(
props.get(
XmlaOlap4jNamedMemoryCache.Property.NAME.name())))
props.get(
XmlaOlap4jNamedMemoryCache.Property.NAME.name())))
{
caches.put(
(String) props.get(
Expand Down Expand Up @@ -242,3 +242,5 @@ private void validateState() throws XmlaOlap4jInvalidStateException {
}

// End XmlaOlap4jNamedMemoryCache.java


Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void setCache(
try {
// Loads the cache class
Class clazz = Class.forName(config.get(
XmlaOlap4jDriver.Property.CACHE.name()));
XmlaOlap4jDriver.Property.CACHE.name()));

// Instantiates it
this.cache = (XmlaOlap4jCache) clazz.newInstance();
Expand Down Expand Up @@ -151,8 +151,8 @@ public void setCache(

// implement XmlaOlap4jProxy
public byte[] get(
XmlaOlap4jServerInfos serverInfos,
String request)
XmlaOlap4jServerInfos serverInfos,
String request)
throws XmlaOlap4jProxyException
{
byte[] response = null;
Expand Down Expand Up @@ -226,8 +226,8 @@ private void addToCache(URL url, byte[] request, byte[] response)

// implement XmlaOlap4jProxy
public Future<byte[]> submit(
final XmlaOlap4jServerInfos serverInfos,
final String request)
final XmlaOlap4jServerInfos serverInfos,
final String request)
{
// The submit operation doesn't need to be cached yet, since it will
// call the get operation to fetch the data later on. It will get cached
Expand All @@ -251,3 +251,6 @@ private void initCookieManager() {
}

// End XmlaOlap4jAbstractHttpProxy.java



13 changes: 8 additions & 5 deletions src/org/olap4j/driver/xmla/proxy/XmlaOlap4jCookieManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -105,7 +105,7 @@ public void storeCookies(URLConnection conn) {
if (headerName.equalsIgnoreCase(SET_COOKIE)) {
Map cookie = new ConcurrentHashMap();
StringTokenizer st = new StringTokenizer(
conn.getHeaderField(i), COOKIE_VALUE_DELIMITER);
conn.getHeaderField(i), COOKIE_VALUE_DELIMITER);

// the specification dictates that the first name/value pair
// in the string is the cookie name and value, so let's handle
Expand Down Expand Up @@ -208,12 +208,12 @@ && isNotExpired((String) cookie.get(EXPIRES)))
&& !(cookieStringBuffer.toString().equals("")))
{
System.out.println(
"Using cookie : " + cookieStringBuffer.toString());
"Using cookie : " + cookieStringBuffer.toString());
}
conn.setRequestProperty(COOKIE, cookieStringBuffer.toString());
} catch (java.lang.IllegalStateException ise) {
throw new RuntimeException(
"Illegal State! Cookies cannot be set on a URLConnection that is already connected. Only call setCookies(java.net.URLConnection) AFTER calling java.net.URLConnection.connect().");
"Illegal State! Cookies cannot be set on a URLConnection that is already connected. Only call setCookies(java.net.URLConnection) AFTER calling java.net.URLConnection.connect().");
}
}

Expand Down Expand Up @@ -244,7 +244,7 @@ private boolean comparePaths(String cookiePath, String targetPath) {
} else if (cookiePath.equals("/")) {
return true;
} else if (targetPath.regionMatches(
0, cookiePath, 0, cookiePath.length()))
0, cookiePath, 0, cookiePath.length()))
{
return true;
} else {
Expand All @@ -262,3 +262,6 @@ public String toString() {
}

// End XmlaOlap4jCookieManager.java



Loading

0 comments on commit 57c37b8

Please sign in to comment.