use of org.talend.dataprofiler.core.model.impl.DelimitedFileIndicatorImpl in project tdq-studio-se by Talend.
the class ModelElementIndicatorHelper method getModelElementDisplayName.
/**
* DOC xqliu Comment method "getModelElementDisplayName".
*
* @param meIndicator
* @return
*/
public static final String getModelElementDisplayName(ModelElementIndicator meIndicator) {
String meName = meIndicator.getElementName();
// $NON-NLS-1$
String typeName = "";
if (meIndicator instanceof ColumnIndicator) {
// MOD scorreia 2010-10-20 bug 16403 avoid NPE here
TdSqlDataType sqlDataType = ((ColumnIndicator) meIndicator).getTdColumn().getSqlDataType();
// $NON-NLS-1$
typeName = sqlDataType != null ? sqlDataType.getName() : "unknown";
} else if (meIndicator instanceof DelimitedFileIndicatorImpl) {
MetadataColumn mColumn = ((DelimitedFileIndicatorImpl) meIndicator).getMetadataColumn();
typeName = TalendTypeConvert.convertToJavaType(mColumn.getTalendType());
}
return meName != null ? meName + PluginConstant.SPACE_STRING + PluginConstant.PARENTHESIS_LEFT + typeName + PluginConstant.PARENTHESIS_RIGHT : // $NON-NLS-1$
"null";
}
use of org.talend.dataprofiler.core.model.impl.DelimitedFileIndicatorImpl in project tdq-studio-se by Talend.
the class AnalysisColumnSetTreeViewer method getModelElemetnDisplayName.
/**
* DOC qiongli Comment method "getModelElemetnDisplayName".
*
* @param meIndicator
* @return
*/
private String getModelElemetnDisplayName(ModelElementIndicator meIndicator) {
if (meIndicator.getModelElementRepositoryNode() == null) {
// $NON-NLS-1$
return "null";
}
String meName = meIndicator.getElementName();
// $NON-NLS-1$
String typeName = "";
if (meIndicator instanceof ColumnIndicator) {
// MOD scorreia 2010-10-20 bug 16403 avoid NPE here
TdSqlDataType sqlDataType = ((ColumnIndicator) meIndicator).getTdColumn().getSqlDataType();
// $NON-NLS-1$
typeName = sqlDataType != null ? sqlDataType.getName() : "unknown";
} else if (meIndicator instanceof DelimitedFileIndicatorImpl) {
MetadataColumn mColumn = ((DelimitedFileIndicatorImpl) meIndicator).getMetadataColumn();
typeName = TalendTypeConvert.convertToJavaType(mColumn.getTalendType());
}
return meName != null ? meName + PluginConstant.SPACE_STRING + PluginConstant.PARENTHESIS_LEFT + typeName + PluginConstant.PARENTHESIS_RIGHT : // $NON-NLS-1$
"null";
}
Aggregations