Oracle® OLAP Java API Reference
11g Release 2 (11.2)

E10794-05


Oracle® OLAP Java API Reference

See:
          Description

Packages
oracle.express Contains classes that support processing in Oracle OLAP.
oracle.express.olapi.data.full Contains an Exception class that might be encountered by a client application.
oracle.express.spl Contains classes that support the execution of OLAP DML commands in Oracle OLAP.
oracle.olapi Contains an interface, a class, and exceptions that are of general use in the Oracle OLAP Java API.
oracle.olapi.data.cursor Contains interfaces and classes for retrieving and accessing the result set of a query.
oracle.olapi.data.source Contains classes that construct a query of the data in an Oracle Database.
oracle.olapi.metadata Contains interfaces and classes that represent Oracle OLAP metadata objects and that provide those objects to an application.
oracle.olapi.metadata.deployment Contains classes that specify the deployment of a logical OLAP model as relational OLAP (ROLAP) objects or as analytic workspace (AW) objects.
oracle.olapi.metadata.mapping Contains classes that map the MdmObject objects of a logical OLAP metadata model to physical storage structures in an Oracle Database instance.
oracle.olapi.metadata.mdm Contains classes that represent data supporting the multidimensional model (MDM) for metadata.
oracle.olapi.resource Provides support for the internationalization of messages for Exception classes in the Oracle OLAP Java API.
oracle.olapi.session Contains a class that represents a session that is associated with a specific connection to an Oracle Database instance.
oracle.olapi.syntax Contains classes that represent data types, functions, commands, and data objects.
oracle.olapi.transaction Contains interfaces that define classes that are involved in transactions between Oracle OLAP and an OLAP client application and Exception classes that an application might encounter.
oracle.olapi.transaction.metadataStateManager Contains an interface to implement and associate with a Template object.

 

Oracle® OLAP Java API Reference

July 28, 2010

This is the reference documentation for the Oracle OLAP Java API, the Java application programming interface for Oracle OLAP. This overview contains the following topics.

Changes to the API

For a description of the new features of the Oracle OLAP Java API for this release, see New Features.

Intended Audience

This documentation assumes that you are already familiar with Java, relational database management systems, data warehousing, and online analytical processing (OLAP) concepts. It is intended for Java programmers who are responsible for creating applications that create and maintain OLAP objects, build and maintain analytic workspaces, and perform online analytical processing.

Before You Begin

To use the Oracle OLAP Java API, you must have access to an Oracle Database instance that has the OLAP option installed. An Oracle Database with the OLAP option provides the Oracle OLAP Java API classes, and other required classes, in JAR files. Before you can compile an Oracle OLAP Java API program, you must get the required JAR files and add them to your Java development environment.

The following table lists the required JAR files and their location under the ORACLE_HOME directory in an Oracle Database installation.

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

You must use the JDBC files included in your Oracle Database installation and not those from another Oracle product or from another vendor.

You can include this reference documentation in an integrated development environment, such as JDeveloper, by downloading the olap_api_doc.jar file from the Oracle Technology Network (OTN) Web site at

http://www.oracle.com/technology/products/bi/olap/index.html

To download the olap_api_doc.jar file, in the Download section select Sample Code and Schemas and then select Oracle OLAP Java API Reference olap_api_doc.jar. You can then add the JAR file to your IDE project.

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 User's Guide.

JDK Version Required

This release of the Oracle OLAP Java API requires J2SE Development Kit 5.0 (JDK 5.0).

Examples of Using the Oracle OLAP Java API

In the examples of the Oracle OLAP Java API code in this documentation, the metadata objects are mapped to columns of the tables of the Global sample schema. From the Oracle Technology Network (OTN)OLAP Web site, you can download a file that contains SQL scripts that create the Global schema. The OLAP OTN Web site is at

http://www.oracle.com/technology/products/bi/olap/index.html

To download the sample schema, in the Download section select Sample Code and Schemas and then select Global Schema 11g.

You can also download a file that contains example programs that include the code from the examples in this documentation and the examples in Oracle OLAP Java API Developer's Guide. To download that file, in the Download section select Sample Code and Schemas and then select Example Programs for Documentation.

For more information on the example programs, see Example Oracle OLAP Java API Programs.

Compatibility with Previous Releases

Programs that use previous releases of the Oracle OLAP Java API can run on Oracle Database, 11g Release 1 (11.1), depending on the metadata reader mode. The mode specifies the type of metadata that Oracle OLAP recognizes and makes available to the client application. By default, Oracle OLAP recognizes all types of metadata. You can specify a different metadata reader mode when you create a DataProvideror a UserSession. You can use 10g metadata objects to query data but you cannot modify the metadata objects or create new persistent objects.

For information about setting the metadata reader mode, see the DataProvider class description. For information about using namespaces to specify a 10g Oracle OLAP metadata object, see Using Namespaces in the description of MdmMetadataProvider.

Unique and Local Values in the Oracle OLAP Java API

The members of an Oracle OLAP dimension are often organized into one or more hierarchies. Some hierarchies have parent-child relationships based on levels and some have those relationships based on values. The Oracle OLAP Java API uses a three-part format to specify the hierarchy, the level, and the value of a dimension member, and thereby identify a unique value. The first part of a unique value is the name of the hierarchy object, the second part is the name of the level object, and the third part is the value of the member in the level. The parts of the unique value are separated by a value separation string, which by default is double colons (::). The following is an example of unique value in the YEAR level of the CALENDAR_YEAR hierarchy of the TIME_AWJ dimension:

CALENDAR_YEAR::YEAR::CY2001

The third part of a unique value is the local value. In the preceding example, the local value is CY2001, which is the identifier for the year 2001 in the Global schema. The Oracle OLAP Java API has classes and methods that you can use to get the local values of dimension members. See the descriptions of the MdmPrimaryDimension and MdmDimensionMemberInfo classes for more information about unique and local values.

An application can specify that Oracle OLAP use unique or local dimension hierarchy values by setting the HierarchyValueType property in a java.util.Properties object and using the Properties object to construct an DataProvider. The use of Model objects requires unique hierarchy values.

The selection of dimension members in the query must match the setting of the property. For a complex query, using unique dimension hierarchy values generally provides faster performance when Oracle OLAP fetches the data.

Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible to all users, including users that are disabled. 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. Accessibility 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 more 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.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

Related Documentation

The following documentation is helpful when using Oracle OLAP.


Copyright © 2002, 2010, Oracle. All rights reserved.