|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.model.ModelUtil
public class ModelUtil
The ModeluUtil class is a helper for accessing data retrieved from extension points defined by 'Base' plug-in.
Constructor Summary | |
---|---|
ModelUtil()
The default constructor. |
|
ModelUtil(IModelPluginRegistryProvider provider)
Constructor which allows to set custom IModelPluginRegistryProvider instance. |
Method Summary | |
---|---|
Map<String,Map<String,String>> |
getAttributeMap(Collection<IDataSet> dataSets)
Constructs map which allows quick look-up of model extension ID for given pair of type name and attribute name. |
String |
getAttributeName(String modelExtensionId,
String typeName,
String attributeId)
Returns the localized name of the attribute with given id defined in the type with given type name of the model with given model extension ID. |
static String |
getColumnDefaultValue(String modelId,
String columnName)
Returns the default value of the column with given name defined in model with given id. |
ModelColumn |
getColumnInfo(org.eclipse.core.runtime.IConfigurationElement column)
Returns ModelColumn constructed of given configuration element (extension) describing it. |
IDataLoader |
getDataLoader(String modelExtensionId)
Returns the data loader for model with given extension identifier. |
ModelColumn[] |
getModelColumns(String modelExtensionId)
Delegated method. |
org.eclipse.core.runtime.IConfigurationElement |
getModelConfiguration(String modelExtensionId)
Returns the model configuration for model with given extension identifier. |
List<ModelInfo> |
getModelInfos()
Delegated method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelUtil()
DefaultModelPluginRegistryProvider
.
public ModelUtil(IModelPluginRegistryProvider provider)
IModelPluginRegistryProvider
instance. If null is passed, the
DefaultModelPluginRegistryProvider
is used. This constructor should be used in tests.
provider
- custom provider instanceMethod Detail |
---|
public org.eclipse.core.runtime.IConfigurationElement getModelConfiguration(String modelExtensionId)
modelExtensionId
- the id of the model extension
public IDataLoader getDataLoader(String modelExtensionId) throws org.eclipse.core.runtime.CoreException
modelExtensionId
- the id of the model extension
org.eclipse.core.runtime.CoreException
public String getAttributeName(String modelExtensionId, String typeName, String attributeId)
modelExtensionId
- The ID of the model of the type which defines the attributetypeName
- The name of the type which defines the attributeattributeId
- The ID of the attribute
public ModelColumn getColumnInfo(org.eclipse.core.runtime.IConfigurationElement column)
column
- The configuration element describing the model column
public Map<String,Map<String,String>> getAttributeMap(Collection<IDataSet> dataSets)
dataSets
- The list of data sets.
public static String getColumnDefaultValue(String modelId, String columnName)
modelId
- The id of the modelcolumnName
- The name of the column
public List<ModelInfo> getModelInfos() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
IModelPluginRegistryProvider.getModelInfos()
public ModelColumn[] getModelColumns(String modelExtensionId)
IModelPluginRegistryProvider.getModelColumns(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |