Class 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 Detail

      • GjRowCollector

        public GjRowCollector​(org.geojson.FeatureCollection collection)
        Create a new Collector.
        Parameters:
        collection - The FeatureCollection to write the new Feature to.
    • 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.