Search in sources :

Example 21 with MetadataTableRepositoryObject

use of org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject in project tdq-studio-se by Talend.

the class DFTableRepNode method getChildren.

@Override
public List<IRepositoryNode> getChildren() {
    List<IRepositoryNode> nodes = new ArrayList<IRepositoryNode>();
    MetadataTableRepositoryObject viewObject = (MetadataTableRepositoryObject) this.getObject();
    DFColumnFolderRepNode columnFolderNode = new DFColumnFolderRepNode(viewObject, this, ENodeType.TDQ_REPOSITORY_ELEMENT, getProject());
    nodes.add(columnFolderNode);
    return filterResultsIfAny(nodes);
}
Also used : IRepositoryNode(org.talend.repository.model.IRepositoryNode) ArrayList(java.util.ArrayList) MetadataTableRepositoryObject(org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject)

Example 22 with MetadataTableRepositoryObject

use of org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject in project tdq-studio-se by Talend.

the class OverviewResultPage method wapperInput.

/**
 * DOC zshen Comment method "wapperInput".
 *
 * @param indicatorViewList
 * @param parentNode
 * @return
 */
private List<OverviewIndUIElement> wapperInput(List<ViewIndicator> indicatorViewList, IRepositoryNode parentNode) {
    List<OverviewIndUIElement> cataUIEleList = new ArrayList<OverviewIndUIElement>();
    List<IRepositoryNode> children = parentNode.getChildren();
    for (IRepositoryNode folderNode : children) {
        if (folderNode instanceof DBViewFolderRepNode || folderNode instanceof DBCalculationViewFolderRepNode) {
            List<IRepositoryNode> tableNodes = folderNode.getChildren();
            if (tableNodes == null || tableNodes.isEmpty()) {
                continue;
            }
            // MOD 20120315 klliu&yyin TDQ-2391, avoid getting many times for table nodes.
            for (ViewIndicator indicator : indicatorViewList) {
                boolean equals = false;
                for (IRepositoryNode tableNode : tableNodes) {
                    MetadataTable table = ((MetadataTableRepositoryObject) tableNode.getObject()).getTable();
                    String name = table.getName();
                    String tableName = indicator.getTableName();
                    // String connUuid = ResourceHelper.getUUID(table);
                    // String anaUuid = ResourceHelper.getUUID(indicator.getAnalyzedElement());
                    equals = name.equals(tableName);
                    if (equals) {
                        OverviewIndUIElement tableUIEle = new OverviewIndUIElement();
                        tableUIEle.setNode(tableNode);
                        tableUIEle.setOverviewIndicator(indicator);
                        if (DqRepositoryViewService.isComeFromRefrenceProject(getTdDataProvider()) && ColumnSetHelper.getColumns((ColumnSet) table).isEmpty()) {
                            tableUIEle.setVirtualNode(true);
                        }
                        cataUIEleList.add(tableUIEle);
                        break;
                    }
                }
                if (!equals) {
                    OverviewIndUIElement tableUIEle = new OverviewIndUIElement();
                    tableUIEle.setOverviewIndicator(indicator);
                    tableUIEle.setVirtualNode(true);
                    cataUIEleList.add(tableUIEle);
                }
            }
        }
    }
    return cataUIEleList;
}
Also used : IRepositoryNode(org.talend.repository.model.IRepositoryNode) ArrayList(java.util.ArrayList) MetadataTable(org.talend.core.model.metadata.builder.connection.MetadataTable) OverviewIndUIElement(org.talend.dataprofiler.core.model.OverviewIndUIElement) ViewIndicator(org.talend.dataquality.indicators.schema.ViewIndicator) DBViewFolderRepNode(org.talend.dq.nodes.DBViewFolderRepNode) DBCalculationViewFolderRepNode(org.talend.dq.nodes.DBCalculationViewFolderRepNode) MetadataTableRepositoryObject(org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject)

Aggregations

MetadataTableRepositoryObject (org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject)22 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)14 MetadataTable (org.talend.core.model.metadata.builder.connection.MetadataTable)12 ArrayList (java.util.ArrayList)10 IMetadataTable (org.talend.core.model.metadata.IMetadataTable)8 IRepositoryNode (org.talend.repository.model.IRepositoryNode)8 ConnectionItem (org.talend.core.model.properties.ConnectionItem)7 MetadataColumnRepositoryObject (org.talend.core.repository.model.repositoryObject.MetadataColumnRepositoryObject)6 RepositoryNode (org.talend.repository.model.RepositoryNode)6 ERepositoryObjectType (org.talend.core.model.repository.ERepositoryObjectType)5 Command (org.eclipse.gef.commands.Command)4 CompoundCommand (org.eclipse.gef.commands.CompoundCommand)4 Connection (org.talend.core.model.metadata.builder.connection.Connection)4 IElementParameter (org.talend.core.model.process.IElementParameter)4 SAPConnectionItem (org.talend.core.model.properties.SAPConnectionItem)4 SAPFunctionRepositoryObject (org.talend.core.repository.model.repositoryObject.SAPFunctionRepositoryObject)4 PropertyChangeCommand (org.talend.designer.core.ui.editor.cmd.PropertyChangeCommand)4 List (java.util.List)3 Map (java.util.Map)3 EList (org.eclipse.emf.common.util.EList)3