ModeShape Distribution 3.0.0.Beta4

org.modeshape.sequencer.teiid
Class VdbModel

java.lang.Object
  extended by 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
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
           
 
Constructor Summary
VdbModel(String name, String type, String pathInVdb)
           
 
Method Summary
 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 getName()
           
 String getPathInVdb()
           
 List<VdbModel.ValidationMarker> getProblems()
           
 Map<String,String> getProperties()
           
 String getSourceJndiName()
           
 String getSourceName()
           
 String getSourceTranslator()
           
 String getType()
           
 boolean isBuiltIn()
           
 boolean isVisible()
           
 void setBuiltIn(boolean builtIn)
           
 void setChecksum(long checksum)
           
 void setDescription(String newValue)
           
 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
 

Constructor Detail

VdbModel

public VdbModel(String name,
                String type,
                String pathInVdb)
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)

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

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 (never 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)

ModeShape Distribution 3.0.0.Beta4

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