diff --git a/doc/olap4j_fs.html b/doc/olap4j_fs.html index 22c6ae7..29487c8 100644 --- a/doc/olap4j_fs.html +++ b/doc/olap4j_fs.html @@ -192,7 +192,7 @@

Contents

  • Non-functionality
  • Related projects
    1. Mondrian provider
    2. -
    3. JPivot
    4. +
    5. XML for Analysis provider
    6. Other data sources
  • @@ -208,7 +208,7 @@

    1. Introduction

    olap4j is an open Java API for building OLAP applications.

    -

    In essence, olap4j is to multidimensional data JDBC is for relational data. +

    In essence, olap4j is to multidimensional data what JDBC is for relational data. olap4j has a similar programming model to JDBC, shares some of its core classes, and has many of the same advantages. You can write an OLAP application in Java for one @@ -390,7 +390,7 @@

    We now describe the olap4j API in more detail, by breaking it down into a set of functional areas.

    -olap4j components +olap4j components

    2.1. Driver management

    @@ -3259,12 +3259,12 @@

    3.2. XML/A provider

    4. Non-functionality

    Here are some of the areas of functionality which will not be part of -the olap4j project:

    +olap4j:

    + * + * @return Ordinal of this Cell */ int getOrdinal(); @@ -56,14 +58,22 @@ public interface Cell { * getResult().ordinalToCoordinateList(getOrdinal()) * * + * + * @return Coordinates of this Cell */ List getCoordinateList(); /** * Returns the value of a given property for this Cell. * - * @see org.olap4j.CellSet#getMetaData() - * @see Todo + *

    The list of allowable properties may be obtained by calling + * {@link org.olap4j.CellSet#getMetaData()} followed by + * {@link CellSetMetaData#getCellProperties()}.

    + * + * @param property Property whose value to retrieve + * + * @return Value of the given property for this Cell; if the property is + * not set, returns null */ Object getPropertyValue(Property property); @@ -91,20 +101,40 @@ public interface Cell { /** * Returns the value of this cell as a double value. * + *

    Not all values can be represented as using the Java + * double, therefore for some providers, {@link #getValue()} + * may return a more accurate result. + * + * @return The value of this cell; if the cell is null, the + * returns 0 + * * @throws OlapException if this cell does not have a numeric value */ double getDoubleValue() throws OlapException; /** - * @see Todo + * Returns the error message of this Cell, or null if the cell is not + * in error. + * + *

    If the cell is an error, the value will be an {@link OlapException}. + * (This value is returned, not thrown.) + * + * @return value of this Cell */ String getErrorText(); /** - * @see Todo + * Returns the value of this Cell. + * + *

    If the cell is an error, the value will be an {@link OlapException}. + * (This value is returned, not thrown.) * - * Returns (does not throw) an {@link OlapException} if the cell is an - * error. + *

    If the cell has a numeric value, returns an object which implements + * the {@link Number} interface. + * + * @see #getDoubleValue() + * + * @return value of this Cell */ Object getValue(); @@ -120,6 +150,8 @@ public interface Cell { /** * Drills through from this cell to the underlying fact table data, * and returns a {@link java.sql.ResultSet} of the results. + * + * @return result set of the fact rows underlying this Cell */ ResultSet drillThrough(); } diff --git a/src/org/olap4j/metadata/Level.java b/src/org/olap4j/metadata/Level.java index eec8b68..0f40169 100644 --- a/src/org/olap4j/metadata/Level.java +++ b/src/org/olap4j/metadata/Level.java @@ -58,8 +58,14 @@ public interface Level extends MetadataElement { // todo: needs specification Member findMember(String memberName); - // todo: better query interface? (level can have a lot of members) - // todo: return NamedList? + /** + * Returns a list of Member objects which belong to this Level. + * + *

    Some levels have a very many members. In this case, calling this + * method may be expensive in space and/or time and is not recommended. + * + * @return List of members in this level + */ List getMembers(); /** diff --git a/src/org/olap4j/metadata/Member.java b/src/org/olap4j/metadata/Member.java index 429262c..ea14fdf 100644 --- a/src/org/olap4j/metadata/Member.java +++ b/src/org/olap4j/metadata/Member.java @@ -139,9 +139,8 @@ private Type(int ordinal) { * *

    Every member has certain system properties such as "name" and * "caption" (the full list is described in the {@link Property} - * ({@link org.olap4j.Todo todo: move Property}) * enumeration), as well as extra properties defined for its Level - * (see {@link Level#getProperties()} + * (see {@link Level#getProperties()}).

    * * @see #getPropertyValue(String) */ diff --git a/src/org/olap4j/query/QueryDimension.java b/src/org/olap4j/query/QueryDimension.java index e78a8b1..88c5bda 100644 --- a/src/org/olap4j/query/QueryDimension.java +++ b/src/org/olap4j/query/QueryDimension.java @@ -85,8 +85,13 @@ public void clearSelections() { selections.clear(); } - public Selection createSelection(String hierarchyName, String levelName, String memberName) { - return createSelection(hierarchyName, levelName, memberName, Selection.Operator.MEMBER); + public Selection createSelection( + String hierarchyName, + String levelName, + String memberName) + { + return createSelection( + hierarchyName, levelName, memberName, Selection.Operator.MEMBER); } public Selection createSelection( @@ -102,7 +107,9 @@ public Selection createSelection( if (level != null) { Member member = level.findMember(memberName); if (member != null) { - selection = query.getSelectionFactory().createMemberSelection(member); + selection = + query.getSelectionFactory() + .createMemberSelection(member); } } } diff --git a/testsrc/org/olap4j/ConnectionTest.java b/testsrc/org/olap4j/ConnectionTest.java index ff27245..5344809 100644 --- a/testsrc/org/olap4j/ConnectionTest.java +++ b/testsrc/org/olap4j/ConnectionTest.java @@ -808,10 +808,6 @@ public void testUnparsing() { } - /** - * Tests access control. The metadata (e.g. members & hierarchies) should - * reflect what the current user/role can see. For example, USA.CA.SF has no children. - */ /** * Abstracts the information about specific drivers and database instances * needed by this test. This allows the same test suite to be used for