org.teiid.metadata
Class TransformationMetadata

java.lang.Object
  extended by com.metamatrix.query.metadata.BasicQueryMetadata
      extended by org.teiid.metadata.TransformationMetadata
All Implemented Interfaces:
QueryMetadataInterface

public class TransformationMetadata
extends BasicQueryMetadata

Modelers implementation of QueryMetadataInterface that reads columns, groups, models etc. index files for various metadata properties.


Field Summary
static char DELIMITER_CHAR
          Delimiter character used when specifying fully qualified entity names
static java.lang.String DELIMITER_STRING
           
static java.lang.String NOT_EXISTS_MESSAGE
           
 
Fields inherited from interface com.metamatrix.query.metadata.QueryMetadataInterface
UNKNOWN_CARDINALITY
 
Constructor Summary
TransformationMetadata(CompositeMetadataStore store)
          TransformationMetadata constructor
 
Method Summary
 java.lang.Object addToMetadataCache(java.lang.Object metadataID, java.lang.String key, java.lang.Object value)
           
 boolean elementSupports(java.lang.Object elementID, int elementConstant)
          Determine whether the specified element supports some feature.
 java.util.Collection getAccessPatternsInGroup(java.lang.Object groupID)
          Get the access patterns for the specified group
 byte[] getBinaryVDBResource(java.lang.String resourcePath)
          Gets the contents of a VDB resource in binary form.
 int getCardinality(java.lang.Object groupID)
          Return the cardinality for this group
 java.lang.String getCharacterVDBResource(java.lang.String resourcePath)
          Gets the contents of a VDB resource as a String.
 java.lang.Object getDefaultValue(java.lang.Object elementID)
          Get the element's default value for an element symbol
 java.lang.String getDeletePlan(java.lang.Object groupID)
          Get procedure defining the delete plan for this group.
 int getDistinctValues(java.lang.Object elementID)
          Get the number of distinct values for this column.
 java.lang.Object getElementID(java.lang.String elementName)
          Get the metadata-implementation identifier object for the given element name.
 java.util.List getElementIDsInAccessPattern(java.lang.Object accessPattern)
          Get the elements in the access pattern
 java.util.List getElementIDsInGroupID(java.lang.Object groupID)
          Get list of metadata element IDs for a group ID
 java.util.List getElementIDsInIndex(java.lang.Object index)
          Get the elements in the index
 java.util.List getElementIDsInKey(java.lang.Object key)
          Get the elements in the key
 int getElementLength(java.lang.Object elementID)
          Get the element length for a given element ID.
 java.lang.String getElementType(java.lang.Object elementID)
          Get the element type name for an element symbol.
 java.util.Properties getExtensionProperties(java.lang.Object metadataID)
          Get all extension properties defined on this metadata object
 java.util.Collection getForeignKeysInGroup(java.lang.Object groupID)
          Get the foreign keys for the specified group
 java.lang.String getFormat(java.lang.Object elementID)
          Get the element's format
 java.lang.Object getFromMetadataCache(java.lang.Object metadataID, java.lang.String key)
           
 java.lang.String getFullElementName(java.lang.String fullGroupName, java.lang.String shortElementName)
          Get the fully qualified (unique) element name given the full group name and the short element name.
 java.lang.String getFullName(java.lang.Object metadataID)
          Get the fully qualified (unique) name of the metadata identifier specified.
 java.lang.Object getGroupID(java.lang.String groupName)
          Get the metadata-implementation identifier object for the given group name.
 java.lang.Object getGroupIDForElementID(java.lang.Object elementID)
          Get containg group ID given element ID
 java.lang.String getGroupName(java.lang.String fullElementName)
          Return the text portion of the fullElementName representing a group.
 java.util.Collection getGroupsForPartialName(java.lang.String partialGroupName)
          Get a collection of group names that match the partially qualified group name.
 java.util.Collection getIndexesInGroup(java.lang.Object groupID)
          Get the indexes for the specified group
 java.lang.String getInsertPlan(java.lang.Object groupID)
          Get procedure defining the insert plan for this group.
 MappingNode getMappingNode(java.lang.Object groupID)
          Get the mapping node for the given groupID
 java.lang.Object getMaterialization(java.lang.Object groupID)
          Accquire the physical group ID (the Materialization) for the given virtual group ID, or null if the given virtual group has no Materialization.
 java.lang.Object getMaterializationStage(java.lang.Object groupID)
          Accquire the physical group ID that is used for the staging area for loading (the Materialization) for the given virtual group ID, or null if the given virtual group has no Materialization.
 java.lang.Object getMaximumValue(java.lang.Object elementID)
          Get the element's default value for an element symbol
 int getMaxSetSize(java.lang.Object modelID)
          Get the max set size for the specified model.
protected  CompositeMetadataStore getMetadataStore()
           
 java.lang.Object getMinimumValue(java.lang.Object elementID)
          Get the element's minimum value for an element symbol
 java.lang.String getModeledBaseType(java.lang.Object elementID)
          Get the design-time model base type of the element specified.
 java.lang.String getModeledPrimitiveType(java.lang.Object elementID)
          Get the design-time model primitive type of the element specified.
 java.lang.String getModeledType(java.lang.Object elementID)
          Get the design-time model type of the element specified.
 java.lang.Object getModelID(java.lang.Object groupOrElementID)
          Get the metadata-implementation identifier object for the model containing the specified group or element ID.
 java.lang.String getNameInSource(java.lang.Object metadataID)
          Get the name in source of the metadata identifier specified.
 java.lang.String getNativeType(java.lang.Object elementID)
          Get the native type of the element specified.
 int getNullValues(java.lang.Object elementID)
          Get the number of distinct values for this column.
 int getPosition(java.lang.Object elementID)
          Get the element's position in the group
 int getPrecision(java.lang.Object elementID)
          Get the element's precision
 java.lang.Object getPrimaryKeyIDForForeignKeyID(java.lang.Object foreignKeyID)
          Get the corresponding primary key ID for the specified foreign key ID
 int getRadix(java.lang.Object elementID)
          Get the element's radix
 int getScale(java.lang.Object elementID)
          Get the element's scale
 java.lang.String getShortElementName(java.lang.String fullElementName)
          Get the short (unique only to group) name of an element, given a fully qualified element name.
 StoredProcedureInfo getStoredProcedureInfoForProcedure(java.lang.String fullyQualifiedProcedureName)
          Get the the StoredProcedureInfo based on the fully qualified procedure name
 java.util.Collection getUniqueKeysInGroup(java.lang.Object groupID)
          Get the unique keys for the specified group (primary and unique keys)
 java.lang.String getUpdatePlan(java.lang.Object groupID)
          Get procedure defining the update plan for this group.
 java.lang.String[] getVDBResourcePaths()
          Gets the resource paths of all the resources in the VDB.
 java.lang.String getVirtualDatabaseName()
          Get the currently connected virtual database name.
 QueryNode getVirtualPlan(java.lang.Object groupID)
          Get virtual plan for a group symbol.
 java.util.List getXMLSchemas(java.lang.Object groupID)
          Get XML schemas for a document group.
 java.util.Collection getXMLTempGroups(java.lang.Object groupID)
          Return a list of all the temp groups used in this document.
 boolean groupSupports(java.lang.Object groupID, int groupConstant)
          Determine whether the specified group supports some feature.
 boolean hasMaterialization(java.lang.Object groupID)
          Determine whether given virtual group has an associated Materialization.
 boolean isProcedure(java.lang.Object groupID)
          Determine whether this is a procedure
 boolean isVirtualGroup(java.lang.Object groupID)
          Determine whether a group is virtual or not.
 boolean isVirtualModel(java.lang.Object modelID)
          Determine whether a model is virtual or not.
 boolean isXMLGroup(java.lang.Object groupID)
          Determine whether a group is an XML virtual document.
 boolean modelSupports(java.lang.Object modelID, int modelConstant)
          Determine whether the specified model supports some feature.
 
Methods inherited from class com.metamatrix.query.metadata.BasicQueryMetadata
isScalarGroup, isTemporaryTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELIMITER_CHAR

public static final char DELIMITER_CHAR
Delimiter character used when specifying fully qualified entity names

See Also:
Constant Field Values

DELIMITER_STRING

public static final java.lang.String DELIMITER_STRING
See Also:
Constant Field Values

NOT_EXISTS_MESSAGE

public static java.lang.String NOT_EXISTS_MESSAGE
Constructor Detail

TransformationMetadata

public TransformationMetadata(CompositeMetadataStore store)
TransformationMetadata constructor

Parameters:
context - Object containing the info needed to lookup metadta.
Method Detail

getElementID

public java.lang.Object getElementID(java.lang.String elementName)
                              throws MetaMatrixComponentException,
                                     QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the metadata-implementation identifier object for the given element name.

Specified by:
getElementID in interface QueryMetadataInterface
Overrides:
getElementID in class BasicQueryMetadata
Parameters:
elementName - Fully qualified element name
Returns:
Metadata identifier for this element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementID(String)

getGroupID

public java.lang.Object getGroupID(java.lang.String groupName)
                            throws MetaMatrixComponentException,
                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the metadata-implementation identifier object for the given group name.

Specified by:
getGroupID in interface QueryMetadataInterface
Overrides:
getGroupID in class BasicQueryMetadata
Parameters:
groupName - Fully qualified group name
Returns:
Metadata identifier for this group
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getGroupID(String)

getGroupsForPartialName

public java.util.Collection getGroupsForPartialName(java.lang.String partialGroupName)
                                             throws MetaMatrixComponentException,
                                                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get a collection of group names that match the partially qualified group name.

Specified by:
getGroupsForPartialName in interface QueryMetadataInterface
Overrides:
getGroupsForPartialName in class BasicQueryMetadata
Parameters:
partialGroupName - Partially qualified group name
Returns:
A collection of groups whose names are matched by the partial name.
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getGroupID(String)

getModelID

public java.lang.Object getModelID(java.lang.Object groupOrElementID)
                            throws MetaMatrixComponentException,
                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the metadata-implementation identifier object for the model containing the specified group or element ID.

Specified by:
getModelID in interface QueryMetadataInterface
Overrides:
getModelID in class BasicQueryMetadata
Parameters:
groupOrElementID - Metadata group or element ID
Returns:
Metadata identifier for the model
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getModelID(Object)

getFullName

public java.lang.String getFullName(java.lang.Object metadataID)
                             throws MetaMatrixComponentException,
                                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the fully qualified (unique) name of the metadata identifier specified. This metadata identifier was previously returned by some other method.

Specified by:
getFullName in interface QueryMetadataInterface
Overrides:
getFullName in class BasicQueryMetadata
Parameters:
metadataID - Metadata identifier
Returns:
Metadata identifier for this model
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getFullName(Object)

getFullElementName

public java.lang.String getFullElementName(java.lang.String fullGroupName,
                                           java.lang.String shortElementName)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the fully qualified (unique) element name given the full group name and the short element name.

Specified by:
getFullElementName in interface QueryMetadataInterface
Overrides:
getFullElementName in class BasicQueryMetadata
Parameters:
fullGroupName - Fully qualified group name
shortElementName - Short element name
Returns:
Unique element name for the specified group and element name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getFullElementName(String, String)

getShortElementName

public java.lang.String getShortElementName(java.lang.String fullElementName)
                                     throws MetaMatrixComponentException,
                                            QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the short (unique only to group) name of an element, given a fully qualified element name.

Specified by:
getShortElementName in interface QueryMetadataInterface
Overrides:
getShortElementName in class BasicQueryMetadata
Parameters:
fullElementName - Fully qualified element name
Returns:
Short (unique only to group) name of element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getShortElementName(String)

getGroupName

public java.lang.String getGroupName(java.lang.String fullElementName)
                              throws MetaMatrixComponentException,
                                     QueryMetadataException
Return the text portion of the fullElementName representing a group. That means that this should only return text that is part of the fullElementName and not look up new IDs or do much of anything fancy. This method is used by the resolver to decide which portion of a fully- qualified element name is the group name. It will compare whatever comes back with the actual group names and aliases in the query, which is why it is important not to introduce new metadata here. Also, returning null indicates that no portion of the fullElementName is a group name - that is ok as it will be resolved as an ambiguous element.

Specified by:
getGroupName in interface QueryMetadataInterface
Overrides:
getGroupName in class BasicQueryMetadata
Parameters:
fullElementName - Fully qualified element name
Returns:
Group name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getGroupName(java.lang.String)

getElementIDsInGroupID

public java.util.List getElementIDsInGroupID(java.lang.Object groupID)
                                      throws MetaMatrixComponentException,
                                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get list of metadata element IDs for a group ID

Specified by:
getElementIDsInGroupID in interface QueryMetadataInterface
Overrides:
getElementIDsInGroupID in class BasicQueryMetadata
Parameters:
groupID - Group ID
Returns:
List of Object, where each object is a metadata elementID for element within group
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementIDsInGroupID(Object)

getGroupIDForElementID

public java.lang.Object getGroupIDForElementID(java.lang.Object elementID)
                                        throws MetaMatrixComponentException,
                                               QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get containg group ID given element ID

Specified by:
getGroupIDForElementID in interface QueryMetadataInterface
Overrides:
getGroupIDForElementID in class BasicQueryMetadata
Parameters:
elementID - Element ID
Returns:
Group ID containing elementID
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getGroupIDForElementID(Object)

getStoredProcedureInfoForProcedure

public StoredProcedureInfo getStoredProcedureInfoForProcedure(java.lang.String fullyQualifiedProcedureName)
                                                       throws MetaMatrixComponentException,
                                                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the the StoredProcedureInfo based on the fully qualified procedure name

Specified by:
getStoredProcedureInfoForProcedure in interface QueryMetadataInterface
Overrides:
getStoredProcedureInfoForProcedure in class BasicQueryMetadata
Parameters:
fullyQualifiedProcedureName - the fully qualified stored procedure name
Returns:
StoredProcedureInfo containing the runtime model id
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getStoredProcedureInfoForProcedure(String)

getElementType

public java.lang.String getElementType(java.lang.Object elementID)
                                throws MetaMatrixComponentException,
                                       QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element type name for an element symbol. These types are defined in DataTypeManager.DefaultDataTypes.

Specified by:
getElementType in interface QueryMetadataInterface
Overrides:
getElementType in class BasicQueryMetadata
Returns:
The element data type
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface#getElementType(ElementSymbol)

getDefaultValue

public java.lang.Object getDefaultValue(java.lang.Object elementID)
                                 throws MetaMatrixComponentException,
                                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's default value for an element symbol

Specified by:
getDefaultValue in interface QueryMetadataInterface
Overrides:
getDefaultValue in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The default value of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getMinimumValue

public java.lang.Object getMinimumValue(java.lang.Object elementID)
                                 throws MetaMatrixComponentException,
                                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's minimum value for an element symbol

Specified by:
getMinimumValue in interface QueryMetadataInterface
Overrides:
getMinimumValue in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The minimum value of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getMaximumValue

public java.lang.Object getMaximumValue(java.lang.Object elementID)
                                 throws MetaMatrixComponentException,
                                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's default value for an element symbol

Specified by:
getMaximumValue in interface QueryMetadataInterface
Overrides:
getMaximumValue in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The maximum value of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

isVirtualGroup

public boolean isVirtualGroup(java.lang.Object groupID)
                       throws MetaMatrixComponentException,
                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether a group is virtual or not.

Specified by:
isVirtualGroup in interface QueryMetadataInterface
Overrides:
isVirtualGroup in class BasicQueryMetadata
Returns:
True if virtual
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.isVirtualGroup(Object)

isProcedure

public boolean isProcedure(java.lang.Object groupID)
                    throws MetaMatrixComponentException,
                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether this is a procedure

Specified by:
isProcedure in interface QueryMetadataInterface
Overrides:
isProcedure in class BasicQueryMetadata
Parameters:
groupID - Group identifier
Returns:
True if it is an procedure; false otherwise
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
Since:
4.2
See Also:
com.metamatrix.query.metadata.QueryMetadataInterface#isProcedureInputElement(java.lang.Object)

isVirtualModel

public boolean isVirtualModel(java.lang.Object modelID)
                       throws MetaMatrixComponentException,
                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether a model is virtual or not.

Specified by:
isVirtualModel in interface QueryMetadataInterface
Overrides:
isVirtualModel in class BasicQueryMetadata
Returns:
True if virtual
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.isVirtualModel(Object)

getVirtualPlan

public QueryNode getVirtualPlan(java.lang.Object groupID)
                         throws MetaMatrixComponentException,
                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get virtual plan for a group symbol.

Specified by:
getVirtualPlan in interface QueryMetadataInterface
Overrides:
getVirtualPlan in class BasicQueryMetadata
Returns:
Root of tree of QueryNode objects
Throws:
MetaMatrixComponentException
QueryMetadataException
See Also:
QueryMetadataInterface#getVirtualPlan(GroupSymbol)

getInsertPlan

public java.lang.String getInsertPlan(java.lang.Object groupID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Description copied from class: BasicQueryMetadata
Get procedure defining the insert plan for this group.

Specified by:
getInsertPlan in interface QueryMetadataInterface
Overrides:
getInsertPlan in class BasicQueryMetadata
Returns:
A string giving the procedure for inserts.
Throws:
MetaMatrixComponentException
QueryMetadataException

getUpdatePlan

public java.lang.String getUpdatePlan(java.lang.Object groupID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Description copied from class: BasicQueryMetadata
Get procedure defining the update plan for this group.

Specified by:
getUpdatePlan in interface QueryMetadataInterface
Overrides:
getUpdatePlan in class BasicQueryMetadata
Returns:
A string giving the procedure for inserts.
Throws:
MetaMatrixComponentException
QueryMetadataException

getDeletePlan

public java.lang.String getDeletePlan(java.lang.Object groupID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Description copied from class: BasicQueryMetadata
Get procedure defining the delete plan for this group.

Specified by:
getDeletePlan in interface QueryMetadataInterface
Overrides:
getDeletePlan in class BasicQueryMetadata
Returns:
A string giving the procedure for inserts.
Throws:
MetaMatrixComponentException
QueryMetadataException

modelSupports

public boolean modelSupports(java.lang.Object modelID,
                             int modelConstant)
                      throws MetaMatrixComponentException,
                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether the specified model supports some feature.

Specified by:
modelSupports in interface QueryMetadataInterface
Overrides:
modelSupports in class BasicQueryMetadata
Parameters:
modelID - Metadata identifier specifying the model
modelConstant - Constant from SupportConstants.Model
Returns:
True if model supports feature
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.modelSupports(Object, int)

groupSupports

public boolean groupSupports(java.lang.Object groupID,
                             int groupConstant)
                      throws MetaMatrixComponentException,
                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether the specified group supports some feature.

Specified by:
groupSupports in interface QueryMetadataInterface
Overrides:
groupSupports in class BasicQueryMetadata
Parameters:
groupID - Group metadata ID
groupConstant - Constant from SupportConstants.Group
Returns:
True if group supports feature
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.groupSupports(Object, int)

elementSupports

public boolean elementSupports(java.lang.Object elementID,
                               int elementConstant)
                        throws MetaMatrixComponentException,
                               QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether the specified element supports some feature.

Specified by:
elementSupports in interface QueryMetadataInterface
Overrides:
elementSupports in class BasicQueryMetadata
Parameters:
elementID - Element metadata ID
elementConstant - Constant from SupportConstants.Element
Returns:
True if element supports feature
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.elementSupports(Object, int)

getMaxSetSize

public int getMaxSetSize(java.lang.Object modelID)
                  throws MetaMatrixComponentException,
                         QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the max set size for the specified model.

Specified by:
getMaxSetSize in interface QueryMetadataInterface
Overrides:
getMaxSetSize in class BasicQueryMetadata
Parameters:
modelID - Metadata identifier specifying model
Returns:
Maximum set size
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getMaxSetSize(Object)

getIndexesInGroup

public java.util.Collection getIndexesInGroup(java.lang.Object groupID)
                                       throws MetaMatrixComponentException,
                                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the indexes for the specified group

Specified by:
getIndexesInGroup in interface QueryMetadataInterface
Overrides:
getIndexesInGroup in class BasicQueryMetadata
Parameters:
groupID - Metadata identifier specifying group
Returns:
Collection of Object (never null), each object representing an index
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getIndexesInGroup(java.lang.Object)

getUniqueKeysInGroup

public java.util.Collection getUniqueKeysInGroup(java.lang.Object groupID)
                                          throws MetaMatrixComponentException,
                                                 QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the unique keys for the specified group (primary and unique keys)

Specified by:
getUniqueKeysInGroup in interface QueryMetadataInterface
Overrides:
getUniqueKeysInGroup in class BasicQueryMetadata
Parameters:
groupID - Metadata identifier specifying group
Returns:
Collection of Object (never null), each object representing a unique key
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getUniqueKeysInGroup(Object)

getForeignKeysInGroup

public java.util.Collection getForeignKeysInGroup(java.lang.Object groupID)
                                           throws MetaMatrixComponentException,
                                                  QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the foreign keys for the specified group

Specified by:
getForeignKeysInGroup in interface QueryMetadataInterface
Overrides:
getForeignKeysInGroup in class BasicQueryMetadata
Parameters:
groupID - Metadata identifier specifying group
Returns:
Collection of Object (never null), each object representing a key
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getForeignKeysInGroup(Object)

getPrimaryKeyIDForForeignKeyID

public java.lang.Object getPrimaryKeyIDForForeignKeyID(java.lang.Object foreignKeyID)
                                                throws MetaMatrixComponentException,
                                                       QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the corresponding primary key ID for the specified foreign key ID

Specified by:
getPrimaryKeyIDForForeignKeyID in interface QueryMetadataInterface
Overrides:
getPrimaryKeyIDForForeignKeyID in class BasicQueryMetadata
Parameters:
foreignKeyID - Metadata identifier of a foreign key
Returns:
Metadata ID of the corresponding primary key
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getPrimaryKeyIDForForeignKeyID(Object)

getAccessPatternsInGroup

public java.util.Collection getAccessPatternsInGroup(java.lang.Object groupID)
                                              throws MetaMatrixComponentException,
                                                     QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the access patterns for the specified group

Specified by:
getAccessPatternsInGroup in interface QueryMetadataInterface
Overrides:
getAccessPatternsInGroup in class BasicQueryMetadata
Parameters:
groupID - Metadata identifier specifying group
Returns:
Collection of Object (never null), each object representing an access pattern
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getAccessPatternsInGroup(Object)

getElementIDsInIndex

public java.util.List getElementIDsInIndex(java.lang.Object index)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the elements in the index

Specified by:
getElementIDsInIndex in interface QueryMetadataInterface
Overrides:
getElementIDsInIndex in class BasicQueryMetadata
Parameters:
index - Index identifier, as returned by QueryMetadataInterface.getIndexesInGroup(java.lang.Object)
Returns:
List of Object, where each object is a metadata element identifier
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementIDsInIndex(java.lang.Object)

getElementIDsInKey

public java.util.List getElementIDsInKey(java.lang.Object key)
                                  throws MetaMatrixComponentException,
                                         QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the elements in the key

Specified by:
getElementIDsInKey in interface QueryMetadataInterface
Overrides:
getElementIDsInKey in class BasicQueryMetadata
Parameters:
key - Key identifier, as returned by QueryMetadataInterface.getUniqueKeysInGroup(java.lang.Object)
Returns:
List of Object, where each object is a metadata element identifier
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementIDsInKey(Object)

getElementIDsInAccessPattern

public java.util.List getElementIDsInAccessPattern(java.lang.Object accessPattern)
                                            throws MetaMatrixComponentException,
                                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the elements in the access pattern

Specified by:
getElementIDsInAccessPattern in interface QueryMetadataInterface
Overrides:
getElementIDsInAccessPattern in class BasicQueryMetadata
Parameters:
accessPattern - access pattern identifier, as returned by QueryMetadataInterface.getAccessPatternsInGroup(java.lang.Object)
Returns:
List of Object, where each object is a metadata element identifier
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getElementIDsInAccessPattern(Object)

isXMLGroup

public boolean isXMLGroup(java.lang.Object groupID)
                   throws MetaMatrixComponentException,
                          QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether a group is an XML virtual document.

Specified by:
isXMLGroup in interface QueryMetadataInterface
Overrides:
isXMLGroup in class BasicQueryMetadata
Parameters:
groupID - Group to check
Returns:
True if group is an XML virtual document
Throws:
MetaMatrixComponentException
QueryMetadataException
See Also:
QueryMetadataInterface.isXMLGroup(Object)

hasMaterialization

public boolean hasMaterialization(java.lang.Object groupID)
                           throws MetaMatrixComponentException,
                                  QueryMetadataException
Description copied from interface: QueryMetadataInterface
Determine whether given virtual group has an associated Materialization. A Materialization is a cached version of the representation of a virtual group.

Specified by:
hasMaterialization in interface QueryMetadataInterface
Overrides:
hasMaterialization in class BasicQueryMetadata
Parameters:
groupID - the groupID of the virtual group in question.
Returns:
True if given virtual group has been marked as having a Materialization.
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
Since:
4.2
See Also:
QueryMetadataInterface.hasMaterialization(java.lang.Object)

getMaterialization

public java.lang.Object getMaterialization(java.lang.Object groupID)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Accquire the physical group ID (the Materialization) for the given virtual group ID, or null if the given virtual group has no Materialization.

Specified by:
getMaterialization in interface QueryMetadataInterface
Overrides:
getMaterialization in class BasicQueryMetadata
Parameters:
groupID - the groupID of a virtual group that has a Materialization.
Returns:
The groupID of the physical group that is a Materialization of the given virtual group.
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request
Since:
4.2
See Also:
QueryMetadataInterface.getMaterialization(java.lang.Object)

getMaterializationStage

public java.lang.Object getMaterializationStage(java.lang.Object groupID)
                                         throws MetaMatrixComponentException,
                                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Accquire the physical group ID that is used for the staging area for loading (the Materialization) for the given virtual group ID, or null if the given virtual group has no Materialization.

Specified by:
getMaterializationStage in interface QueryMetadataInterface
Overrides:
getMaterializationStage in class BasicQueryMetadata
Parameters:
groupID - the groupID of a virtual group that has a Materialization.
Returns:
The groupID of the physical group that is the staging table for loading the Materialization of the given virtual group.
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request
Since:
4.2
See Also:
QueryMetadataInterface.getMaterializationStage(java.lang.Object)

getMappingNode

public MappingNode getMappingNode(java.lang.Object groupID)
                           throws MetaMatrixComponentException,
                                  QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the mapping node for the given groupID

Specified by:
getMappingNode in interface QueryMetadataInterface
Overrides:
getMappingNode in class BasicQueryMetadata
Parameters:
groupID - Metadata group ID
Returns:
A MappingNode defining the group
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface#getMappingNode(GroupSymbol)

getVirtualDatabaseName

public java.lang.String getVirtualDatabaseName()
                                        throws MetaMatrixComponentException,
                                               QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the currently connected virtual database name. If the current metadata is not virtual-database specific, then null should be returned.

Specified by:
getVirtualDatabaseName in interface QueryMetadataInterface
Overrides:
getVirtualDatabaseName in class BasicQueryMetadata
Returns:
Name of current virtual database
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getVirtualDatabaseName()

getXMLTempGroups

public java.util.Collection getXMLTempGroups(java.lang.Object groupID)
                                      throws MetaMatrixComponentException,
                                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Return a list of all the temp groups used in this document.

Specified by:
getXMLTempGroups in interface QueryMetadataInterface
Overrides:
getXMLTempGroups in class BasicQueryMetadata
Parameters:
groupID - XML virtual document groupID
Returns:
List of all the temp groups used in this document.
Throws:
MetaMatrixComponentException
QueryMetadataException

getCardinality

public int getCardinality(java.lang.Object groupID)
                   throws MetaMatrixComponentException,
                          QueryMetadataException
Description copied from interface: QueryMetadataInterface
Return the cardinality for this group

Specified by:
getCardinality in interface QueryMetadataInterface
Overrides:
getCardinality in class BasicQueryMetadata
Parameters:
groupID - Metadata identifier specifying group
Returns:
cardinality for the given group. If unknown, return UNKNOWN_CARDINALITY.
Throws:
MetaMatrixComponentException
QueryMetadataException

getXMLSchemas

public java.util.List getXMLSchemas(java.lang.Object groupID)
                             throws MetaMatrixComponentException,
                                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get XML schemas for a document group.

Specified by:
getXMLSchemas in interface QueryMetadataInterface
Overrides:
getXMLSchemas in class BasicQueryMetadata
Parameters:
groupID - Document group ID
Returns:
List of String where each string is an XML schema for the document
Throws:
MetaMatrixComponentException
QueryMetadataException

getNameInSource

public java.lang.String getNameInSource(java.lang.Object metadataID)
                                 throws MetaMatrixComponentException,
                                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the name in source of the metadata identifier specified. This metadata identifier was previously returned by some other method.

Specified by:
getNameInSource in interface QueryMetadataInterface
Overrides:
getNameInSource in class BasicQueryMetadata
Parameters:
metadataID - Metadata identifier
Returns:
Name in source as a string.
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getElementLength

public int getElementLength(java.lang.Object elementID)
                     throws MetaMatrixComponentException,
                            QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element length for a given element ID. These types are defined in DataTypeManager.DefaultDataTypes.

Specified by:
getElementLength in interface QueryMetadataInterface
Overrides:
getElementLength in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The element length
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getPosition

public int getPosition(java.lang.Object elementID)
                throws MetaMatrixComponentException,
                       QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's position in the group

Specified by:
getPosition in interface QueryMetadataInterface
Overrides:
getPosition in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The position of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getPrecision

public int getPrecision(java.lang.Object elementID)
                 throws MetaMatrixComponentException,
                        QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's precision

Specified by:
getPrecision in interface QueryMetadataInterface
Overrides:
getPrecision in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The precision of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getRadix

public int getRadix(java.lang.Object elementID)
             throws MetaMatrixComponentException,
                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's radix

Specified by:
getRadix in interface QueryMetadataInterface
Overrides:
getRadix in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The radix of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getFormat

public java.lang.String getFormat(java.lang.Object elementID)
                           throws MetaMatrixComponentException,
                                  QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's format

Specified by:
getFormat in interface QueryMetadataInterface
Overrides:
getFormat in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The format of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getScale

public int getScale(java.lang.Object elementID)
             throws MetaMatrixComponentException,
                    QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the element's scale

Specified by:
getScale in interface QueryMetadataInterface
Overrides:
getScale in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The scale of the element
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getDistinctValues

public int getDistinctValues(java.lang.Object elementID)
                      throws MetaMatrixComponentException,
                             QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the number of distinct values for this column. Negative values (typically -1) indicate that the NDV is unknown. Only applicable for physical columns.

Specified by:
getDistinctValues in interface QueryMetadataInterface
Overrides:
getDistinctValues in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The number of distinct values of this element in the data source
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getDistinctValues(java.lang.Object)

getNullValues

public int getNullValues(java.lang.Object elementID)
                  throws MetaMatrixComponentException,
                         QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the number of distinct values for this column. Negative values (typically -1) indicate that the NDV is unknown. Only applicable for physical columns.

Specified by:
getNullValues in interface QueryMetadataInterface
Overrides:
getNullValues in class BasicQueryMetadata
Parameters:
elementID - The element ID
Returns:
The number of distinct values of this element in the data source
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
See Also:
QueryMetadataInterface.getNullValues(java.lang.Object)

getNativeType

public java.lang.String getNativeType(java.lang.Object elementID)
                               throws MetaMatrixComponentException,
                                      QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the native type of the element specified. This element identifier was previously returned by some other method.

Specified by:
getNativeType in interface QueryMetadataInterface
Overrides:
getNativeType in class BasicQueryMetadata
Parameters:
elementID - Element identifier
Returns:
Native type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getExtensionProperties

public java.util.Properties getExtensionProperties(java.lang.Object metadataID)
                                            throws MetaMatrixComponentException,
                                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get all extension properties defined on this metadata object

Specified by:
getExtensionProperties in interface QueryMetadataInterface
Overrides:
getExtensionProperties in class BasicQueryMetadata
Parameters:
metadataID - Typically element, group, model, or procedure
Returns:
All extension properties for this object or null for none
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request

getBinaryVDBResource

public byte[] getBinaryVDBResource(java.lang.String resourcePath)
                            throws MetaMatrixComponentException,
                                   QueryMetadataException
Description copied from interface: QueryMetadataInterface
Gets the contents of a VDB resource in binary form.

Specified by:
getBinaryVDBResource in interface QueryMetadataInterface
Overrides:
getBinaryVDBResource in class BasicQueryMetadata
Parameters:
resourcePath - a path returned by getVDBResourcePaths()
Returns:
the binary contents of the resource in a byte[]
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request
Since:
4.3
See Also:
BasicQueryMetadata.getBinaryVDBResource(java.lang.String)

getCharacterVDBResource

public java.lang.String getCharacterVDBResource(java.lang.String resourcePath)
                                         throws MetaMatrixComponentException,
                                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Gets the contents of a VDB resource as a String.

Specified by:
getCharacterVDBResource in interface QueryMetadataInterface
Overrides:
getCharacterVDBResource in class BasicQueryMetadata
Parameters:
resourcePath - a path returned by getVDBResourcePaths()
Returns:
the contents of the resource as a String.
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request
Since:
4.3
See Also:
BasicQueryMetadata.getCharacterVDBResource(java.lang.String)

getMetadataStore

protected CompositeMetadataStore getMetadataStore()

getVDBResourcePaths

public java.lang.String[] getVDBResourcePaths()
                                       throws MetaMatrixComponentException,
                                              QueryMetadataException
Description copied from interface: QueryMetadataInterface
Gets the resource paths of all the resources in the VDB.

Specified by:
getVDBResourcePaths in interface QueryMetadataInterface
Overrides:
getVDBResourcePaths in class BasicQueryMetadata
Returns:
an array of resource paths of the resources in the VDB
Throws:
MetaMatrixComponentException - Unexpected internal system problem during request
QueryMetadataException - Metadata implementation detected a problem during the request
Since:
4.3
See Also:
BasicQueryMetadata.getVDBResourcePaths()

getModeledType

public java.lang.String getModeledType(java.lang.Object elementID)
                                throws MetaMatrixComponentException,
                                       QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the design-time model type of the element specified. This element identifier was previously returned by some other method.

Specified by:
getModeledType in interface QueryMetadataInterface
Overrides:
getModeledType in class BasicQueryMetadata
Parameters:
elementID - Element identifier
Returns:
Modeled type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
Since:
5.0
See Also:
QueryMetadataInterface.getModeledType(java.lang.Object)

getModeledBaseType

public java.lang.String getModeledBaseType(java.lang.Object elementID)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the design-time model base type of the element specified. This element identifier was previously returned by some other method.

Specified by:
getModeledBaseType in interface QueryMetadataInterface
Overrides:
getModeledBaseType in class BasicQueryMetadata
Parameters:
elementID - Element identifier
Returns:
Modeled base type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
Since:
5.0
See Also:
QueryMetadataInterface.getModeledBaseType(java.lang.Object)

getModeledPrimitiveType

public java.lang.String getModeledPrimitiveType(java.lang.Object elementID)
                                         throws MetaMatrixComponentException,
                                                QueryMetadataException
Description copied from interface: QueryMetadataInterface
Get the design-time model primitive type of the element specified. This element identifier was previously returned by some other method.

Specified by:
getModeledPrimitiveType in interface QueryMetadataInterface
Overrides:
getModeledPrimitiveType in class BasicQueryMetadata
Parameters:
elementID - Element identifier
Returns:
Modeled primitive type name
Throws:
QueryMetadataException - Metadata implementation detected a problem during the request
MetaMatrixComponentException - Unexpected internal system problem during request
Since:
5.0
See Also:
QueryMetadataInterface.getModeledPrimitiveType(java.lang.Object)

addToMetadataCache

public java.lang.Object addToMetadataCache(java.lang.Object metadataID,
                                           java.lang.String key,
                                           java.lang.Object value)
                                    throws MetaMatrixComponentException,
                                           QueryMetadataException
Specified by:
addToMetadataCache in interface QueryMetadataInterface
Overrides:
addToMetadataCache in class BasicQueryMetadata
Throws:
MetaMatrixComponentException
QueryMetadataException

getFromMetadataCache

public java.lang.Object getFromMetadataCache(java.lang.Object metadataID,
                                             java.lang.String key)
                                      throws MetaMatrixComponentException,
                                             QueryMetadataException
Specified by:
getFromMetadataCache in interface QueryMetadataInterface
Overrides:
getFromMetadataCache in class BasicQueryMetadata
Throws:
MetaMatrixComponentException
QueryMetadataException


Copyright © 2009. All Rights Reserved.