Package org.opensextant.output
Class CSVFormatter
java.lang.Object
org.opensextant.output.AbstractFormatter
org.opensextant.output.CSVFormatter
- All Implemented Interfaces:
- MatchInterpreter,- ResultsFormatter
- 
Field SummaryFieldsFields inherited from class org.opensextant.output.AbstractFormatterdebug, geoInterpreter, includeCoordinate, includeOffsets, log, outputExtension, outputParams, outputType, overwrite, TEXT_WIDTH
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidprotected voidAdd a column of data to output; Field is validated ; value is not added if nullvoidvoidPull in data from match into the output schema (map)protected voidCreate a schema instance with the fields properly typed and orderedprotected booleanvoidclose()protected voidCreate the output stream appropriate for the output type.protected final voidDefault fields for generic CSV output.voidfinish()voidvoidvoidwriteGeocodingResult(ExtractionResult rowdata) Write your geocoding result directly to output Result should carry ExtractionResult.recordFile as a URI for original.Methods inherited from class org.opensextant.output.AbstractFormattercheckOverwrite, createOutputFileName, deleteOutput, formatResults, getGeocoding, getJobName, getOutputFilepath, getOutputType, setMatchInterpeter, setOutputDir, setOutputFilename, setParameters
- 
Field Details- 
fieldOrder
 
- 
- 
Constructor Details- 
CSVFormatterpublic CSVFormatter()
 
- 
- 
Method Details- 
addField- Parameters:
- f- field
- Throws:
- ConfigException- if not consistent with schema
 
- 
removeField- Parameters:
- f- field
- Throws:
- ConfigException- if not consistent with schema
 
- 
start- Specified by:
- startin interface- ResultsFormatter
- Specified by:
- startin class- AbstractFormatter
- Throws:
- ProcessingException
 
- 
finishpublic void finish()- Specified by:
- finishin interface- ResultsFormatter
- Specified by:
- finishin class- AbstractFormatter
 
- 
createOutputStreamsDescription copied from class:AbstractFormatterCreate the output stream appropriate for the output type. IO is created using the filename represented by getOutputFilepath()- Specified by:
- createOutputStreamsin class- AbstractFormatter
- Throws:
- Exception
 
- 
close- Specified by:
- closein class- AbstractFormatter
- Throws:
- IOException
 
- 
writeGeocodingResultDescription copied from class:AbstractFormatterWrite your geocoding result directly to output Result should carry ExtractionResult.recordFile as a URI for original.- Specified by:
- writeGeocodingResultin class- AbstractFormatter
- Parameters:
- rowdata- the data to write out
 
- 
buildRowPull in data from match into the output schema (map)- Parameters:
- row- input row to write
- m- given match has more metadata
 
- 
buildSchemaCreate a schema instance with the fields properly typed and ordered- Throws:
- ConfigException- schema configuration error
 
- 
canAdd
- 
addColumnAdd a column of data to output; Field is validated ; value is not added if null
- 
addColumn
- 
defaultFieldsprotected final void defaultFields()Default fields for generic CSV output. If GIS output is desired, then use GeoCSV formatter.
 
-