Examples of BioPAXGraph


Examples of org.gvt.model.BioPAXGraph

    CompoundModel root = (CompoundModel) viewer.getContents().getModel();

    if (root instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) root;

      if (graph.isMechanistic())
      {
        graph.forgetLayout();
        Model model = graph.getBiopaxModel();
        PathwayHolder p = graph.getPathway();
        p.removeFromModel(model);

        main.getAllPathwayNames().remove(p.getName());
      }
    }
View Full Code Here

Examples of org.gvt.model.BioPAXGraph

            graph.setLastAppliedColoring(null);
            new ColorWithExperimentAction(main, graph, dataManager.getType()).run();
          }
        }

        BioPAXGraph currentGraph = main.getPathwayGraph();
        if (currentGraph != null && currentGraph.getLastAppliedColoring() == null)
        {
          new ColorWithExperimentAction(main, currentGraph, dataManager.getType()).run();
        }

        shell.dispose();
View Full Code Here

Examples of org.gvt.model.BioPAXGraph

        int selection = queryTypeBox.getSelectionIndex();

        switch (selection)
        {
          case 0: // Neighbors in loaded file
            BioPAXGraph root = main.getRootGraph();
            if (root != null)
            {
              Collection<EntityHolder> entities = root.getRelatedEntities(refs);

              if (entities.isEmpty())
              {
                MessageDialog.openInformation(main.getShell(), "Not found",
                  "Selected entities are not found in the current model.");
View Full Code Here

Examples of org.gvt.model.biopaxl2.BioPAXGraph

  public CTabItem createNewTab(CompoundModel root)
  {
    if (root == null)
    {
      root = new BioPAXGraph();
    }
    root.setAsRoot();

    String name;

    if (root instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) root;

      if (graph.isMechanistic() && graph.getPathway() == null)
      {
        pathway p = createNewPathway();
        if (graph.getName() != null)
        {
          p.setNAME(adviceTabName(graph.getName()));
        }
        else
        {
          p.setNAME(adviceTabName(null));
        }
        graph.setName(p.getNAME());

        graph.setName(p.getNAME());
        graph.setPathway(p);
        graph.registerContentsToPathway();
        allPathwayNames.add(p.getNAME());
      }
      else
      {
        graph.setName(graph.getPathway() != null ? graph.getPathway().getNAME() :
          adviceTabName(graph.getName()));
      }

      name = graph.getName();
    }
    else
    {
      name = adviceTabName(null);
    }
View Full Code Here

Examples of org.gvt.model.biopaxl2.BioPAXGraph

    ScrollingGraphicalViewer viewer = tabToViewerMap.get(tab);
    CompoundModel root = (CompoundModel) viewer.getContents().getModel();

    if (root instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) root;

      assert graph.getName().equals(tab.getText()) :
        "graph name: " + graph.getName() + " tab name: " + tab.getText();

      if (rememberLayout && graph.isMechanistic())
      {
        graph.recordLayout();
      }
    }
    boolean removed = openTabNames.remove(tab.getText());

    assert removed : "tab name: " + tab.getText();
View Full Code Here

Examples of org.gvt.model.biopaxl2.BioPAXGraph


    Object compmod = tabToViewerMap.get(tab).getContents().getModel();
    if (compmod instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) compmod;
      pathway p = graph.getPathway();

      if (p != null)
      {
        p.setNAME(newName);
      }
      graph.setName(newName);
    }
    tab.setText(newName);

    assert nameToTabMap.size() == openTabNames.size();
  }
View Full Code Here

Examples of org.gvt.model.biopaxl2.BioPAXGraph

    {
      man.associateExperimentData(rootGraph);

      for (ScrollingGraphicalViewer viewer : tabToViewerMap.values())
      {
        BioPAXGraph graph = (BioPAXGraph) viewer.getContents().getModel();
        man.associateExperimentData(graph);
      }
    }
  }
View Full Code Here

Examples of org.gvt.model.biopaxl2.BioPAXGraph

  public CTabItem createNewTab(CompoundModel root)
  {
    if (root == null)
    {
      root = new BioPAXGraph();
    }
    root.setAsRoot();

    String name;

    if (root instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) root;

      if (graph.isMechanistic() && graph.getPathway() == null)
      {
        pathway p = createNewPathway();
        if (graph.getName() != null)
        {
          p.setNAME(adviceTabName(graph.getName()));
        }
        else
        {
          p.setNAME(adviceTabName(null));
        }
        graph.setName(p.getNAME());

        graph.setName(p.getNAME());
        graph.setPathway(p);
        graph.registerContentsToPathway();
        allPathwayNames.add(p.getNAME());
      }
      else
      {
        graph.setName(graph.getPathway() != null ? graph.getPathway().getNAME() :
          adviceTabName(graph.getName()));
      }

      name = graph.getName();
    }
    else
    {
      name = adviceTabName(null);
    }
View Full Code Here

Examples of org.gvt.model.biopaxl2.BioPAXGraph

    ScrollingGraphicalViewer viewer = tabToViewerMap.get(tab);
    CompoundModel root = (CompoundModel) viewer.getContents().getModel();

    if (root instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) root;

      assert graph.getName().equals(tab.getText()) :
        "graph name: " + graph.getName() + " tab name: " + tab.getText();

      if (rememberLayout && graph.isMechanistic())
      {
        graph.recordLayout();
      }
    }
    boolean removed = openTabNames.remove(tab.getText());

    assert removed : "tab name: " + tab.getText();
View Full Code Here

Examples of org.gvt.model.biopaxl2.BioPAXGraph


    Object compmod = tabToViewerMap.get(tab).getContents().getModel();
    if (compmod instanceof BioPAXGraph)
    {
      BioPAXGraph graph = (BioPAXGraph) compmod;
      pathway p = graph.getPathway();

      if (p != null)
      {
        p.setNAME(newName);
      }
      graph.setName(newName);
    }
    tab.setText(newName);

    assert nameToTabMap.size() == openTabNames.size();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.