InstantiationException, IllegalAccessException { final TableLocation tableName = TableUtilities.parseInputTable(connection, inputTable); final TableLocation nodesName = TableUtilities.suffixTableLocation(tableName, NODE_CENT_SUFFIX); final TableLocation edgesName = TableUtilities.suffixTableLocation(tableName, EDGE_CENT_SUFFIX); try { createTables(connection, nodesName, edgesName);
InstantiationException, IllegalAccessException { final TableLocation tableName = TableUtilities.parseInputTable(connection, inputTable); final TableLocation nodesName = TableUtilities.suffixTableLocation(tableName, NODE_CENT_SUFFIX); final TableLocation edgesName = TableUtilities.suffixTableLocation(tableName, EDGE_CENT_SUFFIX); try { createTables(connection, nodesName, edgesName);
/** * Calculate the node and edge connected component tables. * * @param connection Connection * @param inputTable Edges table produced by ST_Graph * @param orientation Orientation string * @return True if the calculation was successful * @throws SQLException */ public static boolean getConnectedComponents(Connection connection, String inputTable, String orientation) throws SQLException { KeyedGraph graph = prepareGraph(connection, inputTable, orientation, null, VUCent.class, Edge.class); if (graph == null) { return false; } final List<Set<VUCent>> componentsList = getConnectedComponents(graph, orientation); final TableLocation tableName = TableUtilities.parseInputTable(connection, inputTable); final TableLocation nodesName = TableUtilities.suffixTableLocation(tableName, NODE_COMP_SUFFIX); final TableLocation edgesName = TableUtilities.suffixTableLocation(tableName, EDGE_COMP_SUFFIX); if (storeNodeConnectedComponents(connection, nodesName, edgesName, componentsList)) { if (storeEdgeConnectedComponents(connection, tableName, nodesName, edgesName)) { return true; } } return false; }
/** * Calculate the node and edge connected component tables. * * @param connection Connection * @param inputTable Edges table produced by ST_Graph * @param orientation Orientation string * @return True if the calculation was successful * @throws SQLException */ public static boolean getConnectedComponents(Connection connection, String inputTable, String orientation) throws SQLException { KeyedGraph graph = prepareGraph(connection, inputTable, orientation, null, VUCent.class, Edge.class); if (graph == null) { return false; } final List<Set<VUCent>> componentsList = getConnectedComponents(graph, orientation); final TableLocation tableName = TableUtilities.parseInputTable(connection, inputTable); final TableLocation nodesName = TableUtilities.suffixTableLocation(tableName, NODE_COMP_SUFFIX); final TableLocation edgesName = TableUtilities.suffixTableLocation(tableName, EDGE_COMP_SUFFIX); if (storeNodeConnectedComponents(connection, nodesName, edgesName, componentsList)) { if (storeEdgeConnectedComponents(connection, tableName, nodesName, edgesName)) { return true; } } return false; }
final TableLocation nodesName = TableUtilities.suffixTableLocation(tableName, NODES_SUFFIX); final TableLocation edgesName = TableUtilities.suffixTableLocation(tableName, EDGES_SUFFIX); boolean isH2 = JDBCUtilities.isH2DataBase(connection.getMetaData()); if(deleteTables){
final TableLocation nodesName = TableUtilities.suffixTableLocation(tableName, NODES_SUFFIX); final TableLocation edgesName = TableUtilities.suffixTableLocation(tableName, EDGES_SUFFIX); boolean isH2 = JDBCUtilities.isH2DataBase(connection.getMetaData()); if(deleteTables){
final TableLocation nodesName = TableUtilities.suffixTableLocation(tableName, NODES_SUFFIX); final TableLocation edgesName = TableUtilities.suffixTableLocation(tableName, EDGES_SUFFIX); boolean isH2 = JDBCUtilities.isH2DataBase(connection.getMetaData()); if(deleteTables){