Package org.opensextant.output
Class GISDataFormatter
java.lang.Object
org.opensextant.output.AbstractFormatter
org.opensextant.output.GISDataFormatter
- All Implemented Interfaces:
Closeable
,AutoCloseable
,MatchInterpreter
,ResultsFormatter
- Direct Known Subclasses:
GDBFormatter
,GeoCSVFormatter
,KMLFormatter
,ShapefileFormatter
,WKTFormatter
This is the base class for classes that convert document annotations to GISCore features.
Subclasses differ chiefly by choice of text string for the description field.
For some types of documents (e.g., news articles) the sentence containing the annotation is a
good choice, but for other types (e.g., spreadsheets) sentence splitting may not be successful and
the line of text containing the annotation is a better choice.
- Author:
- Rich Markeloff, MITRE Corp. Initial version created on Dec 20, 2011, Marc C. Ubaldino, MITRE Corp. Refactored, redesigned package using GISCore, 2013.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected org.opensextant.giscore.DocumentType
protected GISDataModel
protected boolean
protected org.opensextant.giscore.output.IGISOutputStream
protected boolean
Fields inherited from class org.opensextant.output.AbstractFormatter
debug, geoInterpreter, includeCoordinate, includeOffsets, log, outputExtension, outputParams, outputType, overwrite, TEXT_WIDTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
close()
protected File
createTempFolder
(String key) protected boolean
This helps you figure out what to put in the GIS products.void
finish()
void
removeField
(String fld) void
Use Default GIS Data Model based on current state of formattervoid
setGisDataModel
(GISDataModel gisDataModel) void
Start output.void
writeGeocodingResult
(ExtractionResult rowdata) Implementation of adding info extraction/geocoding restults to GIS outputs.Methods inherited from class org.opensextant.output.AbstractFormatter
checkOverwrite, createOutputFileName, createOutputStreams, deleteOutput, formatResults, getGeocoding, getJobName, getOutputFilepath, getOutputType, setMatchInterpeter, setOutputDir, setOutputFilename, setParameters
-
Field Details
-
doc_type
protected org.opensextant.giscore.DocumentType doc_type -
os
protected org.opensextant.giscore.output.IGISOutputStream os -
groupByDocument
protected boolean groupByDocument -
gisDataModel
-
allowNonGeo
protected boolean allowNonGeo -
useFileHyperlink
protected boolean useFileHyperlink
-
-
Constructor Details
-
GISDataFormatter
public GISDataFormatter()
-
-
Method Details
-
setGisDataModel
-
setGisDataModel
public void setGisDataModel()Use Default GIS Data Model based on current state of formatter -
start
Start output.- Specified by:
start
in interfaceResultsFormatter
- Specified by:
start
in classAbstractFormatter
- Throws:
ProcessingException
-
finish
public void finish()- Specified by:
finish
in interfaceResultsFormatter
- Specified by:
finish
in classAbstractFormatter
-
createTempFolder
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classAbstractFormatter
- Throws:
IOException
-
filterOut
This helps you figure out what to put in the GIS products. -
writeGeocodingResult
Implementation of adding info extraction/geocoding restults to GIS outputs.- Specified by:
writeGeocodingResult
in classAbstractFormatter
- Parameters:
rowdata
- the data to write out
-
addField
- Specified by:
addField
in interfaceResultsFormatter
- Parameters:
fld
- field- Throws:
ConfigException
- if not consistent with schema
-
removeField
- Specified by:
removeField
in interfaceResultsFormatter
- Parameters:
fld
- field- Throws:
ConfigException
- if not consistent with schema
-