diff --git a/doc/images/spacer.png b/doc/images/spacer.png new file mode 100644 index 0000000..55e77fc Binary files /dev/null and b/doc/images/spacer.png differ diff --git a/doc/olap4j_fs.html b/doc/olap4j_fs.html index bdaad23..c410279 100644 --- a/doc/olap4j_fs.html +++ b/doc/olap4j_fs.html @@ -1,8 +1,9 @@ + - -olap4j Specification + +olap4j Specification - - +

olap4j Specification

-

Authors: Julian Hyde, Barry Klawans
-Version: 0.9.7 (beta)
+

Authors: Julian Hyde, Barry Klawans
+Version: 1.0
Revision: $Id$ -(log)
-Last modified: June 25th, 2009.

-
+(log)
+Last modified: April 9th, 2011.

+

Contents

    -
  1. Introduction
      -
    1. A brief history of OLAP - standards
    2. -
    3. Overview of olap4j
    4. -
    5. Relationship to other standards
        -
      1. olap4j and XML/A
      2. -
      3. olap4j is built on - other standards
      4. -
      -
    6. -
    7. Benefits of a - standard Java API for OLAP
    8. -
    9. Architecture of olap4j
    10. -
    11. Compatibility
    12. -
    13. Compliance levels
    14. -
    -
  2. -
  3. Components of the API
      -
    1. Driver management
        -
      1. The Driver class
      2. -
      3. The DriverManager class
      4. -
      5. The DataSource interface
      6. -
      7. The OlapDataSource interface
      8. -
      9. The OlapException class
      10. -
      -
    2. -
    3. Connections
        -
      1. Connection pooling
      2. -
      3. The OlapConnection interface
      4. -
      5. The OlapWrapper interface
      6. -
      7. The OlapDatabaseMetaData interface
      8. -
    4. -
    5. Statements
        -
      1. The OlapStatement interface
      2. -
      3. The PreparedOlapStatement interface
      4. -
      5. The OlapParameterMetaData interface
      6. -
      7. The CellSet interface
      8. -
      9. The CellSetAxis interface
      10. -
      11. The Axis enum
      12. -
      13. The CellSetAxisMetaData interface
      14. -
      15. The Position interface
      16. -
      17. The Cell interface
      18. -
      19. The CellSetMetaData interface
      20. -
    6. -
    7. MDX parse tree model
        -
      1. The ParseTreeWriter class
      2. -
    8. -
    9. MDX parser
    10. -
    11. MDX type model
    12. -
    13. Metadata
        -
      1. Access control
      2. -
      3. Metadata objects
          -
        1. The MetadataElement interface
        2. -
        3. The Catalog interface
        4. -
        5. The Schema interface
        6. -
        7. The Cube interface
        8. -
        9. The Dimension interface
        10. -
        11. The Hierarchy interface
        12. -
        13. The Level interface
        14. -
        15. The Member interface
        16. -
        17. The Measure interface
        18. -
        19. The Property interface
        20. -
        21. The NamedSet interface
        22. -
        23. The Datatype enum
        24. -
      4. -
      5. - The OlapDatabaseMetaData interface, and schema result sets
          -
        1. The getDatasources method
        2. -
        3. The getDatabaseProperties method
        4. -
        5. The getLiterals method
        6. -
        7. The getCubes method
        8. -
        9. The getDimensions method
        10. -
        11. The getFunctions method
        12. -
        13. The getHierarchies method
        14. -
        15. The getLevels method
        16. -
        17. The getMeasures method
        18. -
        19. The getMembers method
        20. -
        21. The getProperties method
        22. -
        23. The getSets method
        24. -
      6. -
      7. Other methods
      8. -
    14. -
    15. Transform
    16. -
        -
      1. Query model details
      2. -
      3. Navigation actions
      4. -
          -
        1. Slicing navigations
        2. -
        3. Restructuring navigations
        4. -
        5. Drilling navigations
        6. -
        7. Scoping navigations
        8. -
        -
      5. Open issues
      6. -
      -
    17. Layout
    18. -
    -
  4. -
  5. Other topics
      -
    1. Internationalization
    2. -
    3. Concurrency and thread-safety
    4. -
    5. Canceling statements
    6. -
    -
  6. -
  7. Other components
      -
    1. Test suite
    2. -
    3. XML/A provider
    4. -
    -
  8. -
  9. Non-functionality
  10. -
  11. Related projects
      -
    1. Mondrian provider
    2. -
    3. XML for Analysis provider
    4. -
    5. Other data sources
    6. -
    -
  12. -
  13. Appendix A. Opportunities for - specification
  14. -
  15. Appendix B. Feedback
  16. -
  17. Appendix C. Open issues
  18. -
  19. Appendix D. Miscellaneous
  20. -
  21. Appendix E. References
  22. -
  23. Appendix F. Change log
  24. + +
  25. Introduction +
      +
    1. A brief history +of OLAP standards
    2. +
    3. Overview of olap4j
    4. +
    5. Relationship to +other standards +
        +
      1. olap4j and XML/A
      2. +
      3. olap4j is +built on other standards
      4. +
      +
    6. +
    7. Benefits +of a standard Java API for OLAP
    8. +
    9. Architecture of olap4j
    10. +
    11. Compatibility
    12. +
    13. Compliance levels
    14. +
    +
  26. +
  27. Components of the API +
      +
    1. Driver management +
        +
      1. The Driver class
      2. +
      3. The DriverManager class
      4. +
      5. The DataSource +interface
      6. +
      7. The +OlapDataSource interface
      8. +
      9. The OlapException class
      10. +
      +
    2. +
    3. Connections +
        +
      1. Connection pooling
      2. +
      3. The OlapConnection interface
      4. +
      5. The OlapWrapper +interface
      6. +
      7. The +OlapDatabaseMetaData interface
      8. +
      +
    4. +
    5. Statements +
        +
      1. The OlapStatement interface
      2. +
      3. The +PreparedOlapStatement interface
      4. +
      5. The +OlapParameterMetaData interface
      6. +
      7. The CellSet interface
      8. +
      9. The CellSetAxis interface
      10. +
      11. The Axis enum
      12. +
      13. The +CellSetAxisMetaData interface
      14. +
      15. The Position interface
      16. +
      17. The Cell interface
      18. +
      19. The +CellSetMetaData interface
      20. +
      +
    6. +
    7. MDX parse tree model +
        +
      1. The ParseTreeWriter +class
      2. +
      +
    8. +
    9. MDX parser
    10. +
    11. MDX type model
    12. +
    13. Metadata +
        +
      1. Access control
      2. +
      3. Metadata objects +
          +
        1. The MetadataElement +interface
        2. +
        3. The Database interface
        4. +
        5. The Catalog interface
        6. +
        7. The Schema interface
        8. +
        9. The Cube interface
        10. +
        11. The Dimension interface
        12. +
        13. The Hierarchy interface
        14. +
        15. The Level interface
        16. +
        17. The Member interface
        18. +
        19. The Measure interface
        20. +
        21. The Property interface
        22. +
        23. The NamedSet interface
        24. +
        25. The Datatype enum
        26. +
        +
      4. +
      5. The +OlapDatabaseMetaData interface, and schema result sets +
          +
        1. The getDatabases method
        2. +
        3. The +getDatabaseProperties method
        4. +
        5. The getLiterals method
        6. +
        7. The getCubes method
        8. +
        9. The getDimensions method
        10. +
        11. The getFunctions method
        12. +
        13. The getHierarchies method
        14. +
        15. The getLevels method
        16. +
        17. The getMeasures method
        18. +
        19. The getMembers method
        20. +
        21. The getProperties method
        22. +
        23. The getSets method
        24. +
        +
      6. +
      7. Other methods
      8. +
      +
    14. +
    15. Transform +
        +
      1. Query model details
      2. +
      3. Navigation actions +
          +
        1. Slicing navigations
        2. +
        3. Restructuring +navigations
        4. +
        5. Drilling navigations
        6. +
        7. Scoping navigations
        8. +
        +
      4. +
      5. Open issues
      6. +
      +
    16. +
    17. Layout
    18. +
    19. Scenarios
    20. +
    21. Notifications
    22. +
    23. Drill through
    24. +
    +
  28. +
  29. Other topics +
      +
    1. Internationalization
    2. +
    3. Concurrency and +thread-safety
    4. +
    5. Canceling statements
    6. +
    +
  30. +
  31. Other components +
      +
    1. Test suite
    2. +
    3. XML/A provider
    4. +
    +
  32. +
  33. Non-functionality
  34. +
  35. Related projects +
      +
    1. Mondrian provider
    2. +
    3. XML for Analysis provider
    4. +
    5. Other data sources
    6. +
    +
  36. +
  37. Appendix A. +Opportunities for specification
  38. +
  39. Appendix B. Feedback
  40. +
  41. Appendix C. Open issues
  42. +
  43. Appendix D. Miscellaneous
  44. +
  45. Appendix E. References
  46. +
  47. Appendix F. Change log
+

1. Introduction

olap4j is an open Java API for building OLAP applications.

@@ -291,9 +331,15 @@

1.2. Overview of olap4j

higher-level query model, which includes operations to transform queries (also called 'navigations'), and facilities to layout multidimensional results as HTML tables.

-

1.3. Relationship to other standards

+

There are experimental modules in olap4j for scenarios (also +called 'what-if' analysis, or 'writeback') and notifications, +pushed from the server to the client when the data set on the server +changes.

+ +

1.3. Relationship to +other standards

-

1.3.1. olap4j and XML/A

+

1.3.1. olap4j and XML/A

At this point, you may be saying: what about XML/A? XML/A was here first, is an open standard, and is supported by a number of servers. Is olap4j an attempt to @@ -320,7 +366,16 @@

1.3.1. olap4j and XML/A

XML/A provider to connect to the underlying data source, execute queries, and browse metadata, but can still use olap4j's features for MDX parsing, query models and layout.

-

1.3.2. olap4j is built on other + +

The metamodels of olap4j and XML/A are similar. Both contain +schemas, cubes, dimensions, et cetera. Where possible, olap4j uses the +same terminology for entity and attribute names. This simplifies the +job of creating an XML/A driver for olap4j, and also makes possible an +XML/A -to-olap4j bridge (a server that answers XML/A requests by +querying an underlying olap4j data source).

+ +

1.3.2. olap4j is +built on other standards

Where possible, olap4j leverages existing standards. This has several advantages. First, an end-user familiar with the existing standards can come up @@ -375,13 +430,14 @@

1.6. Compatibility

olap4j requires JDK 1.5 or higher, in particular because it uses the generics and enum features introduced in JDK 1.5.0.

+

olap4j works best against JDK 1.6 or higher, because it makes use of the - -java.sql.Wrapper interface. In earlier Java versions, the same functionality +java.sql.Wrapper +interface. In earlier Java versions, the same functionality is available by casting objects to the built-in OlapWrapper interface.

-

JDK 1.4 compatibility will be available on demand, using the +

JDK 1.4 compatibility will be available on demand, using the Retroweaver utility. This will consist of a retrowoven JAR file, olap4j-jdk1.4.jar and retroweaver's runtime library retroweaver-rt-1.2.4.jar. (See @@ -389,54 +445,61 @@

1.6. Compatibility

olap4j's JDBC support is consistent with JDBC version 3.0 (which was introduced in JDK 1.4 and is also in JDK 1.5) and also with JDBC version 4.0 (introduced in JDK 1.6).

+

1.7. Compliance levels

-

There are two compliance levels to which a driver can support olap4j. olap4j -is a rich specification, and it takes a considerable effort to implement it -fully, but applications can still be built on a driver which only implements the -core parts of the specification. The lower level allows a vendor to a subset of -the specification without the significant investment of a fully-compliant + +

There are two compliance levels to which a driver can support olap4j. olap4j +is a rich specification, and it takes a considerable effort to implement it +fully, but applications can still be built on a driver which only implements the +core parts of the specification. The lower level allows a vendor to a subset of +the specification without the significant investment of a fully-compliant driver.

+

The compliance levels are as follows:

+ +

MDX language compliance

-

All olap4j drivers must implement the fundamental features of the MDX -language, but olap4j compliance levels do not imply a particular degree of -support for the MDX language.

+ +

All olap4j drivers must implement the fundamental features of the +MDX language, but olap4j compliance levels do not imply a particular +degree of support for the MDX language.

+

The fundamental features of MDX are:

+ -

Of course, a provider may implement a larger subset of MDX, and -most do. A provider can describe its MDX compliance level by describing the -additional features it supports (e.g. WITH MEMBER, WITH SET, NON EMPTY, and -HAVING clauses in queries; virtual cubes; and calculated members and sets + +

Of course, a provider may implement a larger subset of MDX, and +most do. A provider can describe its MDX compliance level by describing the +additional features it supports (e.g. WITH MEMBER, WITH SET, NON EMPTY, and +HAVING clauses in queries; virtual cubes; and calculated members and sets defined against cubes) and additional functions and operators implemented.

-

-2. -Components of the API

+

2. Components of the API

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

@@ -450,47 +513,65 @@

2.1. Driver management

connection pooling, driver registration.

Classes:

+

2.1.1. The Driver class

Same functionality as JDBC.

+

Here is an example of registering an olap4j driver:

Class.forName("mondrian.olap4j.MondrianOlap4jDriver");
+

Note that this is the same as you would write for any JDBC driver. +From JDBC 4.0 (JDK 1.6) onwards, compliant JDBC drivers register +themselves +automatically by creating an entry in their JAR file's +META-INF/services/java.sql.Driver file. +Compliant olap4j drivers register themselves in the same way.

+

2.1.2. The DriverManager class

Same functionality as JDBC.

+

2.1.3. The DataSource interface

+

Same functionality as JDBC.

-

2.1.4. The OlapDataSource interface

-

Extension to DataSource that returns OlapConnection + +

See also: Database.

+ +

2.1.4. The OlapDataSource +interface

+ +

Extension to DataSource that returns OlapConnection objects rather than mere java.sql.Connection objects.

+

2.1.5. The OlapException class

-

OlapException + +

OlapException (extends - -java.sql.SQLException) describes an error which occurred while accessing an -OLAP server.

-

Since olap4j extends JDBC, it is natural that OlapException should extend -JDBC's - -SQLException. The implementation by an olap4j
-driver of a JDBC method which is declared to throw a SQLException may, if the -driver chooses, throw instead an OlapException.
-
-OlapException provides some additional information to help an OLAP client -identify the location of the error. The context is the Cell -or Position object where the error occurred. The region is an -object representing the textual region in the MDX statement.

+java.sql.SQLException) +describes an error which occurred while accessing an OLAP server.

+ +

Since olap4j extends JDBC, it is natural that OlapException should +extend JDBC's +SQLException. +The implementation by an olap4j driver of a JDBC method which is declared to throw a SQLException may, +if the driver chooses, throw instead an OlapException.

+ +

OlapException provides some additional information to help an OLAP +client identify the location of the error. The context is +the Cell or Position object where the error occurred. The region +is an object representing the textual region in the MDX statement.

+

Methods:

+