com.sas.storage.olap
Interface MetadataInterface

All Known Implementing Classes:
Metadata

public interface MetadataInterface

The MetadataInterface is used to obtain the metadata for this server's database. There are two ways in which this information may be consumed. One way is to consume the information in a hierarchical way. The getSchemas() method provides the top level of the tree, which is the SchemaInterface. Each of the subsequent metadata interfaces contain the necessary methods to navigate the rest of the metadata. For example, the DimensionInterface has a getCube() method and a getHierachies() method. These methods return the parent and children of the Dimension, respectively. The second way to view the metadata is to directly access specific pieces of the metadata based on a set of restrictions. The MetadataInterface provides a full set of methods for obtaining each piece of the metadata (Dimensions, Hierarchies, etc.). Each of these methods requires an appropriate set of restrictions that returns an array of objects meeting this criteria. For example, "What are all the Levels for the Geography Dimension?" In this case, the search condition is known ahead of time, and it is not necessary to navigate through the metadata in order to determine the set of Levels belonging to the Geography Dimension. When applying restrictions there are a couple of rules to keep in mind. All of the restrictions do not have to be applied. An empty string ("") or 0 should be used when no restriction is needed. Also, when applying multiple restrictions each restriction is joined together with an AND operator.

See Also:
SchemaInterface, CubeInterface, DimensionInterface, HierarchyInterface, LevelInterface, MeasureInterface, PropertyInterface, MemberInterface, Filter

Method Summary
 java.lang.Object getConnection()
          Returns the connection to the OLAP server.
 CubeInterface getCube(Filter filter)
          Returns the cube with the appropriate restrictions
 CubeInterface[] getCubes(Filter filter)
          Returns the cube(s) with the appropriate restrictions
 DimensionInterface getDimension(Filter filter)
          Returns the dimension with the appropriate restrictions
 DimensionInterface[] getDimensions(Filter filter)
          Returns the dimension(s) with the appropriate restrictions
 HierarchyInterface[] getHierarchies(Filter filter)
          Returns the hierarchies with the appropriate restrictions
 HierarchyInterface getHierarchy(Filter filter)
          Returns the hierarchy with the appropriate restrictions
 LevelInterface getLevel(Filter filter)
          Returns the level with the appropriate restrictions
 LevelInterface[] getLevels(Filter filter)
          Returns the level(s) with the appropriate restrictions
 java.util.Locale getLocale()
          Returns the locale used for the session.
 MeasureInterface getMeasure(Filter filter)
          Returns the measure with the appropriate restrictions
 MeasureInterface[] getMeasures(Filter filter)
          Returns the measure(s) with the appropriate restrictions
 MemberInterface[] getMembers(Filter filter, int start, int count)
          Returns the member(s) with the appropriate restrictions
 PropertyInterface[] getProperties(Filter filter)
          Returns the properties with the appropriate restrictions
 PropertyInterface getProperty(Filter filter)
          Returns the property with the appropriate restrictions
 SchemaInterface getSchema(Filter filter)
          Returns the schema with the appropriate restrictions
 SchemaInterface[] getSchemas()
          Returns the schemas for this server's database.
 SchemaInterface[] getSchemas(Filter filter)
          Returns the schema(s) with the appropriate restrictions
 void setConnection(java.lang.Object con)
          Sets the connection to the OLAP server.
 void setLocale(java.util.Locale locale)
          Sets the locale for the session object
 

Method Detail

getConnection

java.lang.Object getConnection()
                               throws OLAPException
Returns the connection to the OLAP server.

Returns:
The connection to the OLAP server
Throws:
OLAPException - if a database error occurs

setConnection

void setConnection(java.lang.Object con)
                   throws OLAPException
Sets the connection to the OLAP server.

Parameters:
The - connection to the OLAP server
Throws:
OLAPException - if a database error occurs

getLocale

java.util.Locale getLocale()
                           throws OLAPException
Returns the locale used for the session.

Returns:
The locale to the OLAP server
Throws:
OLAPException - if a database error occurs

setLocale

void setLocale(java.util.Locale locale)
               throws OLAPException
Sets the locale for the session object

Parameters:
The - locale to the OLAP server
Throws:
OLAPException - if a database error occurs

getSchemas

SchemaInterface[] getSchemas()
                             throws OLAPException
Returns the schemas for this server's database. This is the top level metadata and provides a starting point for viewing the metadata in a hierarchical manner. When viewing metadata hierarchically, this method should be called first. The tree of metadata can be accessed without supplying any restrictions. The restrictions are inferred based on the calling object. Other methods in the MetadataInterface allow metadata queries to be made only with the use of restrictions.

Returns:
The schemas for this server's database. This is the top level metadata and allows the metadata to be viewed in a hierarchical manner.
Throws:
OLAPException - if a database error occurs

getSchemas

SchemaInterface[] getSchemas(Filter filter)
                             throws OLAPException
Returns the schema(s) with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
Returns:
The schema(s) with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getSchema

SchemaInterface getSchema(Filter filter)
                          throws OLAPException
Returns the schema with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
Returns:
The schema with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getCubes

CubeInterface[] getCubes(Filter filter)
                         throws OLAPException
Returns the cube(s) with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
Returns:
The cube(s) with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getCube

CubeInterface getCube(Filter filter)
                      throws OLAPException
Returns the cube with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
Returns:
The cube with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getDimensions

DimensionInterface[] getDimensions(Filter filter)
                                   throws OLAPException
Returns the dimension(s) with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   dimensionName
   uniqueDimensionName
Returns:
The dimension(s) with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getDimension

DimensionInterface getDimension(Filter filter)
                                throws OLAPException
Returns the dimension with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   dimensionName
   uniqueDimensionName
Returns:
The dimension with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getHierarchies

HierarchyInterface[] getHierarchies(Filter filter)
                                    throws OLAPException
Returns the hierarchies with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   uniqueDimensionName
   hierarchyName
   uniqueHierarchyName
Returns:
The hierarchies with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getHierarchy

HierarchyInterface getHierarchy(Filter filter)
                                throws OLAPException
Returns the hierarchy with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   uniqueDimensionName
   hierarchyName
   uniqueHierarchyName
Returns:
The hierarchy with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getLevels

LevelInterface[] getLevels(Filter filter)
                           throws OLAPException
Returns the level(s) with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   uniqueDimensionName
   uniqueHierarchyName
   levelName
   uniqueLevelName
Returns:
The level(s) with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getLevel

LevelInterface getLevel(Filter filter)
                        throws OLAPException
Returns the level with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   uniqueDimensionName
   uniqueHierarchyName
   levelName
   uniqueLevelName
Returns:
The level with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getMeasures

MeasureInterface[] getMeasures(Filter filter)
                               throws OLAPException
Returns the measure(s) with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   measureName
   uniqueMeasureName
Returns:
The measure(s) with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getMeasure

MeasureInterface getMeasure(Filter filter)
                            throws OLAPException
Returns the measure with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   measureName
   uniqueMeasureName
Returns:
The measure with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getProperties

PropertyInterface[] getProperties(Filter filter)
                                  throws OLAPException
Returns the properties with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   uniqueDimensionName
   uniqueHierarchyName
   uniqueLevelName
   uniqueMemberName
   propertyName
   propertyType
Returns:
The properties with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getProperty

PropertyInterface getProperty(Filter filter)
                              throws OLAPException
Returns the property with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   uniqueDimensionName
   uniqueHierarchyName
   uniqueLevelName
   uniqueMemberName
   propertyName
   propertyType
Returns:
The property with the appropriate restrictions
Throws:
OLAPException - if a database error occurs

getMembers

MemberInterface[] getMembers(Filter filter,
                             int start,
                             int count)
                             throws OLAPException
Returns the member(s) with the appropriate restrictions

Parameters:
filter - The filter defines the restrictions to be applied for this metadata query. The following restrictions are applicable for this type of Metadata object:
   catalogName
   schemaName
   cubeName
   uniqueDimensionName
   uniqueHierarchyName
   uniqueLevelName
   levelDepth
   memberName
   uniqueMemberName
   memberLabel
   memberType
   treeOperator
start - The zero based start index for the resulting set of members
count - The number of members to return from the resulting set of members, where -1 returns all members meeting the above criteria.
Returns:
The member(s) with the appropriate restrictions
Throws:
OLAPException - if a database error occurs



Copyright © 2009 SAS Institute Inc. All Rights Reserved.