Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.program.tagvalue
Class Aggregator

    java.lang.Object
      org.biojava.bio.program.tagvalue.SimpleTagValueWrapper
          org.biojava.bio.program.tagvalue.Aggregator

All Implemented Interfaces:
  TagValueListener, TagValueWrapper

    public class Aggregator

extends SimpleTagValueWrapper

Joins multipel values into single values.

Some properties have values spread across multiple lines. For example, the properties on EMBL features can be spread across multiple lines.

This class provides callbacks to allow event streams to be re-written so that they contain this information.

Since:
  1.4
Author:
  Matthew Pocock

Constructor Summary
`Aggregator(TagValueListener listener, BoundaryFinder observer, String joiner)`

Method Summary
`void` | `endTag()` End the current tag.
`BoundaryFinder` | `getBoundaryFinder()`
`String` | `getJoiner()`
`void` | `setBoundaryFinder(BoundaryFinder finder)`
`void` | `setJoiner(String joiner)`
`void` | `startTag(Object tag)` Start a new tag.
`void` | `value(TagValueContext ctxt, Object value)` A value has been seen.

Methods inherited from class org.biojava.bio.program.tagvalue.SimpleTagValueWrapper
`endRecord, getDelegate, setDelegate, startRecord`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Aggregator

    public Aggregator(TagValueListener listener,
                      BoundaryFinder observer,
                      String joiner)

Method Detail

### getBoundaryFinder

    public BoundaryFinder getBoundaryFinder()

### setBoundaryFinder

    public void setBoundaryFinder(BoundaryFinder finder)

### getJoiner

    public String getJoiner()

### setJoiner

    public void setJoiner(String joiner)

### startTag

    public void startTag(Object tag)
                  throws ParserException

  Description copied from interface: `TagValueListener`
  Start a new tag.

  Specified by:
    `startTag` in interface `TagValueListener`
  Overrides:
    `startTag` in class `SimpleTagValueWrapper`
  Parameters:
    `tag` - the Object representing the new tag
  Throws:
    `ParserException` - if the tag could not be started

### value

    public void value(TagValueContext ctxt,
                      Object value)
               throws ParserException

  Description copied from interface: `TagValueListener`
  A value has been seen.

  Specified by:
    `value` in interface `TagValueListener`
  Overrides:
    `value` in class `SimpleTagValueWrapper`
  Parameters:
    `ctxt` - a TagValueContext that could be used to push a sub-document
    `value` - the value Object observed
  Throws:
    `ParserException` - if the value could not be processed

### endTag

    public void endTag()
                throws ParserException

  Description copied from interface: `TagValueListener`
  End the current tag.

  Specified by:
    `endTag` in interface `TagValueListener`
  Overrides:
    `endTag` in class `SimpleTagValueWrapper`
  Throws:
    `ParserException` - if the tag could not be ended

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD