/**
* 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);
}