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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations