コード例 #1
0
  /**
   * Returns the set of CrossLink objects in distance file format.
   *
   * @param crossLinkList - CrossLinkList object holding all cross-links found for a protein
   *     complex.
   * @param monoLinkList - MonoLinkList object holding all mono-links found for a protein complex.
   * @return String object holding all cross-links in distance file format.
   */
  public static String toString(
      final CrossLinkList crossLinkList, final MonoLinkList monoLinkList) {
    StringBuffer output = new StringBuffer();

    // get necessary values from CrossLinkParameter object.
    if (Boolean.parseBoolean(CrossLinkParameter.getParameter(Parameter.DO_VERBOSE_OUTPUT))) {
      output.append(DistanceWriter.getDistanceFileHeader());
    }

    output.append(crossLinkList.toString());
    output.append(monoLinkList.toString());
    return output.toString();
  }
コード例 #2
0
 /**
  * Writes all cross- and mono-link objects in a distance file format into a file.
  *
  * @param crossLinkList - CrossLinkList object holding all cross-links found for a protein
  *     complex.
  * @param monoLinkList - MonoLinkList object holding all mono-links found for a protein complex.
  * @return {@code TRUE} if creating/writing file is successful, {@code FALSE} if IOException is
  *     thrown and caught.
  */
 public final boolean writeFile(
     final CrossLinkList crossLinkList, final MonoLinkList monoLinkList) {
   return super.write(DistanceWriter.toString(crossLinkList, monoLinkList));
 }