Package net.sourceforge.align.util.bind.al

Examples of net.sourceforge.align.util.bind.al.Alignmentlist


  /**
   * Formats alignments to a writer preserving all parameters.
   */
  public void format(List<Alignment> alignmentList) {
    Alignmentlist al = new Alignmentlist();
    for (Alignment alignment : alignmentList) {
      net.sourceforge.align.util.bind.al.Alignment a = new net.sourceforge.align.util.bind.al.Alignment();
      a.setScore((double)alignment.getScore());
      a.setSourcelist(createSegmentList(
          alignment.getSourceSegmentList()));
      a.setTargetlist(createSegmentList(
          alignment.getTargetSegmentList()));
      al.getAlignment().add(a);
    }
    AlMarshallerUnmarshaller.getInstance().marshal(al, writer);
  }
View Full Code Here


   * Parses a document into a list of alignments.
   * Retrieves all information stored in this format including score.
   */
  public List<Alignment> parse() {
    List<Alignment> alignmentList = new ArrayList<Alignment>();
    Alignmentlist al =
      AlMarshallerUnmarshaller.getInstance().unmarshal(reader);
    for (net.sourceforge.align.util.bind.al.Alignment a : al.getAlignment()) {
      List<String> sourceSegmentList =
        createSegmentList(a.getSourcelist());
      List<String> targetSegmentList =
        createSegmentList(a.getTargetlist());
      float score = a.getScore().floatValue();
View Full Code Here

TOP

Related Classes of net.sourceforge.align.util.bind.al.Alignmentlist

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.