@@ -0,0 +1,2589 @@
+package org.biojava.bio.program.tagvalue;%0A%0Aimport java.lang.StringBuffer;%0Aimport org.biojava.utils.ParserException;%0A%0A/**%0A * Joins multipel values into single values.%0A *%0A * %3Cp%3E%0A * Some properties have values spread across multiple lines. For example,%0A * the properties on EMBL features can be spread across multiple lines.%3C/p%3E%0A *%0A * %3Cp%3E%0A * This class provides callbacks to allow event streams to be re-written%0A * so that they contain this information.%0A * %3C/p%3E%0A *%0A * @since 1.4%0A * @author Matthew Pocock%0A */%0Apublic class Aggregator extends SimpleTagValueWrapper %7B%0A  private BoundaryFinder observer;%0A  private String joiner;%0A%0A  // state%0A  //%0A  private Object tag;%0A  private StringBuffer value;%0A  private boolean inValue;%0A%0A  public Aggregator(TagValueListener listener, BoundaryFinder observer, String joiner) %7B%0A    super(listener);%0A    this.observer = observer;%0A    this.joiner = joiner;%0A    this.value = new StringBuffer();%0A  %7D%0A%0A  public BoundaryFinder getBoundaryFinder() %7B%0A    return observer;%0A  %7D%0A  %0A  public void setBoundaryFinder(BoundaryFinder finder) %7B%0A    this.observer = finder;%0A  %7D%0A  %0A  public String getJoiner() %7B%0A    return joiner;%0A  %7D%0A  %0A  public void setJoiner(String joiner) %7B%0A    this.joiner = joiner;%0A  %7D%0A  %0A  public void startTag(Object tag)%0A  throws ParserException %7B%0A    super.startTag(tag);%0A    inValue = false;%0A    value.setLength(0);%0A  %7D%0A  %0A  public void value(TagValueContext ctxt, Object value)%0A  throws ParserException %7B%0A    boolean isStart = observer.isBoundaryStart(value);%0A    boolean isEnd = observer.isBoundaryEnd(value);%0A    boolean dbv = observer.dropBoundaryValues();%0A    %0A    if(isStart && isEnd) %7B%0A      if(inValue) %7B%0A        super.value(ctxt, this.value.toString());%0A        this.value.setLength(0);%0A        inValue = false;%0A      %7D%0A      %0A      if(!dbv) %7B%0A        super.value(ctxt, value);%0A      %7D%0A    %7D%0A    %0A    if(isStart && !isEnd) %7B%0A      if(inValue) %7B%0A        super.value(ctxt, this.value.toString());%0A        this.value.setLength(0);%0A      %7D%0A      this.value.append(value);%0A      inValue = true;%0A    %7D%0A    %0A    if(!isStart && isEnd) %7B%0A      if(!dbv) %7B%0A        this.value.append(joiner);%0A        this.value.append(value);%0A      %7D%0A      %0A      super.value(ctxt, this.value.toString());%0A      inValue = false;%0A      this.value.setLength(0);%0A    %7D%0A    %0A    if(!isStart && !isEnd) %7B%0A      this.value.append(joiner);%0A      this.value.append(value);%0A      inValue = true;%0A    %7D%0A  %7D%0A%0A  public void endTag()%0A  throws ParserException %7B%0A    if(inValue) %7B%0A      super.value(null, this.value.toString());%0A      inValue = false;%0A    %7D%0A    super.endTag();%0A  %7D%0A%7D%0A

correct spelling of name