use of org.talend.repository.hcatalog.model.HCatalogNode in project tbd-studio-se by Talend.
the class TableSelectorTreeViewerProvider method getChildren.
@Override
public Object[] getChildren(Object parentElement) {
List<IHCatalogNode> nodes = new ArrayList<IHCatalogNode>();
if (parentElement instanceof HCatalogConnection) {
try {
List<TdTable> tables = ExtractMetaDataFromHCatalog.extractTables((HCatalogConnection) parentElement);
for (TdTable table : tables) {
IHCatalogNode node = new HCatalogNode();
node.setValue(table.getLabel());
node.setTable(table);
nodes.add(node);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
return nodes.toArray();
}
Aggregations