/**
   * Checks if the controlled Interaction contains a controller as a participant. This constraint
   * filters out such cases.
   *
   * @param match current pattern match
   * @param ind mapped indices
   * @return true if participants of teh controlled Interactions not also a controller of the
   *     Control.
   */
  @Override
  public boolean satisfies(Match match, int... ind) {
    Control ctrl = (Control) match.get(ind[0]);

    for (Process process : ctrl.getControlled()) {
      if (process instanceof Interaction) {
        Interaction inter = (Interaction) process;
        Set<Entity> participant = inter.getParticipant();
        for (Controller controller : ctrl.getController()) {
          if (participant.contains(controller)) return false;
        }
      }
    }
    return true;
  }
Example #2
0
  public List<String[]> getInspectable() {
    List<String[]> list = new ArrayList<String[]>();

    BioPAXNode.addNamesAndTypeAndID(list, cont);

    for (Evidence ev : cont.getEvidence()) {
      list.add(new String[] {"Evidence", ev.toString()});
    }

    if (!cont.getInteractionType().isEmpty()) {
      String s = BioPAXNode.formatInString(cont.getInteractionType());
      list.add(new String[] {"Interaction Type", s});
    }

    if (cont.getControlType() != null) {
      list.add(new String[] {"Control Type", cont.getControlType().toString()});
    }

    BioPAXNode.addDataSourceAndXrefAndComments(list, cont);

    return list;
  }
Example #3
0
  public NonModulatedEffector(
      NodeModel source, NodeModel target, Control cont, Process controlled) {
    super(source, target);

    assert source instanceof Actor || source instanceof ChbComplex || source instanceof ChbPathway;
    assert target instanceof ChbConversion
        || target instanceof ChbTempReac
        || target instanceof ChbControl
        || target instanceof Hub;

    this.cont = cont;
    this.controlled = controlled;
    this.sign = ChbControl.isActivation(cont) ? Edge.POSITIVE : Edge.NEGATIVE;

    setColor(isPositive() ? ChbControl.EDGE_COLOR_ACTIVATE : ChbControl.EDGE_COLOR_INHIBIT);
    setArrow(
        cont instanceof Catalysis
            ? "Catalysis"
            : cont.getControlType() == null
                ? "Modulation"
                : this.isPositive() ? "Stimulation" : "Inhibition");
  }