org.teiid.adminapi.impl
Class ModelMetaData

java.lang.Object
  extended by org.teiid.adminapi.impl.AdminObjectImpl
      extended by org.teiid.adminapi.impl.ModelMetaData
All Implemented Interfaces:
java.io.Serializable, AdminObject, Model

public class ModelMetaData
extends AdminObjectImpl
implements Model

See Also:
Serialized Form

Nested Class Summary
static class ModelMetaData.ValidationError
           
 
Nested classes/interfaces inherited from interface org.teiid.adminapi.Model
Model.Type
 
Field Summary
protected  java.lang.String description
           
protected  java.util.List<ModelMetaData.ValidationError> errors
           
protected  java.lang.String modelType
           
protected  java.lang.String path
           
protected  org.teiid.adminapi.impl.ListOverMap<SourceMappingMetadata> sources
           
protected  java.lang.Boolean visible
           
 
Fields inherited from interface org.teiid.adminapi.AdminObject
DELIMITER, DELIMITER_CHAR, ESCAPED_DELIMITER, ESCAPED_WILDCARD, WILDCARD
 
Constructor Summary
ModelMetaData()
           
 
Method Summary
 ModelMetaData.ValidationError addError(java.lang.String severity, java.lang.String message)
           
 void addSourceMapping(java.lang.String name, java.lang.String translatorName, java.lang.String connJndiName)
           
 void clearErrors()
           
 java.lang.String getDescription()
          Description about the model
 java.util.List<ModelMetaData.ValidationError> getErrors()
           
 java.util.List<PropertyMetadata> getJAXBProperties()
           
 Model.Type getModelType()
          Retrieve the model type.
 java.lang.String getName()
          Get the name for this AdminObject, usually the last component of the identifier.
 java.lang.String getPath()
           
 java.lang.String getSourceConnectionJndiName(java.lang.String sourceName)
          Get the configured JNDI name for the given source name.
 java.util.List<SourceMappingMetadata> getSourceMappings()
           
 java.util.List<java.lang.String> getSourceNames()
          Associated Source Names for the Models
 java.lang.String getSourceTranslatorName(java.lang.String sourceName)
          Get the configured translator name for the given source
 java.util.List<ModelMetaData.ValidationError> getValidationErrors(ModelMetaData.ValidationError.Severity severity)
           
 boolean isSource()
          Determine if this model is a Source model.
 boolean isSupportsMultiSourceBindings()
          Determine whether this model can support more than one source.
 boolean isVisible()
          Determine whether this model is exposed for querying.
 boolean removeError(ModelMetaData.ValidationError remove)
           
 void setDescription(java.lang.String description)
           
 void setErrors(java.util.List<ModelMetaData.ValidationError> errors)
           
 void setModelType(Model.Type modelType)
           
 void setModelType(java.lang.String modelType)
           
 void setName(java.lang.String name)
           
 void setPath(java.lang.String path)
           
 void setSourceMappings(java.util.List<SourceMappingMetadata> sources)
           
 void setSupportsMultiSourceBindings(boolean supports)
           
 void setVisible(java.lang.Boolean value)
           
 java.lang.String toString()
           
 
Methods inherited from class org.teiid.adminapi.impl.AdminObjectImpl
addAttchment, addAttchment, addProperty, getAttachment, getAttachment, getProperties, getPropertyValue, removeAttachment, removeAttachment, setJAXBProperties, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.teiid.adminapi.AdminObject
getProperties, getPropertyValue
 

Field Detail

sources

protected org.teiid.adminapi.impl.ListOverMap<SourceMappingMetadata> sources

modelType

protected java.lang.String modelType

description

protected java.lang.String description

path

protected java.lang.String path

visible

protected java.lang.Boolean visible

errors

protected java.util.List<ModelMetaData.ValidationError> errors
Constructor Detail

ModelMetaData

public ModelMetaData()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: AdminObject
Get the name for this AdminObject, usually the last component of the identifier.

Specified by:
getName in interface AdminObject
Overrides:
getName in class AdminObjectImpl
Returns:
String Name

setName

public void setName(java.lang.String name)
Overrides:
setName in class AdminObjectImpl

getDescription

public java.lang.String getDescription()
Description copied from interface: Model
Description about the model

Specified by:
getDescription in interface Model
Returns:

setDescription

public void setDescription(java.lang.String description)

isSource

public boolean isSource()
Description copied from interface: Model
Determine if this model is a Source model.

Specified by:
isSource in interface Model
Returns:
true if it contains physical group(s).

isVisible

public boolean isVisible()
Description copied from interface: Model
Determine whether this model is exposed for querying.

Specified by:
isVisible in interface Model
Returns:
true if the model is visible for querying.

getModelType

public Model.Type getModelType()
Description copied from interface: Model
Retrieve the model type.

Specified by:
getModelType in interface Model
Returns:
model type

getPath

public java.lang.String getPath()

setPath

public void setPath(java.lang.String path)

isSupportsMultiSourceBindings

public boolean isSupportsMultiSourceBindings()
Description copied from interface: Model
Determine whether this model can support more than one source.

Specified by:
isSupportsMultiSourceBindings in interface Model
Returns:
true if this model supports multiple sources

getJAXBProperties

public java.util.List<PropertyMetadata> getJAXBProperties()
Overrides:
getJAXBProperties in class AdminObjectImpl

setSupportsMultiSourceBindings

public void setSupportsMultiSourceBindings(boolean supports)

setModelType

public void setModelType(Model.Type modelType)

setModelType

public void setModelType(java.lang.String modelType)

toString

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

setVisible

public void setVisible(java.lang.Boolean value)

getSourceMappings

public java.util.List<SourceMappingMetadata> getSourceMappings()

setSourceMappings

public void setSourceMappings(java.util.List<SourceMappingMetadata> sources)

getSourceNames

public java.util.List<java.lang.String> getSourceNames()
Description copied from interface: Model
Associated Source Names for the Models

Specified by:
getSourceNames in interface Model
Returns:
String

getSourceConnectionJndiName

public java.lang.String getSourceConnectionJndiName(java.lang.String sourceName)
Description copied from interface: Model
Get the configured JNDI name for the given source name.

Specified by:
getSourceConnectionJndiName in interface Model
Parameters:
sourceName - - name of the source
Returns:
null if none configured.

getSourceTranslatorName

public java.lang.String getSourceTranslatorName(java.lang.String sourceName)
Description copied from interface: Model
Get the configured translator name for the given source

Specified by:
getSourceTranslatorName in interface Model
Returns:

addSourceMapping

public void addSourceMapping(java.lang.String name,
                             java.lang.String translatorName,
                             java.lang.String connJndiName)

getErrors

public java.util.List<ModelMetaData.ValidationError> getErrors()

setErrors

public void setErrors(java.util.List<ModelMetaData.ValidationError> errors)

getValidationErrors

public java.util.List<ModelMetaData.ValidationError> getValidationErrors(ModelMetaData.ValidationError.Severity severity)

addError

public ModelMetaData.ValidationError addError(java.lang.String severity,
                                              java.lang.String message)

removeError

public boolean removeError(ModelMetaData.ValidationError remove)

clearErrors

public void clearErrors()


Copyright © 2011. All Rights Reserved.