use of org.talend.dataquality.analysis.AnalysisType in project tdq-studio-se by Talend.
the class AnalysisCategoryItemProvider method getText.
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
AnalysisType labelValue = ((AnalysisCategory) object).getAnalysisType();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ? getString("_UI_AnalysisCategory_type") : getString("_UI_AnalysisCategory_type") + " " + label;
}
use of org.talend.dataquality.analysis.AnalysisType in project tdq-studio-se by Talend.
the class DrillDownEditorInput method isColumnSetIndicator.
/**
* DOC talend Comment method "isColumnSetIndicator".
*
* @return
*/
private boolean isColumnSetIndicator() {
Analysis analysis = this.getAnalysis();
AnalysisType analysisType = analysis.getParameters().getAnalysisType();
return AnalysisType.COLUMN_SET == analysisType;
}
use of org.talend.dataquality.analysis.AnalysisType in project tdq-studio-se by Talend.
the class DrillDownEditorInput method getDataSetForMapDB.
/**
* DataSet is used to be the input on the export wizard. unchecked is for the type of mapDB else will have a warning
*
* @param controller
* @return
*/
@SuppressWarnings("unchecked")
public Object getDataSetForMapDB(int pageSize) {
List<String> columnElementList = filterAdaptColumnHeader();
columnHeader = new String[columnElementList.size()];
int headerIndex = 0;
for (String columnElement : columnElementList) {
columnHeader[headerIndex++] = columnElement;
}
AbstractDB<?> mapDB = getMapDB();
if (mapDB == null) {
return null;
}
AnalysisType analysisType = analysis.getParameters().getAnalysisType();
if (AnalysisType.COLUMN_SET == analysisType) {
Long size = getCurrentIndicatorResultSize();
if (ColumnSetDBMap.class.isInstance(mapDB)) {
return SqlExplorerUtils.getDefault().createMapDBColumnSetDataSet(columnHeader, (ColumnSetDBMap) mapDB, size, IDataValidationFactory.INSTANCE.createValidation(currIndicator), pageSize);
}
}
if (DBSet.class.isInstance(mapDB)) {
return SqlExplorerUtils.getDefault().createMapDBSetDataSet(columnHeader, (DBSet<Object>) mapDB, pageSize);
} else {
ColumnFilter columnFilter = getColumnFilter();
Long itemSize = getItemSize(mapDB);
return SqlExplorerUtils.getDefault().createMapDBDataSet(columnHeader, (DBMap<Object, List<Object>>) mapDB, pageSize, columnFilter, itemSize);
}
}
use of org.talend.dataquality.analysis.AnalysisType in project tdq-studio-se by Talend.
the class DrillDownUtils method getMapDB.
/**
* Get MapDB which store the drill down data for current indicator
*
* @param analysis
*
* @return
*/
public static AbstractDB<Object> getMapDB(final ChartDataEntity dataEntity, Analysis analysis, MenuItemEntity itemEntitie) {
AnalysisType analysisType = analysis.getParameters().getAnalysisType();
if (AnalysisType.COLUMN_SET == analysisType) {
return getColumnSetAnalysisMapDB(analysis);
}
Indicator indicator = dataEntity.getIndicator();
String selectValue = dataEntity.getLabel();
// TDQ-10785: fix the drill down menu for frequency table indicator and pattern frequency indicator can not use
// when the data is too long
String keyLabel = String.valueOf(dataEntity.getKey());
// the equals on the right is the same to FrequencyTypeStateUtil.getKeyLabel()
if (keyLabel.length() > 30 && selectValue.equals(keyLabel.substring(0, 30) + "...(" + keyLabel.length() + " characters)")) {
// $NON-NLS-1$ //$NON-NLS-2$
selectValue = keyLabel;
}
// TDQ-10785~
String dbMapName = getDBMapName(analysisType, indicator, selectValue, itemEntitie);
return MapDBUtils.getMapDB(dbMapName, dataEntity.getIndicator());
}
use of org.talend.dataquality.analysis.AnalysisType in project tdq-studio-se by Talend.
the class AnalysisExecutorSelector method getAnalysisExecutor.
/**
* Method "getAnalysisExecutor".
*
* @param analysis the analysis to be run by the executor.
* @return the appropriate executor of the analysis or null when no appropriate executor has been found.
*/
public static IAnalysisExecutor getAnalysisExecutor(Analysis analysis) {
assert analysis != null;
AnalysisType analysisType = AnalysisHelper.getAnalysisType(analysis);
if (analysisType == null) {
// $NON-NLS-1$
log.error(Messages.getString("AnalysisExecutorSelector.ANALYSISTYPEISNOTSET", analysis.getName()));
return null;
}
ExecutionLanguage executionEngine = AnalysisHelper.getExecutionEngine(analysis);
IAnalysisExecutor exec = null;
switch(analysisType) {
case MULTIPLE_COLUMN:
exec = getModelElementAnalysisExecutor(analysis, executionEngine);
break;
case CONNECTION:
exec = new ConnectionAnalysisExecutor();
break;
case SCHEMA:
exec = new SchemaAnalysisExecutor();
break;
case CATALOG:
exec = new CatalogAnalysisExecutor();
break;
case COLUMNS_COMPARISON:
exec = new RowMatchingAnalysisExecutor();
break;
case COLUMN_CORRELATION:
exec = new MultiColumnAnalysisExecutor();
break;
case COLUMN_SET:
// MOD yyi 2011-02-22 17871:delimitefile
exec = getColumnSetAnalysisExecutor(analysis, executionEngine);
break;
case TABLE:
exec = new TableAnalysisSqlExecutor();
break;
case TABLE_FUNCTIONAL_DEPENDENCY:
exec = new FunctionalDependencyExecutor();
break;
case MATCH_ANALYSIS:
exec = new MatchAnalysisExecutor();
break;
default:
// this should not happen. This executor has not been tested for a long time.
exec = null;
}
return exec;
}
Aggregations