mondrian.olap4j
Class MondrianOlap4jSchema

java.lang.Object
  extended by mondrian.olap4j.MondrianOlap4jMetadataElement
      extended by mondrian.olap4j.MondrianOlap4jSchema
All Implemented Interfaces:
org.olap4j.impl.Named, Schema, OlapWrapper

 class MondrianOlap4jSchema
extends MondrianOlap4jMetadataElement
implements Schema, org.olap4j.impl.Named

Implementation of Schema for the Mondrian OLAP engine.

Since:
May 24, 2007
Author:
jhyde

Field Summary
(package private)  MondrianOlap4jCatalog olap4jCatalog
           
(package private)  Schema schema
           
(package private)  String schemaName
           
 
Constructor Summary
MondrianOlap4jSchema(MondrianOlap4jCatalog olap4jCatalog, String schemaName, Schema schema)
          Creates a MondrianOlap4jSchema.
 
Method Summary
 Catalog getCatalog()
           
 NamedList<Cube> getCubes()
           
(package private)  Locale getLocale()
          Shorthand for catalog.database.connection.getLocale().
 String getName()
           
protected  OlapElement getOlapElement()
          Returns the Mondrian metadata element inside this wrapper, or null if there is none.
 NamedList<Dimension> getSharedDimensions()
           
 Collection<Locale> getSupportedLocales()
           
 
Methods inherited from class mondrian.olap4j.MondrianOlap4jMetadataElement
isWrapperFor, unwrap, unwrapImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

olap4jCatalog

final MondrianOlap4jCatalog olap4jCatalog

schemaName

final String schemaName

schema

final Schema schema
Constructor Detail

MondrianOlap4jSchema

MondrianOlap4jSchema(MondrianOlap4jCatalog olap4jCatalog,
                     String schemaName,
                     Schema schema)
Creates a MondrianOlap4jSchema.

The name of the schema is not necessarily the same as schema.getName(). If schema was loaded in a datasources.xml file, the name it was given there (in the <Catalog> element) trumps the name in the catalog.xml file.

Parameters:
olap4jCatalog - Catalog containing schema
schemaName - Name of schema
schema - Mondrian schema
Method Detail

getCatalog

public Catalog getCatalog()
Specified by:
getCatalog in interface Schema

getCubes

public NamedList<Cube> getCubes()
                         throws OlapException
Specified by:
getCubes in interface Schema
Throws:
OlapException

getSharedDimensions

public NamedList<Dimension> getSharedDimensions()
                                         throws OlapException
Specified by:
getSharedDimensions in interface Schema
Throws:
OlapException

getSupportedLocales

public Collection<Locale> getSupportedLocales()
                                       throws OlapException
Specified by:
getSupportedLocales in interface Schema
Throws:
OlapException

getName

public String getName()
Specified by:
getName in interface org.olap4j.impl.Named
Specified by:
getName in interface Schema

getLocale

final Locale getLocale()
Shorthand for catalog.database.connection.getLocale(). Not part of the olap4j api; do not make public.

Returns:
Locale of current connection

getOlapElement

protected OlapElement getOlapElement()
Description copied from class: MondrianOlap4jMetadataElement
Returns the Mondrian metadata element inside this wrapper, or null if there is none.

Specified by:
getOlapElement in class MondrianOlap4jMetadataElement
Returns:
The Mondrian metadata element, if any

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads