Package edu.brown.catalog

Examples of edu.brown.catalog.DependencyUtil


            } // FOR
        }

        // Increase the weight of the columns based on the number foreign key
        // descendants they have
        DependencyUtil dependencies = DependencyUtil.singleton(CatalogUtil.getDatabase(catalog_tbl));
        if (debug.val)
            LOG.debug("Calculating descendants for columns");
        for (Entry<Column, Double> entry : column_weights.entrySet()) {
            Column catalog_col = entry.getKey();
            Double weight = entry.getValue();
            int descendants = dependencies.getDescendants(catalog_col).size();
            column_weights.put(catalog_col, weight * (descendants + 1));
            if (descendants > 0)
                LOG.debug("  " + catalog_col + ": " + descendants);
        } // FOR

View Full Code Here


        GraphvizExport<DesignerVertex, DesignerEdge> gvx = new GraphvizExport<DesignerVertex, DesignerEdge>(dgraph);
       
        // Enable full edge labels
        if (args.getBooleanParam(ArgumentsParser.PARAM_CATALOG_LABELS, false)) {
            gvx.setEdgeLabels(true);
            DependencyUtil dependUtil = DependencyUtil.singleton(args.catalog_db);
            for (DesignerEdge e : dgraph.getEdges()) {
                Table tbl0 = dgraph.getSource(e).getCatalogItem();
                Table tbl1 = dgraph.getDest(e).getCatalogItem();
                String label = "";
                for (Column col0 : CatalogUtil.getSortedCatalogItems(tbl0.getColumns(), "index")) {
                    for (Column col1 : dependUtil.getDescendants(col0)) {
                        if (col1.getParent().equals(tbl1) == false) continue;
                        if (label.isEmpty() == false) label += "\n";
                        label += col0.getName() +
                                 StringUtil.UNICODE_RIGHT_ARROW +
                                 col1.getName();
View Full Code Here

TOP

Related Classes of edu.brown.catalog.DependencyUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.