Package vg.core.storableGraph

Examples of vg.core.storableGraph.StorableSubGraph


                       "where s1.db_id = " + (new Integer(graphId)).toString() + ";";
      ResultSet resultGraph = currStatement.executeQuery(request);
      if(resultGraph.next()) {
        Integer rootKey = resultGraph.getInt(2);
        if(rootKey != null) {
          StorableSubGraph sg = dbGetStorableSubGraph(rootKey);
          return(sg);
        }
      }
    } catch(SQLException ex) {
      VisualGraph.log.printException(ex);
View Full Code Here


            VisualGraph.log.printException(ex);
          }
      }
    }
    //build subgraph-----------------
    StorableSubGraph ssg = new StorableSubGraph(id_subgraph, id, name, listVertex, listEdge, directed);
    return(ssg);
  }
View Full Code Here

                     }
                     edges.add(ed);
                }
              if (e.name == "")
                e.name = e.id;
              StorableSubGraph ssg = new StorableSubGraph(e.id, e.name, e.nestedVertex, edges, e.directed);
                if (lastVertex.size() != 0) {
                    lastVertex.lastElement().setInnerGraph(ssg.getStorableId());
                }
                this.model.addStorableSubGraph(ssg);
                subgraphIDs.add(ssg.getStorableId());
               
                lastProperties.pop();
                graphSection = false;
            } else if (qName.equals(NODE)) {
                ArrayList<Attr> p = lastProperties.pop();
View Full Code Here

          case DEF_OPEN_NEW_GRAPH:
          {
            UIEventOpenNewGraph bufEvent = (UIEventOpenNewGraph)event;
            Integer graphId = bufEvent.getGraphId();
            Date d = new Date();
            StorableSubGraph ssg = this.parameter.model.getRootStorableSubGraph(graphId);
            VisualGraph.log.printInfo("[" + this.getClass().getName() + ".update] Root subGraph select time: " + (new Date().getTime() - d.getTime()) / 1000.0 + "sec");
            if(ssg != null) {
              IGraphView graphView =  GraphView.newGraphView(ssg, DesktopPanel.this.parameter.userInterface);
                  addTab(graphView.getTitle(), graphView);                           
            } else {
View Full Code Here

            case DEF_OPEN_NEW_TAB:
            {
              UIEventOpenNewTab bufEvent = (UIEventOpenNewTab)event;
              IGraphView view = bufEvent.getView();
              int tabId = bufEvent.getTabId();
              StorableSubGraph ssg = view.getStorableSubGraph();
              SimpleNavigator.this.addTabInNavigator(ssg, bufEvent.getTabId(), bufEvent.getTitle());
              SimpleNavigator.this.selectTabInNavigator(tabId);
              break;
            }
            case DEF_CLOSE_TAB:
View Full Code Here

  }
  public synchronized StorableSubGraph getStorableSubGraph(int subGraphId) {
    return(this.dataBase.getStorableSubGraph(subGraphId));
  }
  public synchronized SubGraph getSubGraph(int subGraphId) {
    StorableSubGraph ssg = this.dataBase.getStorableSubGraph(subGraphId);
    if(ssg != null) {
      return(ssg.getSubGraph());
    }
    return(null);
  }
View Full Code Here

  }
  public synchronized StorableSubGraph getRootStorableSubGraph(int graphId) {
    return(this.dataBase.getStorableRootSubGraph(graphId));
  }
  public synchronized SubGraph getRootSubGraph(int graphId) {
    StorableSubGraph ssg = this.dataBase.getStorableRootSubGraph(graphId);
    if(ssg != null) {
      return(ssg.getSubGraph());
    }
    return(null);
  }
View Full Code Here

          str = input.readLine();
         
        } while (true);
       
        lastRead = str;
    return new StorableSubGraph(vertexes, edges, directed)
    }
View Full Code Here

      final String gmlID = "graph";
      do {
        str = input.readLine();
        i = str.indexOf(gmlID);
      } while (i == -1);
      StorableSubGraph ssg = readGraph(input, str.substring(i + gmlID.length()));
      model.addStorableSubGraph(ssg);
     
      ArrayList<Integer> subgraphIds = new ArrayList<Integer>();
      subgraphIds.add(ssg.getStorableId());
      graph = new StorableGraph(graphName, null, ssg.getStorableId());
      model.addStorableGraph(graph, subgraphIds);
      VisualGraph.progressManager.removeTask(task);
    } catch (IOException e) {
      VisualGraph.log.printStackTrace(e.getStackTrace());
      throw new CoreException(e.getMessage(), EnumCriticalityException.FAILED);
View Full Code Here

    this.graphs = new HashMap<Integer, String>(10);
    this.workObserver = new Observer() {
      public void update(Observable o, Object arg) {
        if(SearchPanelModel.this.pageNumber == DEF_PAGE_1) {
          if(SearchPanelModel.this.close == false) {
            StorableSubGraph ssg = SearchPanelModel.this.workView.getSelectionSubGraph();
            if(ssg == null) {
              ssg = SearchPanelModel.this.workView.getStorableSubGraph();
            }
            Thread t = new Thread(new SetViewRunnable(SearchPanelModel.this.fbSearchPanel, ssg));
            t.start();
View Full Code Here

TOP

Related Classes of vg.core.storableGraph.StorableSubGraph

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.