Пример #1
0
  /*
   * REPRESSES -> REP
   */
  private String toPigeonInd(Interaction induces) {
    StringBuilder sb = new StringBuilder();

    // get the individual roles
    String inducer = null;
    String inducee = null;
    for (Participation part : induces.getParticipations()) {
      if (Participation.Role.INDUCER == part.getRole()) {
        inducer = part.getParticipant().getName();
      } else if (Participation.Role.INDUCEE == part.getRole()) {
        inducee = part.getParticipant().getName();
      }
    }

    // finally, we build the Pigeon statement
    sb.append(inducer);
    sb.append(" ing ");
    sb.append(inducee);

    return sb.toString();
  }
Пример #2
0
  /*
   * REPRESSES -> REP
   */
  private String toPigeonRep(Interaction represses) {
    StringBuilder sb = new StringBuilder();

    // get the individual roles
    String repressor = null;
    String repressee = null;
    for (Participation part : represses.getParticipations()) {
      if (Participation.Role.REPRESSOR == part.getRole()) {
        repressor = part.getParticipant().getName();
      } else if (Participation.Role.REPRESSEE == part.getRole()) {
        repressee = part.getParticipant().getName();
      }
    }

    // finally, we build the Pigeon statement
    sb.append(repressor);
    sb.append(" rep ");
    sb.append(repressee);

    return sb.toString();
  }