use of org.talend.dataquality.indicators.definition.IndicatorDefinition in project tdq-studio-se by Talend.
the class ExportWizardPage method checkForErrors.
/**
* this check that the folder entered in the target export location exist otherwhise set an erro message and disable
* export.
*/
protected void checkForErrors() {
List<String> errors = new ArrayList<String>();
errors.addAll(writer.check());
ItemRecord[] elements = getElements();
for (ItemRecord record : elements) {
errors.addAll(record.getErrors());
for (File depFile : record.getDependencySet()) {
// ignore it(means not export it).
if (!DqFileUtils.isLocalProjectFile(depFile)) {
continue;
}
// TDQ-12245~
ItemRecord findRecord = ItemRecord.findRecord(depFile);
if (findRecord == null || !repositoryTree.getChecked(findRecord)) {
ModelElement element = ItemRecord.getElement(depFile);
// Indicator, don't add it into errors even if it is not exist
if (element instanceof IndicatorDefinition) {
String uuid = ResourceHelper.getUUID(element);
if (IndicatorDefinitionFileHelper.isTechnialIndicator(uuid)) {
continue;
}
}
// MOD qiongli 2012-12-13 TDQ-5356 use itself file name for jrxml
boolean isJrxmlDepFile = depFile.getName().endsWith(FactoriesUtil.JRXML);
// MOD msjian TDQ-5909: modify to displayName
String dptLabel = element != null && !isJrxmlDepFile && PropertyHelper.getProperty(element) != null ? PropertyHelper.getProperty(element).getDisplayName() : depFile.getName();
// TDQ-5909~
// $NON-NLS-1$ //$NON-NLS-2$
errors.add("\"" + record.getName() + "\" miss dependency : " + dptLabel);
}
}
}
if (!errors.isEmpty()) {
setErrorMessage(errors.get(0));
} else {
setErrorMessage(null);
}
updatePageStatus();
}
use of org.talend.dataquality.indicators.definition.IndicatorDefinition in project tdq-studio-se by Talend.
the class FileTreeContentProvider method hideSomeItems.
/**
* hide Some Items.
*
* @param itemRecords
* @return
*/
private ItemRecord[] hideSomeItems(ItemRecord[] itemRecords) {
List<ItemRecord> result = new ArrayList<ItemRecord>();
for (ItemRecord itemRecord : itemRecords) {
if (itemRecord != null) {
// hide the Technial indicators
if (itemRecord.getElement() != null && itemRecord.getElement() instanceof IndicatorDefinition && !(itemRecord.getElement() instanceof UDIndicatorDefinition)) {
IndicatorDefinition indDef = (IndicatorDefinition) itemRecord.getElement();
String uuid = ResourceHelper.getUUID(indDef);
if (IndicatorDefinitionFileHelper.isTechnialIndicator(uuid)) {
continue;
}
}
// TDQ-10933: Hide the Exchange node TDQ-11036: always hidden
if (EResourceConstant.EXCHANGE.getName().equals(itemRecord.getName())) {
continue;
}
// TDQ-9495: Hide the Reports node when top
if (PluginChecker.isOnlyTopLoaded()) {
if (EResourceConstant.REPORTS.getName().equals(itemRecord.getName())) {
continue;
}
}
}
result.add(itemRecord);
}
return result.toArray(new ItemRecord[result.size()]);
}
use of org.talend.dataquality.indicators.definition.IndicatorDefinition in project tdq-studio-se by Talend.
the class WhereRuleStatisticsStateUtil method getUnitToolTip.
/**
* DOC xqliu Comment method "getUnitToolTip". ADD xqliu 2010-03-10 feature 10834
*
* @param unit
* @return
*/
public static String getUnitToolTip(TableIndicatorUnit unit) {
if (unit != null) {
if (unit.getIndicator() != null && unit.getIndicator().getIndicatorDefinition() != null) {
IndicatorDefinition indicatorDefinition = unit.getIndicator().getIndicatorDefinition();
TaggedValue taggedValue = TaggedValueHelper.getTaggedValue(TaggedValueHelper.DESCRIPTION, indicatorDefinition.getTaggedValue());
if (taggedValue != null) {
return taggedValue.getValue();
}
}
}
return null;
}
use of org.talend.dataquality.indicators.definition.IndicatorDefinition in project tdq-studio-se by Talend.
the class IndicatorImpl method getName.
/*
* (non-Javadoc)
*
* @see orgomg.cwm.objectmodel.core.impl.ModelElementImpl#getName()
*
* ADDED scorreia 2008-05-02 return a default name if none has been set.
*/
@Override
public String getName() {
String n = super.getName();
if (n != null) {
return n;
}
// else
IndicatorDefinition def = getIndicatorDefinition();
if (def != null) {
return def.getName();
}
// else
return this.eClass().getName();
}
use of org.talend.dataquality.indicators.definition.IndicatorDefinition in project tdq-studio-se by Talend.
the class IndicatorImpl method basicSetBuiltInIndicatorDefinition.
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetBuiltInIndicatorDefinition(IndicatorDefinition newBuiltInIndicatorDefinition, NotificationChain msgs) {
IndicatorDefinition oldBuiltInIndicatorDefinition = builtInIndicatorDefinition;
builtInIndicatorDefinition = newBuiltInIndicatorDefinition;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, IndicatorsPackage.INDICATOR__BUILT_IN_INDICATOR_DEFINITION, oldBuiltInIndicatorDefinition, newBuiltInIndicatorDefinition);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations