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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected org.opensextant.giscore.DocumentTypeprotected GISDataModelprotected booleanprotected org.opensextant.giscore.output.IGISOutputStreamprotected booleanFields inherited from class org.opensextant.output.AbstractFormatter
debug, geoInterpreter, includeCoordinate, includeOffsets, log, outputExtension, outputParams, outputType, overwrite, TEXT_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()protected FilecreateTempFolder(String key) protected booleanThis helps you figure out what to put in the GIS products.voidfinish()voidremoveField(String fld) voidUse Default GIS Data Model based on current state of formattervoidsetGisDataModel(GISDataModel gisDataModel) voidStart output.voidwriteGeocodingResult(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:
startin interfaceResultsFormatter- Specified by:
startin classAbstractFormatter- Throws:
ProcessingException
-
finish
public void finish()- Specified by:
finishin interfaceResultsFormatter- Specified by:
finishin classAbstractFormatter
-
createTempFolder
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein 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:
writeGeocodingResultin classAbstractFormatter- Parameters:
rowdata- the data to write out
-
addField
- Specified by:
addFieldin interfaceResultsFormatter- Parameters:
fld- field- Throws:
ConfigException- if not consistent with schema
-
removeField
- Specified by:
removeFieldin interfaceResultsFormatter- Parameters:
fld- field- Throws:
ConfigException- if not consistent with schema
-