Search in sources :

Example 11 with DateParameters

use of org.talend.dataquality.indicators.DateParameters in project tdq-studio-se by Talend.

the class AnalysisTableTreeViewer method hasIndicatorParameters.

/**
 * DOC msjian Comment method "hasIndicatorParameters".
 *
 * @param indicatorUnit
 * @return
 */
private boolean hasIndicatorParameters(TableIndicatorUnit indicatorUnit) {
    IndicatorParameters parameters = indicatorUnit.getIndicator().getParameters();
    if (parameters == null) {
        return false;
    }
    if (indicatorUnit.getIndicator() instanceof FrequencyIndicator) {
        return true;
    }
    TextParameters tParameter = parameters.getTextParameter();
    if (tParameter != null) {
        return true;
    }
    DateParameters dParameters = parameters.getDateParameters();
    if (dParameters != null) {
        return true;
    }
    Domain dataValidDomain = parameters.getDataValidDomain();
    if (dataValidDomain != null) {
        return true;
    }
    Domain indicatorValidDomain = parameters.getIndicatorValidDomain();
    if (indicatorValidDomain != null) {
        return true;
    }
    Domain bins = parameters.getBins();
    if (bins != null) {
        return true;
    }
    return false;
}
Also used : TextParameters(org.talend.dataquality.indicators.TextParameters) IndicatorParameters(org.talend.dataquality.indicators.IndicatorParameters) DateParameters(org.talend.dataquality.indicators.DateParameters) Domain(org.talend.dataquality.domain.Domain) FrequencyIndicator(org.talend.dataquality.indicators.FrequencyIndicator)

Example 12 with DateParameters

use of org.talend.dataquality.indicators.DateParameters in project tdq-studio-se by Talend.

the class DateParametersItemProvider method getText.

/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getText(Object object) {
    DateGrain labelValue = ((DateParameters) object).getDateAggregationType();
    String label = labelValue == null ? null : labelValue.toString();
    return label == null || label.length() == 0 ? getString("_UI_DateParameters_type") : getString("_UI_DateParameters_type") + " " + label;
}
Also used : DateGrain(org.talend.dataquality.indicators.DateGrain) DateParameters(org.talend.dataquality.indicators.DateParameters)

Example 13 with DateParameters

use of org.talend.dataquality.indicators.DateParameters in project tdq-studio-se by Talend.

the class MonthLowFrequencyIndicatorImpl method getParameters.

@Override
public IndicatorParameters getParameters() {
    IndicatorParameters parameters = super.getParameters();
    if (parameters == null) {
        parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters();
    }
    DateParameters dateParameters = parameters.getDateParameters();
    if (dateParameters == null) {
        dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters();
    }
    dateParameters.setDateAggregationType(DateGrain.MONTH);
    parameters.setDateParameters(dateParameters);
    this.setParameters(parameters);
    return parameters;
}
Also used : IndicatorParameters(org.talend.dataquality.indicators.IndicatorParameters) DateParameters(org.talend.dataquality.indicators.DateParameters)

Example 14 with DateParameters

use of org.talend.dataquality.indicators.DateParameters in project tdq-studio-se by Talend.

the class QuarterFrequencyIndicatorImpl method getParameters.

@Override
public IndicatorParameters getParameters() {
    IndicatorParameters parameters = super.getParameters();
    if (parameters == null) {
        parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters();
    }
    DateParameters dateParameters = parameters.getDateParameters();
    if (dateParameters == null) {
        dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters();
    }
    dateParameters.setDateAggregationType(DateGrain.QUARTER);
    parameters.setDateParameters(dateParameters);
    this.setParameters(parameters);
    return parameters;
}
Also used : IndicatorParameters(org.talend.dataquality.indicators.IndicatorParameters) DateParameters(org.talend.dataquality.indicators.DateParameters)

Example 15 with DateParameters

use of org.talend.dataquality.indicators.DateParameters in project tdq-studio-se by Talend.

the class WeekLowFrequencyIndicatorImpl method getParameters.

@Override
public IndicatorParameters getParameters() {
    IndicatorParameters parameters = super.getParameters();
    if (parameters == null) {
        parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters();
    }
    DateParameters dateParameters = parameters.getDateParameters();
    if (dateParameters == null) {
        dateParameters = IndicatorsFactory.eINSTANCE.createDateParameters();
    }
    dateParameters.setDateAggregationType(DateGrain.WEEK);
    parameters.setDateParameters(dateParameters);
    this.setParameters(parameters);
    return parameters;
}
Also used : IndicatorParameters(org.talend.dataquality.indicators.IndicatorParameters) DateParameters(org.talend.dataquality.indicators.DateParameters)

Aggregations

DateParameters (org.talend.dataquality.indicators.DateParameters)17 IndicatorParameters (org.talend.dataquality.indicators.IndicatorParameters)15 Domain (org.talend.dataquality.domain.Domain)4 DateGrain (org.talend.dataquality.indicators.DateGrain)3 FrequencyIndicator (org.talend.dataquality.indicators.FrequencyIndicator)3 TdColumn (org.talend.cwm.relational.TdColumn)2 TextParameters (org.talend.dataquality.indicators.TextParameters)2 IndicatorDefinition (org.talend.dataquality.indicators.definition.IndicatorDefinition)2 ArrayList (java.util.ArrayList)1 EClass (org.eclipse.emf.ecore.EClass)1 EFactoryImpl (org.eclipse.emf.ecore.impl.EFactoryImpl)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 TdExpression (org.talend.cwm.relational.TdExpression)1 ModelElementIndicator (org.talend.dataprofiler.core.model.ModelElementIndicator)1 ColumnIndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.ColumnIndicatorUnit)1 IndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit)1 RangeRestriction (org.talend.dataquality.domain.RangeRestriction)1 AverageLengthIndicator (org.talend.dataquality.indicators.AverageLengthIndicator)1 AvgLengthWithBlankIndicator (org.talend.dataquality.indicators.AvgLengthWithBlankIndicator)1 AvgLengthWithBlankNullIndicator (org.talend.dataquality.indicators.AvgLengthWithBlankNullIndicator)1