Search in sources :

Example 31 with UDIndicatorDefinition

use of org.talend.dataquality.indicators.definition.userdefine.UDIndicatorDefinition in project tdq-studio-se by Talend.

the class NewUDIndicatorWizard method createAndSaveCWMFile.

public TypedReturnCode<Object> createAndSaveCWMFile(ModelElement cwmElement) {
    UDIndicatorDefinition indicatorDefinition = (UDIndicatorDefinition) cwmElement;
    UDIHelper.setUDICategory(indicatorDefinition, DefinitionHandler.getInstance().getUserDefinedCountIndicatorCategory());
    IFolder folder = parameter.getFolderProvider().getFolderResource();
    // ADD xqliu 2010-06-04 feature 13454
    recordModificationDate(indicatorDefinition);
    // ~ 13454
    TypedReturnCode<Object> returnCode = ElementWriterFactory.getInstance().createIndicatorDefinitionWriter().create(indicatorDefinition, folder);
    // MOD qiongli 2011-2-18,bug 19014.After creating UDI,reaload all indicators
    DefinitionHandler.getInstance().reloadIndicatorsDefinitions();
    return returnCode;
}
Also used : UDIndicatorDefinition(org.talend.dataquality.indicators.definition.userdefine.UDIndicatorDefinition) IFolder(org.eclipse.core.resources.IFolder)

Aggregations

UDIndicatorDefinition (org.talend.dataquality.indicators.definition.userdefine.UDIndicatorDefinition)31 TdExpression (org.talend.cwm.relational.TdExpression)18 IndicatorDefinition (org.talend.dataquality.indicators.definition.IndicatorDefinition)13 Test (org.junit.Test)9 ArrayList (java.util.ArrayList)7 TdColumn (org.talend.cwm.relational.TdColumn)7 Analysis (org.talend.dataquality.analysis.Analysis)7 TdTable (org.talend.cwm.relational.TdTable)6 RegularExpression (org.talend.dataquality.domain.pattern.RegularExpression)6 IndicatorParameters (org.talend.dataquality.indicators.IndicatorParameters)6 ChartDataEntity (org.talend.dq.indicators.preview.table.ChartDataEntity)6 Expression (orgomg.cwm.objectmodel.core.Expression)6 Domain (org.talend.dataquality.domain.Domain)5 PatternMatchingIndicator (org.talend.dataquality.indicators.PatternMatchingIndicator)5 File (java.io.File)4 DatabaseConnection (org.talend.core.model.metadata.builder.connection.DatabaseConnection)4 AnalysisContext (org.talend.dataquality.analysis.AnalysisContext)4 Pattern (org.talend.dataquality.domain.pattern.Pattern)4 UserDefIndicator (org.talend.dataquality.indicators.sql.UserDefIndicator)4 ModelElement (orgomg.cwm.objectmodel.core.ModelElement)4