コード例 #1
0
  /**
   * Gets Interactor List.
   *
   * @return Castor InteractorList.
   */
  private EntrySet.Entry.InteractorList getInteractorList() {
    HashMap proteinSet = getNonRedundantInteractors();
    EntrySet.Entry.InteractorList interactorList = new EntrySet.Entry.InteractorList();

    //  Iterate through all Interactors
    Iterator iterator = proteinSet.values().iterator();

    while (iterator.hasNext()) {
      //  Create new Interactor
      Interactor interactor = (Interactor) iterator.next();
      InteractorElementType jaxbInteractor = new InteractorElementType();
      setNameId(interactor, jaxbInteractor);
      setOrganism(interactor, jaxbInteractor);
      setSequence(interactor, jaxbInteractor);

      XrefType xref = createExternalRefs(interactor);

      if (xref != null) {
        jaxbInteractor.setXref(xref);
      }

      //  Add to Interactor List
      interactorList.getInteractor().add(jaxbInteractor);
    }

    return interactorList;
  }