Package org.gvt.model

Examples of org.gvt.model.NodeModel


  protected Command createAddCommand(Request request,
    EditPart childEditPart,
    Object constraint)
  {
    NodeModel part = (NodeModel) childEditPart.getModel();
    Rectangle rect = (Rectangle) constraint;

    AddCommand add = new AddCommand();
    add.setParent((CompoundModel) getHost().getModel());
    add.setChild(part);
View Full Code Here


        Control mod = (Control) map.get(c.getRDFId());
        new EffectorSecondHalf(mod, this, mod.getControl());
      }
      else if (c.isCONTROLLEDOf().isEmpty() && c.getCONTROLLER().size() == 1)
      {
        NodeModel source = map.get(c.getCONTROLLER().iterator().next().getRDFId());
        new NonModulatedEffector(source, this, c,
          c.getCONTROLLER().iterator().next(), inter);
      }
      else
      {
View Full Code Here

    Set<physicalEntityParticipant> prodSet = direction == RIGHT_TO_LEFT ?
      conv.getLEFT() : conv.getRIGHT();
   
    for (physicalEntityParticipant par : subsSet)
    {
      NodeModel sub = map.get(par.getRDFId());
      new Substrate(sub, this, par);
    }
    for (physicalEntityParticipant par : prodSet)
    {
      NodeModel prod = map.get(par.getRDFId());
      new Product(this, prod, par);
    }

    // Infer if this conversion is a transcription

    if (!t && subsSet.isEmpty() && prodSet.size() == 1)
    {
      t = true;
//      this.setText("t");
      util.recordModelTag(BioPAXGraph.TRANSCRIPTION_TAG, "");
    }

    // Create effectors.
   
    for (control con : conv.isCONTROLLEDOf())
    {
      if (map.containsKey(con.getRDFId()))
      {
        Control cont = (Control) map.get(con.getRDFId());
        new EffectorSecondHalf(cont, this, cont.getControl());
      }
      else if (con.isCONTROLLEDOf().isEmpty() && con.getCONTROLLER().size() == 1)
      {
        NodeModel source = map.get(con.getCONTROLLER().iterator().next().getRDFId());
        new NonModulatedEffector(source, this, con,
          con.getCONTROLLER().iterator().next(), conv);
      }
      else
      {
View Full Code Here

    int totalDegree = 0;
    int nodeCounted = 0;

    for (Object o : graph.getNodes())
    {
      NodeModel node = (NodeModel) o;

      if (node instanceof ComplexMember ||
        node instanceof Compartment ||
        (node instanceof Actor && ((Actor) node).isUbique()))
      {
        continue;
      }

      int degree = node.getSourceConnections().size() + node.getTargetConnections().size();

      if (degree > 15)
      {
        System.out.println("degree = " + degree + " node = " + node.getText() + " type = " +
          node.getClass().getName().substring(
            node.getClass().getName().lastIndexOf(".") + 1));
      }

      totalDegree += degree;
      nodeCounted++;
    }
View Full Code Here

    Set<GraphObject> cropto = new HashSet<GraphObject>();

    for (Object o : graph.getNodes())
    {
      NodeModel node = (NodeModel) o;
      if (node.isHighlight())
      {
        cropto.add((GraphObject) node);
      }
    }
View Full Code Here

    Iterator<NodeModel> nodeIter = root.getNodes().iterator();

    while (nodeIter.hasNext())
    {
      NodeModel node = nodeIter.next();
      node.setHighlight(false);

      List<EdgeModel> edges = node.getSourceConnections();

      for (int i = 0; i < edges.size(); i++)
      {
        edges.get(i).setHighlight(false);
      }
View Full Code Here

        ChbControl mod = (ChbControl) map.get(c.getRDFId());
        new EffectorSecondHalf(mod, this, mod.getControl());
      }
      else if (c.getControlledOf().isEmpty() && c.getController().size() == 1)
      {
        NodeModel source = map.get(c.getController().iterator().next().getRDFId());
        new NonModulatedEffector(source, this, c, inter);
      }
      else
      {
        ChbControl ctrl = new ChbControl(root, c, this, map);
View Full Code Here

  /**
   * Gets the graph that this node is inserted.
   */
  public BioPAXGraph getGraph()
  {
    NodeModel parent = (NodeModel) node;

    do
    {
      parent = parent.getParentModel();
    }
    while (parent != null && !(parent instanceof BioPAXGraph));

    return (BioPAXGraph) parent;
  }
View Full Code Here

  /**
   * Gets the compartment that this node is in.
   */
  public Compartment getCompartment()
  {
    NodeModel parent = (NodeModel) node;

    do
    {
      parent = parent.getParentModel();
    }
    while (parent != null && !(parent instanceof Compartment));

    return (Compartment) parent;
  }
View Full Code Here

   * This method returns the name of the corresponding v-level node of this
   * node, if any.
   */
  public String getText()
  {
    NodeModel vNode =
      (NodeModel)this.graphManager.getLayout().viewMapLtoV.get(this);

    if (vNode != null)
    {
      return vNode.getText();
    }
    else
    {
      return null;
    }
View Full Code Here

TOP

Related Classes of org.gvt.model.NodeModel

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.