Class GjRowCollector
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.frostserver.plugin.format.geojson.tools.GjRowCollector
-
public class GjRowCollector extends Object
Collects all elements for a single row in a CSV file. First, each element is registered by its header name. This returns the index of the element. After this, for each row, each element is collected in order. If one or more elements are skipped, the elements set to null. Finally, the entire row is flushed to the CSVPrinter, and the collector is reset.- Author:
- scf
-
-
Constructor Summary
Constructors Constructor Description GjRowCollector(org.geojson.FeatureCollection collection)Create a new Collector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectEntry(String headerName, Object value)Collect a new value for the element with the given index.voidflush()Flush the Feature to the FeatureCollection, and reset the collector.
-
-
-
Method Detail
-
collectEntry
public void collectEntry(String headerName, Object value)
Collect a new value for the element with the given index.- Parameters:
headerName- The name of the element.value- The value of the element for the current row.
-
flush
public void flush()
Flush the Feature to the FeatureCollection, and reset the collector.
-
-