Class GISDataFormatter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, MatchInterpreter, ResultsFormatter
    Direct Known Subclasses:
    GDBFormatter, GeoCSVFormatter, KMLFormatter, ShapefileFormatter, WKTFormatter

    public abstract class GISDataFormatter
    extends AbstractFormatter
    implements java.io.Closeable
    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 Detail

      • doc_type

        protected org.opensextant.giscore.DocumentType doc_type
      • os

        protected org.opensextant.giscore.output.IGISOutputStream os
      • groupByDocument

        protected boolean groupByDocument
      • allowNonGeo

        protected boolean allowNonGeo
      • useFileHyperlink

        protected boolean useFileHyperlink
    • Constructor Detail

      • GISDataFormatter

        public GISDataFormatter()
    • Method Detail

      • setGisDataModel

        public void setGisDataModel​(GISDataModel gisDataModel)
      • setGisDataModel

        public void setGisDataModel()
        Use Default GIS Data Model based on current state of formatter
      • createTempFolder

        protected java.io.File createTempFolder​(java.lang.String key)
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class AbstractFormatter
        Throws:
        java.io.IOException
      • filterOut

        protected boolean filterOut​(TextMatch geo)
        This helps you figure out what to put in the GIS products.
      • writeGeocodingResult

        public void writeGeocodingResult​(ExtractionResult rowdata)
        Implementation of adding info extraction/geocoding restults to GIS outputs.
        Specified by:
        writeGeocodingResult in class AbstractFormatter
        Parameters:
        rowdata - the data to write out