com.metamatrix.metadata.runtime.api
Interface MetadataSourceAPI

All Known Implementing Classes:
MetadataCache

public interface MetadataSourceAPI

The DataAccessAPI is the common interface to access runtime metadata.


Method Summary
 java.util.Collection getAllModels()
          Returns a Collection of Models that represents all the models
 java.util.Collection getDisplayableModels()
          Returns a Collection of type Model that represents all the models that are considered displayable to the console
 java.util.List getElementsInGroup(GroupID groupID)
          Returns an ordered List of type Element that are contained within the specified key id.
 java.util.Collection getGroupsInModel(ModelID modelID)
           
 Model getModel(ModelID modelID)
          return the specified model
 java.util.Collection getModelsForVisibility(boolean isVisible)
          Returns a Collection of type Model that represents all the models that are either visible or not visible
 java.util.Collection getProceduresInModel(ModelID modelID)
          /** Returns a Collection of type Procedure for the specified model id.
 VirtualDatabase getVirtualDatabase()
          Returns the VirtualDatabase based on the virtual database id.
 VirtualDatabaseID getVirtualDatabaseID()
          Returns the VirtualDatabaseID.
 boolean isModelDetailsLoaded()
          Returns true if the metadata for the groups and elements have been loaded.
 boolean isVisible(java.lang.String resourcePath)
          Returns the visibility for a resource path that exist this vdb
 

Method Detail

isModelDetailsLoaded

boolean isModelDetailsLoaded()
Returns true if the metadata for the groups and elements have been loaded. The loading of the details are only used when the metadata tree is beind displayed. So to cut down on the overhead when it's never been asked for, the details are not loaded when only the models are needed by query processing.

Returns:
true if the metadata details have been loaded.
Since:
4.2

getVirtualDatabase

VirtualDatabase getVirtualDatabase()
                                   throws VirtualDatabaseException
Returns the VirtualDatabase based on the virtual database id.

Returns:
VirtualDatabase
Throws:
VirtualDatabaseException - if an error occurs while trying to read the data.

getVirtualDatabaseID

VirtualDatabaseID getVirtualDatabaseID()
                                       throws VirtualDatabaseDoesNotExistException,
                                              VirtualDatabaseException
Returns the VirtualDatabaseID. This method does validate the existance of the virtual database by reading from the persistance storage before creating the id.

Returns:
VirtualDatabaseID
Throws:
VirtualDatabaseDoesNotExistException - exception if the virtual database does not exist
VirtualDatabaseException - if an error occurs while trying to read the data.

getAllModels

java.util.Collection getAllModels()
                                  throws VirtualDatabaseException
Returns a Collection of Models that represents all the models

Returns:
Collection of type Model
Throws:
VirtualDatabaseException - an error occurs while trying to read the data.

getDisplayableModels

java.util.Collection getDisplayableModels()
                                          throws VirtualDatabaseException
Returns a Collection of type Model that represents all the models that are considered displayable to the console

Parameters:
vdbID - is the VirtualDatabaseID
Returns:
Collection of type Model
Throws:
VirtualDatabaseException - an error occurs while trying to read the data.

isVisible

boolean isVisible(java.lang.String resourcePath)
Returns the visibility for a resource path that exist this vdb

Parameters:
resourcePath -
Returns:
true if the resource is visible.
Since:
4.2

getModelsForVisibility

java.util.Collection getModelsForVisibility(boolean isVisible)
                                            throws VirtualDatabaseException
Returns a Collection of type Model that represents all the models that are either visible or not visible

Returns:
Collection of type Model
Throws:
VirtualDatabaseException - an error occurs while trying to read the data.

getModel

Model getModel(ModelID modelID)
               throws VirtualDatabaseException
return the specified model

Parameters:
modelID - is the unique id for the model
Returns:
Model
Throws:
VirtualDatabaseException - an error occurs while trying to read the data.

getElementsInGroup

java.util.List getElementsInGroup(GroupID groupID)
                                  throws VirtualDatabaseException
Returns an ordered List of type Element that are contained within the specified key id.

Parameters:
groupID - is the group from which the elements are contained
vdbID - is the VirtualDatabaseID
Returns:
List of type Element
Throws:
InvalidRuntimeIDException - if the group does not exist
VirtualDatabaseTransactionException - an error occurs while trying to read the data.
VirtualDatabaseException

getProceduresInModel

java.util.Collection getProceduresInModel(ModelID modelID)
                                          throws VirtualDatabaseException
/** Returns a Collection of type Procedure for the specified model id.

Parameters:
modelName - is the name of the Model
Returns:
Collection of type Procedure
Throws:
VirtualDatabaseException - an error occurs while trying to read the data.

getGroupsInModel

java.util.Collection getGroupsInModel(ModelID modelID)
                                      throws VirtualDatabaseException
Throws:
VirtualDatabaseException


Copyright © 2009. All Rights Reserved.