Search in sources :

Example 6 with DBConnectionFolderRepNode

use of org.talend.dq.nodes.DBConnectionFolderRepNode in project tdq-studio-se by Talend.

the class ComparisonLevelFactory method creatComparisonLevel.

public static IComparisonLevel creatComparisonLevel(Object selectedObject) {
    IComparisonLevel comparisonLevel = null;
    if (selectedObject instanceof DBConnectionRepNode) {
        // MOD klliu 2011-02-24 bug 19015
        IRepositoryViewObject resObject = ((DBConnectionRepNode) selectedObject).getObject();
        comparisonLevel = new RepositoryObjectComparisonLevel(resObject);
    } else if (selectedObject instanceof DBTableFolderRepNode) {
        // MOD mzhao FolderNode param need to pass for later reloading from this folder.
        DBTableFolderRepNode dbFolderNode = (DBTableFolderRepNode) selectedObject;
        comparisonLevel = new CatalogSchemaComparisonLevel(dbFolderNode);
    } else if (selectedObject instanceof DBViewFolderRepNode) {
        // MOC yyin 20121101, TDQ-6092, add a condition for the db which donot have catalog, like oracle.
        if ((null == ((DBViewFolderRepNode) selectedObject).getCatalog()) && (((DBViewFolderRepNode) selectedObject).getParent() instanceof DBConnectionFolderRepNode)) {
            // MOD yyi 2011-07-14 21512:the selected obj is db connection in this case
            IRepositoryViewObject resObject = ((DBViewFolderRepNode) selectedObject).getParent().getObject();
            comparisonLevel = new RepositoryObjectComparisonLevel(resObject);
        } else {
            DBViewFolderRepNode dbFolderNode = (DBViewFolderRepNode) selectedObject;
            comparisonLevel = new CatalogSchemaComparisonLevel(dbFolderNode);
        }
    } else if (selectedObject instanceof DBColumnFolderRepNode) {
        DBColumnFolderRepNode dbFolderNode = (DBColumnFolderRepNode) selectedObject;
        comparisonLevel = new TableViewComparisonLevel(dbFolderNode);
    } else if (selectedObject instanceof MetadataTable) {
        MetadataTable resObject = (MetadataTable) selectedObject;
        comparisonLevel = new FileMetadataTableComparisonLevel(resObject);
    } else if (selectedObject instanceof Connection) {
        // MOD qiongli 2011-9-5 feature TDQ-3317.
        comparisonLevel = new DataProviderComparisonLevel(selectedObject);
    } else {
        comparisonLevel = null;
    }
    return comparisonLevel;
}
Also used : DBTableFolderRepNode(org.talend.dq.nodes.DBTableFolderRepNode) DataProviderComparisonLevel(org.talend.cwm.compare.factory.comparisonlevel.DataProviderComparisonLevel) DBConnectionRepNode(org.talend.dq.nodes.DBConnectionRepNode) RepositoryObjectComparisonLevel(org.talend.cwm.compare.factory.comparisonlevel.RepositoryObjectComparisonLevel) Connection(org.talend.core.model.metadata.builder.connection.Connection) CatalogSchemaComparisonLevel(org.talend.cwm.compare.factory.comparisonlevel.CatalogSchemaComparisonLevel) DBViewFolderRepNode(org.talend.dq.nodes.DBViewFolderRepNode) DBColumnFolderRepNode(org.talend.dq.nodes.DBColumnFolderRepNode) TableViewComparisonLevel(org.talend.cwm.compare.factory.comparisonlevel.TableViewComparisonLevel) FileMetadataTableComparisonLevel(org.talend.cwm.compare.factory.comparisonlevel.FileMetadataTableComparisonLevel) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) MetadataTable(org.talend.core.model.metadata.builder.connection.MetadataTable) DBConnectionFolderRepNode(org.talend.dq.nodes.DBConnectionFolderRepNode)

Example 7 with DBConnectionFolderRepNode

use of org.talend.dq.nodes.DBConnectionFolderRepNode in project tdq-studio-se by Talend.

the class DQRepositoryViewLabelProvider method getImage.

@Override
public Image getImage(Object element) {
    Image image = super.getImage(element);
    if (element instanceof IRepositoryNode) {
        IRepositoryNode node = (IRepositoryNode) element;
        if (node instanceof ReportAnalysisRepNode) {
            image = ImageLib.getImage(ImageLib.ANALYSIS_OBJECT);
        } else if (node instanceof ExchangeCategoryRepNode || node instanceof ExchangeComponentRepNode) {
            image = ImageLib.getImage(ImageLib.EXCHANGE);
        } else if (node instanceof RecycleBinRepNode) {
            image = ImageLib.getImage(ImageLib.RECYCLEBIN_EMPTY);
        } else {
            IRepositoryViewObject viewObject = node.getObject();
            ENodeType type = node.getType();
            if (type.equals(ENodeType.SYSTEM_FOLDER)) {
                if (EResourceConstant.REFERENCED_PROJECT.getName().equals(node.getProperties(EProperties.LABEL))) {
                    image = ImageLib.getImage(ImageLib.REFERENCED_PROJECT);
                } else {
                    String label = viewObject.getLabel();
                    if (label.equals(EResourceConstant.DATA_PROFILING.getName())) {
                        image = ImageLib.getImage(ImageLib.DATA_PROFILING);
                    } else if (label.equals(EResourceConstant.METADATA.getName())) {
                        image = ImageLib.getImage(ImageLib.METADATA);
                    } else if (node instanceof DBConnectionFolderRepNode) {
                        image = ImageLib.getImage(ImageLib.CONNECTION);
                    } else if (label.equals(EResourceConstant.FILEDELIMITED.getName())) {
                        image = ImageLib.getImage(ImageLib.FILE_DELIMITED);
                    } else if (label.equals(EResourceConstant.LIBRARIES.getName())) {
                        image = ImageLib.getImage(ImageLib.LIBRARIES);
                    } else if (label.equals(EResourceConstant.EXCHANGE.getName())) {
                        image = ImageLib.getImage(ImageLib.EXCHANGE);
                    } else if (label.equals(EResourceConstant.HADOOP_CLUSTER.getName())) {
                        image = ImageLib.getImage(ImageLib.HADOOP_CLUSTER);
                    } else if (label.equals(EResourceConstant.CONTEXT.getName())) {
                        image = ImageLib.getImage(ImageLib.CONTEXT);
                    } else {
                        image = ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
                    }
                }
            } else if (type.equals(ENodeType.SIMPLE_FOLDER)) {
                image = ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
            } else if (type.equals(ENodeType.REFERENCED_PROJECT)) {
                image = ImageLib.getImage(ImageLib.REFERENCED_PROJECT);
            } else if (type.equals(ENodeType.REPOSITORY_ELEMENT)) {
                // TDQ-7560 when the image is a overlay image,use originalImageName to get the corresponding one.
                String originalImageName = null;
                if (node instanceof DBConnectionRepNode) {
                    originalImageName = ImageLib.TD_DATAPROVIDER;
                    if (!RepositoryNodeHelper.isSupportedConnection(node) || isNeedAddDriverConnection(node)) {
                        image = ImageLib.createErrorIcon(originalImageName);
                    } else if (isInvalidJDBCConnection(node)) {
                        image = ImageLib.createInvalidIcon(originalImageName);
                    } else {
                        image = ImageLib.getImage(originalImageName);
                    }
                } else if (node instanceof DFConnectionRepNode) {
                    originalImageName = ImageLib.FILE_DELIMITED;
                } else if (node instanceof AnalysisRepNode) {
                    originalImageName = ImageLib.ANALYSIS_OBJECT;
                    image = addWarnIconIfNeeded(node, originalImageName);
                } else if (node instanceof ReportRepNode) {
                    originalImageName = ImageLib.REPORT_OBJECT;
                    image = addWarnIconIfNeeded(node, originalImageName);
                } else if (node instanceof SysIndicatorDefinitionRepNode) {
                    originalImageName = ImageLib.IND_DEFINITION;
                } else if (node instanceof PatternRepNode) {
                    originalImageName = ImageLib.PATTERN_REG;
                } else if (node instanceof RuleRepNode) {
                    if (((RuleRepNode) node).getRule() instanceof MatchRuleDefinition) {
                        originalImageName = ImageLib.MATCH_RULE_ICON;
                    } else {
                        originalImageName = ImageLib.DQ_RULE;
                    }
                } else if (node instanceof SourceFileRepNode) {
                    originalImageName = ImageLib.SOURCE_FILE;
                } else if (node instanceof HadoopClusterConnectionRepNode) {
                    originalImageName = ImageLib.HADOOP_CLUSTER;
                } else if (node instanceof HDFSOfHCConnectionNode) {
                    originalImageName = ImageLib.HDFS;
                } else if (node instanceof HiveOfHCConnectionNode) {
                    originalImageName = ImageLib.HIVE_LINK;
                } else if (node instanceof ExchangeCategoryRepNode || node instanceof ExchangeComponentRepNode) {
                    originalImageName = ImageLib.EXCHANGE;
                } else if (node instanceof ContextRepNode) {
                    originalImageName = ImageLib.CONTEXT;
                } else if (node instanceof RepositoryNode) {
                    // MOD qiongli 2011-1-18 get image for nodes in recycle bin
                    Image imageNode = getImageByContentType((RepositoryNode) node);
                    if (image != null) {
                        image = imageNode;
                    }
                }
                if (originalImageName != null && !(node instanceof DBConnectionRepNode || node instanceof AnalysisRepNode || node instanceof ReportRepNode)) {
                    image = ImageLib.getImage(originalImageName);
                }
                // exchange folder did not contain viewObject.
                if (viewObject != null) {
                    // MOD yyi 2011-04-07 19696: "Lock element"
                    ERepositoryStatus status = ProxyRepositoryFactory.getInstance().getStatus(viewObject);
                    Context ctx = CoreRuntimePlugin.getInstance().getContext();
                    RepositoryContext rc = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);
                    // will be enhanced later by TDI-29265.
                    if (rc.isEditableAsReadOnly()) {
                        if (status == ERepositoryStatus.LOCK_BY_USER) {
                            status = ERepositoryStatus.DEFAULT;
                        }
                    }
                    if (ERepositoryStatus.DEFAULT != status && originalImageName != null) {
                        if (ERepositoryStatus.LOCK_BY_USER == status) {
                            image = ImageLib.createLockedByOwnIcon(originalImageName);
                        } else if (ERepositoryStatus.LOCK_BY_OTHER == status) {
                            image = ImageLib.createLockedByOtherIcon(originalImageName);
                        }
                    }
                }
            } else if (type.equals(ENodeType.TDQ_REPOSITORY_ELEMENT)) {
                if (node instanceof DBCatalogRepNode) {
                    image = ImageLib.getImage(ImageLib.CATALOG);
                } else if (node instanceof DBSchemaRepNode) {
                    image = ImageLib.getImage(ImageLib.SCHEMA);
                } else if (node instanceof DBTableFolderRepNode) {
                    image = ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
                } else if (node instanceof DBViewFolderRepNode) {
                    image = ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
                } else if (node instanceof DBTableRepNode || node instanceof DFTableRepNode) {
                    image = ImageLib.getImage(ImageLib.TABLE);
                } else if (node instanceof DBViewRepNode) {
                    image = ImageLib.getImage(ImageLib.VIEW);
                } else if (node instanceof DBColumnRepNode) {
                    if (((DBColumnRepNode) node).isKey()) {
                        image = ImageLib.getImage(ImageLib.PK_COLUMN);
                    } else {
                        image = ImageLib.getImage(ImageLib.TD_COLUMN);
                    }
                } else if (node instanceof DFColumnRepNode) {
                    image = ImageLib.getImage(ImageLib.TD_COLUMN);
                } else if (node instanceof DBColumnFolderRepNode || node instanceof DFColumnFolderRepNode) {
                    image = ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);
                } else if (node instanceof JrxmlTempleteRepNode) {
                    image = ImageLib.getImage(ImageLib.JRXML_ICON);
                }
            }
        }
    }
    return image;
}
Also used : DBConnectionRepNode(org.talend.dq.nodes.DBConnectionRepNode) ERepositoryStatus(org.talend.commons.runtime.model.repository.ERepositoryStatus) RepositoryContext(org.talend.core.context.RepositoryContext) HDFSOfHCConnectionNode(org.talend.dq.nodes.hadoopcluster.HDFSOfHCConnectionNode) MatchRuleDefinition(org.talend.dataquality.rules.MatchRuleDefinition) DBColumnRepNode(org.talend.dq.nodes.DBColumnRepNode) Image(org.eclipse.swt.graphics.Image) SourceFileRepNode(org.talend.dq.nodes.SourceFileRepNode) DBViewFolderRepNode(org.talend.dq.nodes.DBViewFolderRepNode) DBCatalogRepNode(org.talend.dq.nodes.DBCatalogRepNode) ReportRepNode(org.talend.dq.nodes.ReportRepNode) ExchangeComponentRepNode(org.talend.dataprofiler.core.ui.exchange.ExchangeComponentRepNode) SysIndicatorDefinitionRepNode(org.talend.dq.nodes.SysIndicatorDefinitionRepNode) DFTableRepNode(org.talend.dq.nodes.DFTableRepNode) DBConnectionFolderRepNode(org.talend.dq.nodes.DBConnectionFolderRepNode) DBViewRepNode(org.talend.dq.nodes.DBViewRepNode) PatternRepNode(org.talend.dq.nodes.PatternRepNode) AnalysisContext(org.talend.dataquality.analysis.AnalysisContext) Context(org.talend.core.context.Context) RepositoryContext(org.talend.core.context.RepositoryContext) DBTableFolderRepNode(org.talend.dq.nodes.DBTableFolderRepNode) DFColumnFolderRepNode(org.talend.dq.nodes.DFColumnFolderRepNode) DBSchemaRepNode(org.talend.dq.nodes.DBSchemaRepNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) HiveOfHCConnectionNode(org.talend.dq.nodes.hadoopcluster.HiveOfHCConnectionNode) RuleRepNode(org.talend.dq.nodes.RuleRepNode) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) JrxmlTempleteRepNode(org.talend.dq.nodes.JrxmlTempleteRepNode) RecycleBinRepNode(org.talend.dq.nodes.RecycleBinRepNode) DBColumnFolderRepNode(org.talend.dq.nodes.DBColumnFolderRepNode) DFColumnRepNode(org.talend.dq.nodes.DFColumnRepNode) DBTableRepNode(org.talend.dq.nodes.DBTableRepNode) ExchangeCategoryRepNode(org.talend.dataprofiler.core.ui.exchange.ExchangeCategoryRepNode) ReportAnalysisRepNode(org.talend.dq.nodes.ReportAnalysisRepNode) AnalysisRepNode(org.talend.dq.nodes.AnalysisRepNode) DFConnectionRepNode(org.talend.dq.nodes.DFConnectionRepNode) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) ENodeType(org.talend.repository.model.IRepositoryNode.ENodeType) HadoopClusterConnectionRepNode(org.talend.dq.nodes.hadoopcluster.HadoopClusterConnectionRepNode) ReportAnalysisRepNode(org.talend.dq.nodes.ReportAnalysisRepNode) ContextRepNode(org.talend.dq.nodes.ContextRepNode)

Example 8 with DBConnectionFolderRepNode

use of org.talend.dq.nodes.DBConnectionFolderRepNode in project tdq-studio-se by Talend.

the class RepositoryNodeBuilder method createRepositoryNode.

private RepositoryNode createRepositoryNode(IRepositoryViewObject folder, RepositoryNode parentNode, EResourceConstant resConstant, org.talend.core.model.general.Project inWhichProject) throws PersistenceException {
    DQRepositoryNode subFolderNode = null;
    switch(resConstant) {
        case ANALYSIS:
            AnalysisFolderRepNode anaFolderNode = new AnalysisFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(anaFolderNode);
            parentNode.getChildren().add(anaFolderNode);
            return anaFolderNode;
        case REPORTS:
            ReportFolderRepNode repFolderNode = new ReportFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(repFolderNode);
            parentNode.getChildren().add(repFolderNode);
            return repFolderNode;
        case INDICATORS:
            IndicatorFolderRepNode indicatorFolderRepNode = new IndicatorFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(indicatorFolderRepNode);
            parentNode.getChildren().add(indicatorFolderRepNode);
            return indicatorFolderRepNode;
        case JRXML_TEMPLATE:
            JrxmlTempFolderRepNode jrxmlFolderNode = new JrxmlTempFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(jrxmlFolderNode);
            parentNode.getChildren().add(jrxmlFolderNode);
            return jrxmlFolderNode;
        case SOURCE_FILES:
            SourceFileFolderRepNode sourceFileFolder = new SourceFileFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(sourceFileFolder);
            parentNode.getChildren().add(sourceFileFolder);
            return sourceFileFolder;
        case PATTERNS:
            PatternFolderRepNode patternFolder = new PatternFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(patternFolder);
            parentNode.getChildren().add(patternFolder);
            return patternFolder;
        case RULES:
            RulesFolderRepNode ruleFolder = new RulesFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(ruleFolder);
            parentNode.getChildren().add(ruleFolder);
            return ruleFolder;
        case DB_CONNECTIONS:
            DBConnectionFolderRepNode dbFolder = new DBConnectionFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(dbFolder);
            parentNode.getChildren().add(dbFolder);
            return dbFolder;
        case FILEDELIMITED:
            DFConnectionFolderRepNode dfmFolder = new DFConnectionFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(dfmFolder);
            parentNode.getChildren().add(dfmFolder);
            return dfmFolder;
        case HADOOP_CLUSTER:
            if (HadoopClusterUtils.getDefault().isServiceInstalled()) {
                HadoopClusterFolderRepNode hcFolder = new HadoopClusterFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
                folder.setRepositoryNode(hcFolder);
                parentNode.getChildren().add(hcFolder);
                return hcFolder;
            }
        case EXCHANGE:
            ExchangeFolderRepNode exchangeFolder = new ExchangeFolderRepNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(exchangeFolder);
            parentNode.getChildren().add(exchangeFolder);
            return exchangeFolder;
        default:
            subFolderNode = new DQRepositoryNode(folder, parentNode, ENodeType.SYSTEM_FOLDER, inWhichProject);
            folder.setRepositoryNode(subFolderNode);
            parentNode.getChildren().add(subFolderNode);
            if (resConstant.equals(EResourceConstant.PATTERNS)) {
                // MOD gdbu 2011-8-26 bug 23303 : initialization regex and sql folder when initialization pattern folder
                createRepositoryNodeSubSystemFolder(subFolderNode, EResourceConstant.PATTERN_REGEX, inWhichProject);
                createRepositoryNodeSubSystemFolder(subFolderNode, EResourceConstant.PATTERN_SQL, inWhichProject);
            }
            break;
    }
    return subFolderNode;
}
Also used : DQRepositoryNode(org.talend.dq.nodes.DQRepositoryNode) IndicatorFolderRepNode(org.talend.dq.nodes.IndicatorFolderRepNode) SourceFileFolderRepNode(org.talend.dq.nodes.SourceFileFolderRepNode) JrxmlTempFolderRepNode(org.talend.dq.nodes.JrxmlTempFolderRepNode) HadoopClusterFolderRepNode(org.talend.dq.nodes.hadoopcluster.HadoopClusterFolderRepNode) PatternFolderRepNode(org.talend.dq.nodes.PatternFolderRepNode) RulesFolderRepNode(org.talend.dq.nodes.RulesFolderRepNode) ReportFolderRepNode(org.talend.dq.nodes.ReportFolderRepNode) AnalysisFolderRepNode(org.talend.dq.nodes.AnalysisFolderRepNode) ExchangeFolderRepNode(org.talend.dataprofiler.core.ui.exchange.ExchangeFolderRepNode) DBConnectionFolderRepNode(org.talend.dq.nodes.DBConnectionFolderRepNode) DFConnectionFolderRepNode(org.talend.dq.nodes.DFConnectionFolderRepNode)

Example 9 with DBConnectionFolderRepNode

use of org.talend.dq.nodes.DBConnectionFolderRepNode in project tdq-studio-se by Talend.

the class SchemaContentProvider method getChildren.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#getChildren(java.lang.Object)
     */
@Override
public Object[] getChildren(Object parentElement) {
    // if (parentElement instanceof IContainer) {
    // IContainer container = (IContainer) parentElement;
    // IResource[] members = null;
    // try {
    // if (ResourceManager.getConnectionFolder().equals(container)) {
    // return ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.METADATA_CONNECTIONS).toArray();
    // } else if (ResourceManager.getMDMConnectionFolder().equals(container)) {
    // return ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.METADATA_MDMCONNECTION).toArray();
    // }
    // 
    // members = container.members();
    // } catch (CoreException e) {
    // log.error("Can't get the children of container:" + ((IContainer) parentElement).getLocation()); //$NON-NLS-1$
    // } catch (Exception e) {
    // log.error(e, e);
    // }
    // return members;
    // } else if (parentElement instanceof IRepositoryViewObject) {
    // IRepositoryViewObject repoistoryViewObj = (IRepositoryViewObject) parentElement;
    // Item item = repoistoryViewObj.getProperty().getItem();
    // if (item instanceof ConnectionItem) {
    // ((ConnectionItem) item).getConnection().getDataPackage();
    // return ComparatorsFactory.sort(((ConnectionItem) item).getConnection().getDataPackage().toArray(),
    // ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
    // }
    // }
    // else if (parentElement instanceof IFile) {
    // IFile prvFile = (IFile) parentElement;
    // if (FactoriesUtil.isProvFile(prvFile.getFileExtension())) {
    // parentElement = PrvResourceFileHelper.getInstance().getFileResource((IFile) parentElement);
    // return ComparatorsFactory.sort(super.getChildren(parentElement),
    // ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);
    // }
    // }
    List<RepositoryNode> analyzeNode = new ArrayList<RepositoryNode>();
    if (parentElement instanceof IContainer) {
        if (ResourceManager.isMetadataFolder((IResource) parentElement)) {
            IFolder container = (IFolder) parentElement;
            IRepositoryViewObject viewObject = new Folder(((IFolder) container).getName(), ((IFolder) container).getName());
            RepositoryNode node = new RepositoryNode(viewObject, null, ENodeType.SYSTEM_FOLDER);
            viewObject.setRepositoryNode(node);
            Object[] children = super.getChildren(node);
            // if analyze Connection/Catalog/Schema,now only surpport DB type klliu 2011-01-28
            for (Object object : children) {
                if (object instanceof DBConnectionFolderRepNode) {
                    analyzeNode.add((RepositoryNode) object);
                }
            }
            return analyzeNode.toArray();
        }
    }
    return super.getChildren(parentElement);
}
Also used : ArrayList(java.util.ArrayList) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) RepositoryNode(org.talend.repository.model.RepositoryNode) IContainer(org.eclipse.core.resources.IContainer) IFolder(org.eclipse.core.resources.IFolder) Folder(org.talend.core.model.repository.Folder) DBConnectionFolderRepNode(org.talend.dq.nodes.DBConnectionFolderRepNode) IFolder(org.eclipse.core.resources.IFolder)

Aggregations

DBConnectionFolderRepNode (org.talend.dq.nodes.DBConnectionFolderRepNode)9 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)6 ArrayList (java.util.ArrayList)5 RepositoryNode (org.talend.repository.model.RepositoryNode)5 DBConnectionRepNode (org.talend.dq.nodes.DBConnectionRepNode)4 IRepositoryNode (org.talend.repository.model.IRepositoryNode)4 IContainer (org.eclipse.core.resources.IContainer)3 IFolder (org.eclipse.core.resources.IFolder)3 Folder (org.talend.core.model.repository.Folder)3 DBCatalogRepNode (org.talend.dq.nodes.DBCatalogRepNode)3 DBColumnFolderRepNode (org.talend.dq.nodes.DBColumnFolderRepNode)3 DBSchemaRepNode (org.talend.dq.nodes.DBSchemaRepNode)3 DBTableFolderRepNode (org.talend.dq.nodes.DBTableFolderRepNode)3 DBViewFolderRepNode (org.talend.dq.nodes.DBViewFolderRepNode)3 ExchangeCategoryRepNode (org.talend.dataprofiler.core.ui.exchange.ExchangeCategoryRepNode)2 ExchangeComponentRepNode (org.talend.dataprofiler.core.ui.exchange.ExchangeComponentRepNode)2 AnalysisRepNode (org.talend.dq.nodes.AnalysisRepNode)2 DBColumnRepNode (org.talend.dq.nodes.DBColumnRepNode)2 DBTableRepNode (org.talend.dq.nodes.DBTableRepNode)2 DBViewRepNode (org.talend.dq.nodes.DBViewRepNode)2