Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-04


Oracle® OLAP Analytic Workspace Java API Reference.

See:
          Description

Packages
oracle.AWAction Contains classes that define actions to perform on an analytic workspace.
oracle.AWXML Contains classes that define a logical object model and instantiate it in an analytic workspace.

 

Oracle® OLAP Analytic Workspace Java API Reference.

November 14, 2007

This is the reference documentation for the Oracle OLAP Analytic Workspace Java API, a Java application programming interface for creating and maintaining standard form analytic workspaces within the Oracle Database. The API implements a multidimensional object model and provides tools for instantiating the model in an analytic workspace. An object hierarchy defines a set of ownership relationships between objects in the model.

Intended Audience

This documentation is intended for Java programmers who are responsible for creating applications that build and maintain analytic workspaces. It assumes that you are already familiar with Java, Oracle OLAP, and data warehousing concepts.

The Oracle OLAP Java API is a companion API for generating OLAP queries of analytic workspaces and relational data warehouses. For information on the Oracle OLAP Java API, see Oracle OLAP Developer's Guide to the OLAP API and Oracle OLAP Java API Reference.

Two Deployment Modes

The Oracle OLAP Analytic Workspace Java API supports two deployment modes. You can use it in creating a Java application, or you can use it to generate XML that is executable by a PL/SQL function. The XML storage capability makes the API available to any application that can connect to an Oracle Database and execute a stored procedure.

The functionality of the API is identical whether executed through Java or through PL/SQL. The same Java code that runs on the client and executes through JDBC also runs within Oracle Database JVM and executes directly within the database. When you install Oracle Database with the OLAP option, the Oracle OLAP Analytic Workspace Java API is automatically loaded along with all the other OLAP server-side components.

Creating or executing Oracle OLAP Analytic Workspace Java API applications within the Oracle Java Virtual Machine (JVM) may require the following Java permissions, in addition to the OLAP_USER role:

Permission Type Action
java.io.FilePermission read, write, execute
java.util.PropertyPermission read, write
java.net.SocketPermission connect, resolve
java.lang.RuntimePermission null

You can grant these permissions in either Java or SQL. For more information about Oracle JVM security and Java permissions, see Oracle Database Java Developer's Guide.

Advantages of the Oracle OLAP Analytic Workspace Java API

Applications created with the Oracle OLAP Analytic Workspace Java API offer several advantages:

Using the Oracle OLAP Analytic Workspace Java API in a Java Application

You can use the Oracle OLAP Analytic Workspace Java API to build client applications that connect to an Oracle Database instance through a JDBC connection. Both thick and thin connections are supported.

The AWXML package provides the classes that build an OLAP object model. Many of the classes have methods for generating XML. These are not needed in Java applications, however you can use them if you want your application to save the object definitions in addition to (or instead of) executing them dynamically. If you choose to create XML, then use the AWAction package to assemble the XML definitions into logical units of work. The AWXML package includes a class you can use to parse the stored XML and restore the objects in memory.

This documentation refers to a sample program, BuildAWExample.java, that demonstrates defining and building an analytic workspace using the Oracle OLAP Analytic Workspace Java API. The program uses data from relational tables in the Global sample schema. You can download a zip file, examples.zip, that contains the BuildAWExample.java from the Oracle Technology Network Web site at http://www.oracle.com/technology/products/bi/olap/olap.html. To download the examples, in the Documentation section see Example Programs for Documentation.

From the same OTN web site, you can download a zip file that contains the SQL scripts and other files that create the Global schema. To download the appropriate version of the sample schema for this release, in the Documentation section see Sample Schemas for Documentation.

The BuildAWExample.java program defines an analytic workspace containing two logical cubes: a UNITS_CUBE_AW cube dimensioned by the TIME_AW, CUSTOMER_AW, PRODUCT_AW, and CHANNEL_AW dimensions, and the PRICE_COST_CUBE_AW cube dimensioned by TIME_AW and PRODUCT_AW. For an outline of the sequence of Oracle OLAP Analytic Workspace Java API object creation and use in the example program, see Steps In Creating An Analytic Workspace.

Using the Oracle OLAP Analytic Workspace Java API to Generate XML

You can use the Oracle OLAP Analytic Workspace Java API to generate XML documents that serialize the object model for execution by a PL/SQL function. In this case, the database commands generated by the API execute directly within the Oracle Database instance, and not through a database connection.

To create XML for execution in an Oracle Database, use the AWXML package to build the object model and generate the XML that defines the objects. Use the AWAction package to build logical units of work into the XML. To instantiate the XML, provide the XML file as input to the EXECUTEFILE PL/SQL function in the DBMS_AW_XML package. That function passes the input to the Oracle OLAP Analytic Workspace Java API running within the database JVM. The API parses the string and restores the Java objects in memory. For more information on the EXECUTEFILE function, see Oracle OLAP Reference.

Before You Begin

To use the Oracle OLAP Analytic Workspace Java API, you need the following:

The OLAP-enabled Database provides the Oracle OLAP Analytic Workspace Java API class libraries as a JAR file. To use the API, copy awxml.jar to the computer on which you develop your Java applications, or otherwise make it accessible to your development environment. In addition to awxml.jar, the OLAP API and certain Oracle JDBC JAR files are also required. You must use the JDBC files included in your Oracle Database installation and not those from another Oracle product or from another vendor.

The following table lists the required class libraries with their locations under the ORACLE_HOME directory.

File Name Location
  awxml.jar   /olap/api/lib
  olap_api.jar   /olap/api/lib
  ojdbc14.jar   /jdbc/lib
  xmlparserv2.jar   /lib

For information on Oracle JDBC, see Oracle JDBC Developer's Guide and Reference.

For information on installing an Oracle Database with the OLAP option, see your Oracle Database installation documentation. For more information on administering the OLAP option, see Oracle OLAP Application Developer's Guide.

Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at

http://www.oracle.com/accessibility/.

Accessibility of Code Examples in Documentation

Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

Related Documentation

For more information about Oracle OLAP and Oracle data warehousing, refer to the following manuals:


Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-04


Copyright © 2003, 2007 Oracle. All rights reserved.