Package edu.brown.catalog.conflicts

Examples of edu.brown.catalog.conflicts.ConflictGraph


   
    /**
     * testExportConflictGraph
     */
    public void testExportConflictGraph() throws Exception {
        ConflictGraph graph = new ConflictGraph(catalogContext.database);
        assertNotNull(graph);
        assertTrue(graph.getVertexCount() > 0);
        assertTrue(graph.getEdgeCount() > 0);
       
        GraphvizExport<ConflictVertex, ConflictEdge> graphviz = new GraphvizExport<ConflictVertex, ConflictEdge>(graph);
        String output = graphviz.export("tm1");
//        File f = FileUtil.writeStringToFile(new File("/tmp/tm1-conflict.dot"), output);
//        System.err.println("CONFLICT GRAPH: " + f);
View Full Code Here


   
    /**
     * testSaveConflictGraph
     */
    public void testSaveConflictGraph() throws Exception {
        ConflictGraph graph = new ConflictGraph(catalogContext.database);
        assert(graph.getVertexCount() > 0);
        assert(graph.getEdgeCount() > 0);
        this.writeFile(graph);
       
        String contents = FileUtil.readFile(this.tempFile);
        assertFalse(contents.isEmpty());
        for (AbstractVertex v : graph.getVertices()) {
            Procedure catalog_proc = v.getCatalogItem();
            assertTrue(catalog_proc.getName(), contents.contains(catalog_proc.getName()));
        } // FOR
    }
View Full Code Here

        File defaultFile = new File(String.format("%s-conflict.dot", args.catalogContext.database.getProject()));
        String path = null;
        try {
            path = showSaveDialog("Export ConflictGraph", ".", filter, defaultFile);
            if (path != null) {
                ConflictGraph graph = this.catalogTreeModel.getProcedureConflictGraphNode().getConflictGraph();
                assert(graph != null) : "Unexpected null ConflictGraph";
                String serialized = GraphvizExport.export(graph, args.catalogContext.database.getProject());
                FileUtil.writeStringToFile(new File(path), serialized);
            }
        } catch (Exception ex) {
View Full Code Here

    // -----------------------------------------------------------------
   
    public ProcedureConflictGraphNode(Collection<Procedure> procs) {
        this.catalog_db = CatalogUtil.getDatabase(CollectionUtil.first(procs));
        this.procs = procs;
        this.graph = new ConflictGraph(this.catalog_db, procs);
        this.init();
    }
View Full Code Here

TOP

Related Classes of edu.brown.catalog.conflicts.ConflictGraph

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.