org.modeshape.sequencer.teiid

## Class VdbModel

- java.lang.Object
- - org.modeshape.sequencer.teiid.VdbModel

- All Implemented Interfaces:
    Comparable<VdbModel>

      public class VdbModel
      extends Object
      implements Comparable<VdbModel>

  A simple POJO that is used to represent the information for a model read in from a VDB manifest ("vdb.xml").

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `VdbModel.Severity` The 'vdb.cnd' and 'teiid.cnd' files contain a property definition for 'vdb:severity' with these literal values.
    `static class` | `VdbModel.ValidationMarker`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_METADATA_TYPE` The default model definition metadata type.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VdbModel(String name, String type, String pathInVdb)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addImport(String newImport)`
    `void` | `addProblem(String severity, String path, String message)`
    `void` | `addProblem(VdbModel.Severity severity, String path, String message)`
    `int` | `compareTo(VdbModel that)` The natural order of VDB models is based upon dependencies (e.g., model imports), where models that depends upon other models will always follow the models they depend on.
    `long` | `getChecksum()`
    `String` | `getDescription()`
    `Set<String>` | `getImports()`
    `String` | `getMetadataType()`
    `String` | `getModelDefinition()`
    `String` | `getName()`
    `String` | `getPathInVdb()`
    `List<VdbModel.ValidationMarker>` | `getProblems()`
    `Map<String,String>` | `getProperties()`
    `String` | `getSourceJndiName()`
    `String` | `getSourceName()`
    `String` | `getSourceTranslator()`
    `String` | `getType()`
    `boolean` | `isBuiltIn()`
    `boolean` | `isDeclarative()`
    `boolean` | `isVisible()`
    `void` | `setBuiltIn(boolean builtIn)`
    `void` | `setChecksum(long checksum)`
    `void` | `setDescription(String newValue)`
    `void` | `setMetadataType(String metadataType)`
    `void` | `setModelDefinition(String modelDefinition)`
    `void` | `setSourceJndiName(String sourceJndiName)`
    `void` | `setSourceName(String sourceName)`
    `void` | `setSourceTranslator(String sourceTranslator)`
    `void` | `setVisible(boolean visible)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_METADATA_TYPE

          public static final String DEFAULT_METADATA_TYPE

      The default model definition metadata type. Value is "DDL".
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### VdbModel

          public VdbModel(String name,
                  String type,
                  String pathInVdb)

      Parameters:
        `name` - the model name (cannot be `null` or empty)
        `type` - the model type (can be `null` or empty)
        `pathInVdb` - the model path (can be `null` or empty)

  - ### Method Detail

    - #### getDescription

          public String getDescription()

      Returns:
        the description (never `null` but can be empty)

    - #### setDescription

          public void setDescription(String newValue)

      Parameters:
        `newValue` - the new description value (can be `null` or empty)

    - #### getName

          public String getName()

      Returns:
        the name (never `null` or empty)

    - #### getModelDefinition

          public String getModelDefinition()

      Returns:
        the model DDL definition (can be `null` or empty)

    - #### setModelDefinition

          public void setModelDefinition(String modelDefinition)

      Parameters:
        `modelDefinition` - the new model definition (can be `null` or empty)

    - #### getMetadataType

          public String getMetadataType()

      Returns:
        the model metadata type associated with the model definition (can be `null` or empty when there is no metadata)

    - #### setMetadataType

          public void setMetadataType(String metadataType)

      Parameters:
        `metadataType` - the new metadata type (can be `null` or empty if default type should be used)

    - #### getProperties

          public Map<String,String> getProperties()

      Returns:
        the overridden properties (never `null`)

    - #### getType

          public String getType()

      Returns:
        the type (never `null` or empty)

    - #### isVisible

          public boolean isVisible()

      Returns:
        visible

    - #### setVisible

          public void setVisible(boolean visible)

      Parameters:
        `visible` - Sets visible to the specified value.

    - #### isBuiltIn

          public boolean isBuiltIn()

      Returns:
        builtIn

    - #### isDeclarative

          public boolean isDeclarative()

      Returns:
        `true` if model definition is declared in the VDB manifest and not by an XMI file

    - #### setBuiltIn

          public void setBuiltIn(boolean builtIn)

      Parameters:
        `builtIn` - Sets builtIn to the specified value.

    - #### getChecksum

          public long getChecksum()

      Returns:
        checksum

    - #### setChecksum

          public void setChecksum(long checksum)

      Parameters:
        `checksum` - Sets checksum to the specified value.

    - #### getPathInVdb

          public String getPathInVdb()

      Returns:
        the path in the VDB (can be `null` or empty)

    - #### getSourceTranslator

          public String getSourceTranslator()

      Returns:
        sourceTranslator

    - #### setSourceTranslator

          public void setSourceTranslator(String sourceTranslator)

      Parameters:
        `sourceTranslator` - Sets sourceTranslator to the specified value.

    - #### getSourceJndiName

          public String getSourceJndiName()

      Returns:
        sourceJndiName

    - #### setSourceJndiName

          public void setSourceJndiName(String sourceJndiName)

      Parameters:
        `sourceJndiName` - Sets sourceJndiName to the specified value.

    - #### getSourceName

          public String getSourceName()

      Returns:
        the source name

    - #### setSourceName

          public void setSourceName(String sourceName)

      Parameters:
        `sourceName` - Sets sourceName to the specified value.

    - #### getImports

          public Set<String> getImports()

      Returns:
        the paths of the imported models (never `null` but can be empty)

    - #### addImport

          public void addImport(String newImport)

      Parameters:
        `newImport` - the model import path being added as an import (cannot be `null` or empty)

    - #### getProblems

          public List<VdbModel.ValidationMarker> getProblems()

      Returns:
        the validation markers (never `null`)

    - #### addProblem

          public void addProblem(VdbModel.Severity severity,
                        String path,
                        String message)

    - #### addProblem

          public void addProblem(String severity,
                        String path,
                        String message)

    - #### compareTo

          public int compareTo(VdbModel that)

      The natural order of VDB models is based upon dependencies (e.g., model imports), where models that depends upon other models will always follow the models they depend on. Thus any model that has no dependencies will always appear first.
      Specified by:
        `compareTo` in interface `Comparable<VdbModel>`
      See Also:
        `Comparable.compareTo(Object)`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.