Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6fd03b4

Browse files
committedApr 13, 2011
In XMLA driver, populate Cube.getCaption() by reading CUBE_CAPTION attribute, 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
1 parent 083083d commit 6fd03b4

File tree

4 files changed

+62
-5
lines changed

4 files changed

+62
-5
lines changed
 

‎build.properties

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,24 @@
22
# This software is subject to the terms of the Eclipse Public License v1.0
33
# Agreement, available at the following URL:
44
# http://www.eclipse.org/legal/epl-v10.html.
5-
# Copyright (C) 2007-2009 Julian Hyde and others.
5+
# Copyright (C) 2007-2011 Julian Hyde and others.
66
# All Rights Reserved.
77
# You must accept the terms of that agreement to use this software.
88
#
99
# Modify this file to override build settings. It is read by ant's build.xml.
1010
# See also 'test.properties', which contains settings for the regression
1111
# suite.
1212

13+
# Uncomment one of the following 2 lines. (We use -SNAPSHOT during development,
14+
# so that projects such as mondrian can run on the very latest; we switch for a
15+
# specific revision number near to a release. Change 'xxx' the latest subversion
16+
# change number; and put the same number in 'project.revision.minor'.)
1317
project.revision=1.0-SNAPSHOT
18+
#project.revision=1.0.0.xxx
19+
1420
project.revision.major=1
1521
project.revision.minor=0000445
22+
1623
ivy.artifact.id=olap4j
1724
ivy.artifact.group=org.olap4j
1825
impl.title=olap4j
@@ -23,4 +30,8 @@ build.dir=build
2330

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

33+
# Uncomment to use yDoc doclet for enhanced javadoc (requires commercial
34+
# license).
35+
#ydoc.home=/usr/local/ydoc-3.0-jdk1.5
36+
2637
# End build.properties

‎build.xml

+40-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ${src.dir}/org/olap4j/mdx/parser/impl/DefaultMdxParserSym.java" />
5050

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

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

433+
<!--
434+
Generate javadoc with embedded UML diagrams using the yDoc doclet from
435+
yWorks.com. Set ydoc.home in build.properties, then replace
436+
${ydoc.home}/resources/ydoc.license with a full license (free for open
437+
source use).
438+
-->
439+
<target name="javadoc-with-ydoc" depends="clean-stray-package-html">
440+
<mkdir dir="${javadoc.dir}" />
441+
<delete quiet="true" file="${javadoc.dir}/index.html" />
442+
<property name="ps" value="${path.separator}" />
443+
<javadoc sourcepath="${src.dir}" classpathref="javadoc.classpath"
444+
destdir="${javadoc.dir}" packagenames="org.olap4j.*"
445+
excludepackagenames="org.olap4j.impl.*,org.olap4j.mdx.parser.impl.*,org.olap4j.sample.*"
446+
overview="${src.dir}/overview.html"
447+
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;"
448+
author="true" source="1.5" access="public"
449+
Windowtitle="olap4j, version ${project.revision}" additionalparam="-linksource">
450+
<tag name="pre" description="Pre-condition:" scope="constructors,methods" />
451+
<tag name="post" description="Post-condition:" scope="constructors,methods" />
452+
<tag name="testcase" description="Test-case:" scope="constructors,methods,types" />
453+
<link href="http://download.oracle.com/javase/6/docs/api/" />
454+
<link href="http://junit.sourceforge.net/javadoc/" />
455+
<doclet name="ydoc.doclets.YStandard"
456+
path="${ydoc.home}/lib/ydoc.jar${ps}${ydoc.home}/lib/class2svg.jar${ps}${ydoc.home}/resources${ps}${ydoc.home}/doc">
457+
<param name="-author" />
458+
<param name="-generic" />
459+
<param name="-umlautogen" />
460+
<param name="-tag" value="y.precondition" />
461+
<param name="-tag" value="y.postcondition" />
462+
<param name="-tag" value="y.complexity" />
463+
<param name="-tag" value="param" />
464+
<param name="-tag" value="return" />
465+
<param name="-tag" value="see" />
466+
<param name="-tag" value="y.uml" />
467+
</doclet>
468+
</javadoc>
469+
</target>
470+
433471
<target name="javadoc-pdf" depends="clean-stray-package-html">
434472
<javadoc sourcepath="${src.dir}" classpathref="javadoc.classpath"
435473
packagenames="org.olap4j.*"

‎src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1079,10 +1079,14 @@ public void handle(
10791079
// IS_DRILLTHROUGH_ENABLED, IS_WRITE_ENABLED, IS_LINKABLE,
10801080
// IS_SQL_ENABLED
10811081
String cubeName = stringElement(row, "CUBE_NAME");
1082+
String caption = stringElement(row, "CUBE_CAPTION");
1083+
if (caption == null) {
1084+
caption = cubeName;
1085+
}
10821086
String description = stringElement(row, "DESCRIPTION");
10831087
list.add(
10841088
new XmlaOlap4jCube(
1085-
context.olap4jSchema, cubeName, description));
1089+
context.olap4jSchema, cubeName, caption, description));
10861090
}
10871091
}
10881092

‎src/org/olap4j/driver/xmla/XmlaOlap4jCube.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class XmlaOlap4jCube implements Cube, Named
2828
{
2929
final XmlaOlap4jSchema olap4jSchema;
3030
private final String name;
31+
private final String caption;
3132
private final String description;
3233

3334
final NamedList<XmlaOlap4jDimension> dimensions;
@@ -48,19 +49,22 @@ class XmlaOlap4jCube implements Cube, Named
4849
*
4950
* @param olap4jSchema Schema
5051
* @param name Name
52+
* @param caption Caption
5153
* @param description Description
5254
* @throws org.olap4j.OlapException on error
5355
*/
5456
XmlaOlap4jCube(
5557
XmlaOlap4jSchema olap4jSchema,
5658
String name,
59+
String caption,
5760
String description) throws OlapException
5861
{
5962
assert olap4jSchema != null;
6063
assert description != null;
6164
assert name != null;
6265
this.olap4jSchema = olap4jSchema;
6366
this.name = name;
67+
this.caption = caption;
6468
this.description = description;
6569
final Map<String, XmlaOlap4jMeasure> measuresMap =
6670
new HashMap<String, XmlaOlap4jMeasure>();
@@ -118,7 +122,7 @@ public String getUniqueName() {
118122
}
119123

120124
public String getCaption() {
121-
return name;
125+
return caption;
122126
}
123127

124128
public String getDescription() {

0 commit comments

Comments
 (0)
Please sign in to comment.