com.metamatrix.metadata.runtime.model
Class BasicVirtualDatabaseMetadata

java.lang.Object
  extended by com.metamatrix.metadata.runtime.model.BasicVirtualDatabaseMetadata
All Implemented Interfaces:
VirtualDatabaseMetadata

public class BasicVirtualDatabaseMetadata
extends java.lang.Object
implements VirtualDatabaseMetadata


Constructor Summary
BasicVirtualDatabaseMetadata(MetadataSourceAPI metadataSource, VirtualDatabaseID id)
           
 
Method Summary
 java.util.Collection getAllModels()
          Return all models that are defined in the VDB regardless of type or visibility.
 java.util.List getALLPaths(java.util.Collection models)
           
 java.util.Collection getDisplayableModels()
          Obtain a collection of ModelID's deployed in this VirtualDatabase metadata.
 java.util.List getElementsInGroup(GroupID groupID)
          Return an ordered list of ElementID's for the specified groupID.
 java.util.Collection getGroupsInModel(ModelID modelID)
          Obtain a collection of Group for the specified modelID.
 Model getModel(java.lang.String name)
          Return model for the specified name
 java.util.Collection getProcedures(ModelID modelID)
          Obtain a collection of ProcedureID's for the specified modelID.
 VirtualDatabase getVirtualDatabase()
          returns the VirtualDatabase for which this metadata object represents.
 VirtualDatabaseID getVirtualDatabaseID()
          returns the VirtualDatabaseID that identifies the VirtualDatabaseMetadata.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicVirtualDatabaseMetadata

public BasicVirtualDatabaseMetadata(MetadataSourceAPI metadataSource,
                                    VirtualDatabaseID id)
Method Detail

isModelDetailsLoaded

public boolean isModelDetailsLoaded()
Description copied from interface: VirtualDatabaseMetadata
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.

Specified by:
isModelDetailsLoaded in interface VirtualDatabaseMetadata
Returns:

getDisplayableModels

public java.util.Collection getDisplayableModels()
                                          throws VirtualDatabaseException
Obtain a collection of ModelID's deployed in this VirtualDatabase metadata.

Specified by:
getDisplayableModels in interface VirtualDatabaseMetadata
Returns:
Collection of ModelID's
Throws:
VirtualDatabaseException - if an error occurs while trying to read the data.

getAllModels

public java.util.Collection getAllModels()
                                  throws VirtualDatabaseException
Description copied from interface: VirtualDatabaseMetadata
Return all models that are defined in the VDB regardless of type or visibility.

Specified by:
getAllModels in interface VirtualDatabaseMetadata
Returns:
Throws:
VirtualDatabaseException

getModel

public Model getModel(java.lang.String name)
               throws VirtualDatabaseException
Description copied from interface: VirtualDatabaseMetadata
Return model for the specified name

Specified by:
getModel in interface VirtualDatabaseMetadata
Returns:
Throws:
VirtualDatabaseException

isVisible

public boolean isVisible(java.lang.String resourcePath)
                  throws VirtualDatabaseException
Returns the visibility for a resource path.

Specified by:
isVisible in interface VirtualDatabaseMetadata
Parameters:
resourcePath -
Returns:
true if the resource is visible.
Throws:
VirtualDatabaseException
Since:
4.2

getVirtualDatabase

public VirtualDatabase getVirtualDatabase()
                                   throws VirtualDatabaseException
returns the VirtualDatabase for which this metadata object represents.

Specified by:
getVirtualDatabase in interface VirtualDatabaseMetadata
Returns:
VirtualDatabase
Throws:
VirtualDatabaseException - if an error occurs while trying to read the data.

getVirtualDatabaseID

public VirtualDatabaseID getVirtualDatabaseID()
returns the VirtualDatabaseID that identifies the VirtualDatabaseMetadata.

Specified by:
getVirtualDatabaseID in interface VirtualDatabaseMetadata
Returns:
VirtualDatabaseID

getALLPaths

public java.util.List getALLPaths(java.util.Collection models)
                           throws VirtualDatabaseException
Specified by:
getALLPaths in interface VirtualDatabaseMetadata
Throws:
VirtualDatabaseException

getProcedures

public java.util.Collection getProcedures(ModelID modelID)
                                   throws VirtualDatabaseException
Obtain a collection of ProcedureID's for the specified modelID.

Specified by:
getProcedures in interface VirtualDatabaseMetadata
Parameters:
modelID - is the id for the Model
Returns:
Collection of ProcedureID's
Throws:
VirtualDatabaseException - if an error occurs while trying to read the data.

getElementsInGroup

public java.util.List getElementsInGroup(GroupID groupID)
                                  throws VirtualDatabaseException
Return an ordered list of ElementID's for the specified groupID.

Specified by:
getElementsInGroup in interface VirtualDatabaseMetadata
Parameters:
groupID - is the group for which the elements are to be obtained.
Returns:
List of Element's.
Throws:
VirtualDatabaseException - if an error occurs while trying to read the data.

getGroupsInModel

public java.util.Collection getGroupsInModel(ModelID modelID)
                                      throws VirtualDatabaseException
Obtain a collection of Group for the specified modelID.

Specified by:
getGroupsInModel in interface VirtualDatabaseMetadata
Parameters:
modelID - is the id for the Model
Returns:
Collection of ProcedureID's
Throws:
VirtualDatabaseException - if an error occurs while trying to read the data.


Copyright © 2009. All Rights Reserved.