com.metamatrix.vdb.runtime
Class BasicModelInfo

java.lang.Object
  extended by com.metamatrix.vdb.runtime.BasicModelInfo
All Implemented Interfaces:
ModelInfo, java.io.Serializable

public class BasicModelInfo
extends java.lang.Object
implements ModelInfo, java.io.Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.metamatrix.common.vdb.api.ModelInfo
PRIVATE, PRIVATE_VISIBILITY, PUBLIC, PUBLIC_VISIBILITY
 
Constructor Summary
protected BasicModelInfo()
           
  BasicModelInfo(ModelInfo model)
          CTOR used when the vdb is being sent to the runtime for creation.
  BasicModelInfo(java.lang.String modelName)
           
 
Method Summary
 void addConnectorBindingByName(java.lang.String connectrBindingName)
           
 void enableMutliSourceBindings(boolean isEnabled)
          Enable the model to have multiple connector bindings associated by passing in true.
 java.util.List getConnectorBindingNames()
          Return the connector binding name(s).
 java.util.Date getDateVersioned()
          Get the date this model was versioned.
 java.io.InputStream getDDLFileContentsAsStream(java.lang.String ddlFileName)
          Get the contents of the given DDL file name.
 byte[] getDDLFileContentsGetBytes(java.lang.String ddlFileName)
          Get the contents of the given DDL file name.
 java.lang.String[] getDDLFileNames()
          Get the list of DDL file names that can be used to generate this materialization.
 java.lang.String getDescription()
          Get this model's description.
 int getModelType()
          Return the type of model
 java.lang.String getModelTypeName()
          Returns the String version of the model type.
 java.lang.String getModelURI()
          Return the model uri.
 java.lang.String getName()
          Get this model's name.
 java.lang.String getPath()
           
 java.lang.String getUUID()
          Get this model's UUID.
 java.lang.String getVersion()
          Get this model's verion.
 java.lang.String getVersionedBy()
          Get the name of the person who versioned this model.
 short getVisibility()
           
 boolean isMaterialization()
          Check whether this model is a materialization of a virtual group.
 boolean isMultiSourceBindingEnabled()
          Returns true if the model has been enabled to have multiple connector bindings assigned.
 boolean isPhysical()
          Whether this is a physical model.
 boolean isVisible()
          Returns true if the model is visible to the use for querying
 void removeConnectorBindingName(java.lang.String bindingName)
           
 void renameConnectorBinding(java.lang.String exitingbindingName, java.lang.String newbindingname)
           
 boolean requiresConnectorBinding()
          Whether this model requires that a connector must be bound to it.
 void setConnectorBindingNames(java.util.List newbindingNames)
           
 void setDDLFiles(java.util.Map ddlFileNamesToFiles)
          Set the Map of DDL file names to DDL file byte arrays.
 void setDescription(java.lang.String desc)
           
 void setIsVisible(boolean visibility)
           
 void setModelType(int type)
           
 void setModelURI(java.lang.String uri)
           
 void setName(java.lang.String name)
           
 void setPath(java.lang.String path)
           
 void setUuid(java.lang.String uuid)
           
 void setVersion(java.lang.String version)
           
 void setVersionDate(java.util.Date date)
           
 void setVersionedBy(java.lang.String versionedBy)
           
 void setVisibility(short visibility)
           
 boolean supportsMultiSourceBindings()
          Returns true if the model, based on its model type, supports mutliple connector bindings.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicModelInfo

protected BasicModelInfo()

BasicModelInfo

public BasicModelInfo(ModelInfo model)
CTOR used when the vdb is being sent to the runtime for creation.

Parameters:
model -

BasicModelInfo

public BasicModelInfo(java.lang.String modelName)
Method Detail

getUUID

public java.lang.String getUUID()
Description copied from interface: ModelInfo
Get this model's UUID.

Specified by:
getUUID in interface ModelInfo
Returns:
The UUID as a String.

getName

public java.lang.String getName()
Description copied from interface: ModelInfo
Get this model's name.

Specified by:
getName in interface ModelInfo
Returns:
The Model name.

getDescription

public java.lang.String getDescription()
Description copied from interface: ModelInfo
Get this model's description.

Specified by:
getDescription in interface ModelInfo
Returns:
The Model description.

getVersion

public java.lang.String getVersion()
Description copied from interface: ModelInfo
Get this model's verion.

Specified by:
getVersion in interface ModelInfo
Returns:
The Model's version.

getModelType

public int getModelType()
Description copied from interface: ModelInfo
Return the type of model

Specified by:
getModelType in interface ModelInfo
Returns:

getModelTypeName

public java.lang.String getModelTypeName()
Description copied from interface: ModelInfo
Returns the String version of the model type.

Specified by:
getModelTypeName in interface ModelInfo
Returns:

getModelURI

public java.lang.String getModelURI()
Description copied from interface: ModelInfo
Return the model uri.

Specified by:
getModelURI in interface ModelInfo
Returns:

getDateVersioned

public java.util.Date getDateVersioned()
Description copied from interface: ModelInfo
Get the date this model was versioned.

Specified by:
getDateVersioned in interface ModelInfo
Returns:
The model's version date.

getVersionedBy

public java.lang.String getVersionedBy()
Description copied from interface: ModelInfo
Get the name of the person who versioned this model.

Specified by:
getVersionedBy in interface ModelInfo
Returns:
The name of the Model versioner.

isPhysical

public boolean isPhysical()
Description copied from interface: ModelInfo
Whether this is a physical model.

Specified by:
isPhysical in interface ModelInfo
Returns:
true if this is a physicalmodel.

requiresConnectorBinding

public boolean requiresConnectorBinding()
Description copied from interface: ModelInfo
Whether this model requires that a connector must be bound to it.

Specified by:
requiresConnectorBinding in interface ModelInfo
Returns:
true if this model requires a connector.

getConnectorBindingNames

public java.util.List getConnectorBindingNames()
Description copied from interface: ModelInfo
Return the connector binding name(s). The only time this list would have more than one connector binding name, is if the model supports (@see #supportsMultiSourceBindings()).

Specified by:
getConnectorBindingNames in interface ModelInfo
Returns:

supportsMultiSourceBindings

public boolean supportsMultiSourceBindings()
Returns true if the model, based on its model type, supports mutliple connector bindings. If true, isMultiSourceBindingEnabled() to determine if the model has been flagged so that the user can actually assign multi connector bindngs.

Specified by:
supportsMultiSourceBindings in interface ModelInfo
Returns:
Since:
4.2
See Also:
Model.supportsMultiSourceBindings()

setName

public void setName(java.lang.String name)

setUuid

public void setUuid(java.lang.String uuid)
Parameters:
uuid -

setVersion

public void setVersion(java.lang.String version)
Parameters:
version -

setVersionDate

public void setVersionDate(java.util.Date date)
Parameters:
date -

setVersionedBy

public void setVersionedBy(java.lang.String versionedBy)
Parameters:
versionedBy -

isVisible

public boolean isVisible()
Description copied from interface: ModelInfo
Returns true if the model is visible to the use for querying

Specified by:
isVisible in interface ModelInfo
Returns:
boolean

isMaterialization

public boolean isMaterialization()
Check whether this model is a materialization of a virtual group.

Specified by:
isMaterialization in interface ModelInfo
Returns:
Returns the isMaterialization.
Since:
4.2

getDDLFileContentsGetBytes

public byte[] getDDLFileContentsGetBytes(java.lang.String ddlFileName)
Description copied from interface: ModelInfo
Get the contents of the given DDL file name.

Specified by:
getDDLFileContentsGetBytes in interface ModelInfo
Parameters:
ddlFileName - The name for which to get the DDL.
Returns:
The byte[] contents of the DDL file or null if this model has no DDL for the given file name or is not a materialization.
Since:
4.2
See Also:
ModelInfo.getDDLFileContentsGetBytes(java.lang.String)

getDDLFileContentsAsStream

public java.io.InputStream getDDLFileContentsAsStream(java.lang.String ddlFileName)
Description copied from interface: ModelInfo
Get the contents of the given DDL file name.

Specified by:
getDDLFileContentsAsStream in interface ModelInfo
Parameters:
ddlFileName - The name for which to get the DDL.
Returns:
The stream contents of the DDL file or null if this modle has no DDL for the given file name or is not a materialization.
Since:
4.2
See Also:
ModelInfo.getDDLFileContentsAsStream(java.lang.String)

getDDLFileNames

public java.lang.String[] getDDLFileNames()
Description copied from interface: ModelInfo
Get the list of DDL file names that can be used to generate this materialization.

If this model is not a materialization, the returned String[] will be empty.

Specified by:
getDDLFileNames in interface ModelInfo
Returns:
A list of file names of DDL file names contained in the VDB.
Since:
4.2
See Also:
ModelInfo.getDDLFileNames()

setDDLFiles

public void setDDLFiles(java.util.Map ddlFileNamesToFiles)
Description copied from interface: ModelInfo
Set the Map of DDL file names to DDL file byte arrays.

Specified by:
setDDLFiles in interface ModelInfo
Parameters:
ddlFileNamesToFiles -
Since:
4.2
See Also:
ModelInfo.setDDLFiles(Map)

setIsVisible

public void setIsVisible(boolean visibility)

setVisibility

public void setVisibility(short visibility)

getVisibility

public short getVisibility()
Specified by:
getVisibility in interface ModelInfo

addConnectorBindingByName

public void addConnectorBindingByName(java.lang.String connectrBindingName)

setConnectorBindingNames

public void setConnectorBindingNames(java.util.List newbindingNames)

removeConnectorBindingName

public void removeConnectorBindingName(java.lang.String bindingName)

renameConnectorBinding

public void renameConnectorBinding(java.lang.String exitingbindingName,
                                   java.lang.String newbindingname)

setModelType

public void setModelType(int type)

setModelURI

public void setModelURI(java.lang.String uri)

setDescription

public void setDescription(java.lang.String desc)

enableMutliSourceBindings

public void enableMutliSourceBindings(boolean isEnabled)
Description copied from interface: ModelInfo
Enable the model to have multiple connector bindings associated by passing in true.

Specified by:
enableMutliSourceBindings in interface ModelInfo
Since:
4.2
See Also:
ModelInfo.enableMutliSourceBindings(boolean)

isMultiSourceBindingEnabled

public boolean isMultiSourceBindingEnabled()
Description copied from interface: ModelInfo
Returns true if the model has been enabled to have multiple connector bindings assigned.

Specified by:
isMultiSourceBindingEnabled in interface ModelInfo
Returns:
Since:
4.2
See Also:
ModelInfo.isMultiSourceBindingEnabled()

getPath

public java.lang.String getPath()
Specified by:
getPath in interface ModelInfo

setPath

public void setPath(java.lang.String path)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.