Package org.teiid.adminapi.impl
Class ModelMetaData
- java.lang.Object
-
- org.teiid.adminapi.impl.AdminObjectImpl
-
- org.teiid.adminapi.impl.ModelMetaData
-
- All Implemented Interfaces:
Serializable
,AdminObject
,Model
public class ModelMetaData extends AdminObjectImpl implements Model
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelMetaData.Message
-
Nested classes/interfaces inherited from interface org.teiid.adminapi.Model
Model.MetadataStatus, Model.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected String
description
protected List<ModelMetaData.Message>
messages
protected Model.MetadataStatus
metadataStatus
protected String
modelType
protected String
path
protected List<ModelMetaData.Message>
runtimeMessages
protected List<String>
sourceMetadataText
protected List<String>
sourceMetadataType
protected Map<String,SourceMappingMetadata>
sources
protected boolean
visible
-
Fields inherited from class org.teiid.adminapi.impl.AdminObjectImpl
attachments
-
Fields inherited from interface org.teiid.adminapi.AdminObject
DELIMITER, DELIMITER_CHAR, ESCAPED_DELIMITER, ESCAPED_WILDCARD, WILDCARD
-
-
Constructor Summary
Constructors Constructor Description ModelMetaData()
-
Method Summary
-
Methods inherited from class org.teiid.adminapi.impl.AdminObjectImpl
addAttachment, addAttchment, addProperty, getAttachment, getHostName, getName, getProperties, getPropertiesMap, getPropertyValue, getServerGroup, getServerName, removeAttachment, removeProperty, setHostName, setName, setProperties, setServerGroup, setServerName
-
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
getName, getProperties, getPropertyValue
-
-
-
-
Field Detail
-
sources
protected Map<String,SourceMappingMetadata> sources
-
modelType
protected String modelType
-
description
protected String description
-
path
protected String path
-
visible
protected boolean visible
-
messages
protected List<ModelMetaData.Message> messages
-
runtimeMessages
protected transient List<ModelMetaData.Message> runtimeMessages
-
metadataStatus
protected Model.MetadataStatus metadataStatus
-
-
Method Detail
-
getDescription
public String getDescription()
Description copied from interface:Model
Description about the model- Specified by:
getDescription
in interfaceModel
- Returns:
-
setDescription
public void setDescription(String description)
-
isSource
public boolean isSource()
Description copied from interface:Model
Determine if this model is a Source model.
-
isVisible
public boolean isVisible()
Description copied from interface:Model
Determine whether this model is exposed for querying.
Note: for imported models, this may be overriden. SeeVDB.isVisible(String)
-
getModelType
public Model.Type getModelType()
Description copied from interface:Model
Retrieve the model type.- Specified by:
getModelType
in interfaceModel
- Returns:
- model type
-
getPath
public String getPath()
-
setPath
public void setPath(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 interfaceModel
- Returns:
true
if this model supports multiple sources
-
setSupportsMultiSourceBindings
public void setSupportsMultiSourceBindings(boolean supports)
-
setModelType
public void setModelType(Model.Type modelType)
-
setModelType
public void setModelType(String modelType)
-
getMetadataStatus
public Model.MetadataStatus getMetadataStatus()
Description copied from interface:Model
Metadata Load status of the model.- Specified by:
getMetadataStatus
in interfaceModel
- Returns:
-
setMetadataStatus
public void setMetadataStatus(Model.MetadataStatus status)
-
setMetadataStatus
public void setMetadataStatus(String status)
-
setVisible
public void setVisible(boolean value)
-
getSourceMappings
public Collection<SourceMappingMetadata> getSourceMappings()
-
getSources
public Map<String,SourceMappingMetadata> getSources()
-
getSourceMapping
public SourceMappingMetadata getSourceMapping(String sourceName)
-
setSourceMappings
public void setSourceMappings(List<SourceMappingMetadata> sources)
-
getSourceNames
public List<String> getSourceNames()
Description copied from interface:Model
Associated Source Names for the Models- Specified by:
getSourceNames
in interfaceModel
- Returns:
- String
-
getSourceConnectionJndiName
public String getSourceConnectionJndiName(String sourceName)
Description copied from interface:Model
Get the configured JNDI name for the given source name.- Specified by:
getSourceConnectionJndiName
in interfaceModel
- Parameters:
sourceName
- - name of the source- Returns:
- null if none configured.
-
getSourceTranslatorName
public String getSourceTranslatorName(String sourceName)
Description copied from interface:Model
Get the configured translator name for the given source- Specified by:
getSourceTranslatorName
in interfaceModel
- Returns:
-
addSourceMapping
public SourceMappingMetadata addSourceMapping(String name, String translatorName, String connJndiName)
-
addSourceMapping
public void addSourceMapping(SourceMappingMetadata source)
-
hasErrors
public boolean hasErrors()
-
getMessages
public List<ModelMetaData.Message> getMessages()
-
getMessages
public List<ModelMetaData.Message> getMessages(boolean includeRuntime)
-
addMessage
public ModelMetaData.Message addMessage(String severity, String message)
-
hasRuntimeMessages
public boolean hasRuntimeMessages()
-
addRuntimeError
public ModelMetaData.Message addRuntimeError(String message)
-
addRuntimeMessage
public ModelMetaData.Message addRuntimeMessage(ModelMetaData.Message.Severity severity, String message)
-
addMessage
public ModelMetaData.Message addMessage(ModelMetaData.Message ve)
-
clearRuntimeMessages
public void clearRuntimeMessages()
-
clearMessages
public void clearMessages()
-
getSchemaSourceType
@Deprecated public String getSchemaSourceType()
Deprecated.- See Also:
getSourceMetadataType()
-
setSchemaSourceType
@Deprecated public void setSchemaSourceType(String schemaSourceType)
Deprecated.- See Also:
addSourceMetadata(String, String)
-
getSchemaText
@Deprecated public String getSchemaText()
Deprecated.- See Also:
getSourceMetadataText()
-
setSchemaText
@Deprecated public void setSchemaText(String schemaText)
Deprecated.- See Also:
addSourceMetadata(String, String)
-
getValidityErrors
public List<String> getValidityErrors()
Description copied from interface:Model
Shows any validity errors present in the model- Specified by:
getValidityErrors
in interfaceModel
- Returns:
-
getReservedNames
public static Collection<String> getReservedNames()
-
-