Package org.opensextant.output
Interface ResultsFormatter
-
- All Known Implementing Classes:
AbstractFormatter
,AbstractGenericFormatter
,CSVFormatter
,CSVGenericFormatter
,GDBFormatter
,GeoCSVFormatter
,GISDataFormatter
,KMLFormatter
,ShapefileFormatter
,WKTFormatter
public interface ResultsFormatter
Interface for classes that generate output from corpora that have been processed by OpenSextant.- Author:
- Rich Markeloff, MITRE Corp. Initial version created on Jul 13, 2011
-
-
Method Summary
Modifier and Type Method Description void
addField(java.lang.String f)
void
finish()
java.lang.String
formatResults(ExtractionResult result)
Formats the results obtained from processing a corpus through OpenSextant.java.lang.String
getJobName()
java.lang.String
getOutputFilepath()
Get the path to the output file.java.lang.String
getOutputType()
Get the type of output produced by this formatter.void
removeField(java.lang.String f)
void
setOutputDir(java.lang.String pathname)
Set the path to the output directory.void
setOutputFilename(java.lang.String filename)
Set the name of the output file.void
setParameters(Parameters params)
A more convenient way of passing in a list of parameters.void
start(java.lang.String nm)
-
-
-
Method Detail
-
setParameters
void setParameters(Parameters params)
A more convenient way of passing in a list of parameters.
-
getJobName
java.lang.String getJobName()
- Returns:
- name of job
-
setOutputDir
void setOutputDir(java.lang.String pathname)
Set the path to the output directory.- Parameters:
pathname
-
-
setOutputFilename
void setOutputFilename(java.lang.String filename)
Set the name of the output file.- Parameters:
filename
-
-
getOutputType
java.lang.String getOutputType()
Get the type of output produced by this formatter.- Returns:
- type of output
-
getOutputFilepath
java.lang.String getOutputFilepath()
Get the path to the output file.- Returns:
- file path of output
-
formatResults
java.lang.String formatResults(ExtractionResult result) throws ProcessingException
Formats the results obtained from processing a corpus through OpenSextant. Returns a string to display to the user. Typically this will be HTML to be shown in a browser.- Parameters:
result
-- Returns:
- A message for the user
- Throws:
ProcessingException
- formatting error
-
start
void start(java.lang.String nm) throws ProcessingException
- Throws:
ProcessingException
-
finish
void finish()
-
addField
void addField(java.lang.String f) throws ConfigException
- Parameters:
f
- field- Throws:
ConfigException
- if not consistent with schema
-
removeField
void removeField(java.lang.String f) throws ConfigException
- Parameters:
f
- field- Throws:
ConfigException
- if not consistent with schema
-
-