Skip to content

Commit

Permalink
In XMLA driver, populate Cube.getCaption() by reading CUBE_CAPTION at…
Browse files Browse the repository at this point in the history
…tribute, if present.

Restore javadoc-with-ydoc target.
Tweaks to web page.


git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@448 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Apr 13, 2011
1 parent 083083d commit 6fd03b4
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 5 deletions.
13 changes: 12 additions & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@
# 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-2009 Julian Hyde and others.
# Copyright (C) 2007-2011 Julian Hyde and others.
# All Rights Reserved.
# You must accept the terms of that agreement to use this software.
#
# Modify this file to override build settings. It is read by ant's build.xml.
# See also 'test.properties', which contains settings for the regression
# suite.

# Uncomment one of the following 2 lines. (We use -SNAPSHOT during development,
# so that projects such as mondrian can run on the very latest; we switch for a
# specific revision number near to a release. Change 'xxx' the latest subversion
# change number; and put the same number in 'project.revision.minor'.)
project.revision=1.0-SNAPSHOT
#project.revision=1.0.0.xxx

project.revision.major=1
project.revision.minor=0000445

ivy.artifact.id=olap4j
ivy.artifact.group=org.olap4j
impl.title=olap4j
Expand All @@ -23,4 +30,8 @@ build.dir=build

ivy.repository.publish=http://repo.pentaho.org/artifactory

# Uncomment to use yDoc doclet for enhanced javadoc (requires commercial
# license).
#ydoc.home=/usr/local/ydoc-3.0-jdk1.5

# End build.properties
42 changes: 40 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ${src.dir}/org/olap4j/mdx/parser/impl/DefaultMdxParserSym.java" />

<!-- Override to create a proper release. -->
<target name="dist"
depends="clean,version-properties,jar,tck-jar,xmla-jar,javadoc,javadoc-pdf,jar-jdk14,source.zip"
depends="clean,version-properties,jar,tck-jar,xmla-jar,javadoc,javadoc-pdf,javadoc-with-ydoc,jar-jdk14,source.zip"
description="Creates a distribution">
<zip zipfile="${dist.dir}/${zip.filename}">
<zipfileset dir="${basedir}/doc" prefix="${ivy.artifact.id}-${project.revision}/doc"
Expand All @@ -68,7 +68,7 @@ VERSION.txt" />
</zip>
</target>

<target name="doczip" depends="clean-all,clean-tests,compile,compile-tests,version-properties,javadoc,javadoc-pdf"
<target name="doczip" depends="clean-all,clean-tests,compile,compile-tests,version-properties,javadoc,javadoc-pdf,javadoc-with-ydoc"
description="Creates an archive of all docs to deploy on www.olap4j.org.
See also doc/deployDoc.sh.">
<mkdir dir="${dist.dir}" />
Expand Down Expand Up @@ -430,6 +430,44 @@ class XmlaOlap4jDriverVersion {
</javadoc>
</target>

<!--
Generate javadoc with embedded UML diagrams using the yDoc doclet from
yWorks.com. Set ydoc.home in build.properties, then replace
${ydoc.home}/resources/ydoc.license with a full license (free for open
source use).
-->
<target name="javadoc-with-ydoc" depends="clean-stray-package-html">
<mkdir dir="${javadoc.dir}" />
<delete quiet="true" file="${javadoc.dir}/index.html" />
<property name="ps" value="${path.separator}" />
<javadoc sourcepath="${src.dir}" classpathref="javadoc.classpath"
destdir="${javadoc.dir}" packagenames="org.olap4j.*"
excludepackagenames="org.olap4j.impl.*,org.olap4j.mdx.parser.impl.*,org.olap4j.sample.*"
overview="${src.dir}/overview.html"
footer="&lt;a href=&quot;http://sourceforge.net/projects/olap4j&quot;&gt;&lt;img src=&quot;http://sourceforge.net/sflogo.php?group_id=168953&#38;type=1&quot; width=&quot;88&quot; height=&quot;31&quot; border=&quot;0&quot; alt=&quot;SourceForge.net_Logo&quot;&gt;&lt;/a&gt;"
author="true" source="1.5" access="public"
Windowtitle="olap4j, version ${project.revision}" additionalparam="-linksource">
<tag name="pre" description="Pre-condition:" scope="constructors,methods" />
<tag name="post" description="Post-condition:" scope="constructors,methods" />
<tag name="testcase" description="Test-case:" scope="constructors,methods,types" />
<link href="http://download.oracle.com/javase/6/docs/api/" />
<link href="http://junit.sourceforge.net/javadoc/" />
<doclet name="ydoc.doclets.YStandard"
path="${ydoc.home}/lib/ydoc.jar${ps}${ydoc.home}/lib/class2svg.jar${ps}${ydoc.home}/resources${ps}${ydoc.home}/doc">
<param name="-author" />
<param name="-generic" />
<param name="-umlautogen" />
<param name="-tag" value="y.precondition" />
<param name="-tag" value="y.postcondition" />
<param name="-tag" value="y.complexity" />
<param name="-tag" value="param" />
<param name="-tag" value="return" />
<param name="-tag" value="see" />
<param name="-tag" value="y.uml" />
</doclet>
</javadoc>
</target>

<target name="javadoc-pdf" depends="clean-stray-package-html">
<javadoc sourcepath="${src.dir}" classpathref="javadoc.classpath"
packagenames="org.olap4j.*"
Expand Down
6 changes: 5 additions & 1 deletion src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -1079,10 +1079,14 @@ public void handle(
// IS_DRILLTHROUGH_ENABLED, IS_WRITE_ENABLED, IS_LINKABLE,
// IS_SQL_ENABLED
String cubeName = stringElement(row, "CUBE_NAME");
String caption = stringElement(row, "CUBE_CAPTION");
if (caption == null) {
caption = cubeName;
}
String description = stringElement(row, "DESCRIPTION");
list.add(
new XmlaOlap4jCube(
context.olap4jSchema, cubeName, description));
context.olap4jSchema, cubeName, caption, description));
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/org/olap4j/driver/xmla/XmlaOlap4jCube.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class XmlaOlap4jCube implements Cube, Named
{
final XmlaOlap4jSchema olap4jSchema;
private final String name;
private final String caption;
private final String description;

final NamedList<XmlaOlap4jDimension> dimensions;
Expand All @@ -48,19 +49,22 @@ class XmlaOlap4jCube implements Cube, Named
*
* @param olap4jSchema Schema
* @param name Name
* @param caption Caption
* @param description Description
* @throws org.olap4j.OlapException on error
*/
XmlaOlap4jCube(
XmlaOlap4jSchema olap4jSchema,
String name,
String caption,
String description) throws OlapException
{
assert olap4jSchema != null;
assert description != null;
assert name != null;
this.olap4jSchema = olap4jSchema;
this.name = name;
this.caption = caption;
this.description = description;
final Map<String, XmlaOlap4jMeasure> measuresMap =
new HashMap<String, XmlaOlap4jMeasure>();
Expand Down Expand Up @@ -118,7 +122,7 @@ public String getUniqueName() {
}

public String getCaption() {
return name;
return caption;
}

public String getDescription() {
Expand Down

0 comments on commit 6fd03b4

Please sign in to comment.