public class GtfReporterMapImporter extends ReporterMapFlatFileImporter implements InteractivePlugin, WrappedConfigureByExample
Plugin.MainType
Modifier and Type | Field and Description |
---|---|
private java.util.List<PluginParameter<java.lang.String>> |
allColumnMappings |
private RequestInformation |
configureJob |
private RequestInformation |
configurePlugin |
protected static PluginParameter<java.lang.String> |
requiredFeatureIdColumnMapping |
private InputStreamTracker |
tracker
Needed for progress reporting since reading from the source
will produce less bytes when wrapped.
|
blockColumnMapping, columnColumnMapping, duplicateFeatureErrorParameter, featureIdColumnMapping, featureIdentificationParameter, metaGridXColumnMapping, metaGridYColumnMapping, missingReporterErrorParameter, positionColumnMapping, reporterIdColumnMapping, rowColumnMapping
complexMappings, dataFooterRegexpParameter, dataHeaderRegexpParameter, dataSplitterRegexpParameter, defaultErrorParameter, errorSection, fileParameter, fileType, headerRegexpParameter, ignoreRegexpParameter, invalidUseOfNullErrorParameter, mappingSection, maxDataColumnsParameter, minDataColumnsParameter, numberFormatErrorParameter, numberOutOfRangeErrorParameter, numDataColumnsType, optionalRegexpType, parserSection, requiredRegexpType, sectionRegexpParameter, stringTooLongErrorParameter, trimQuotesParameter
annotationSection, configuration, COPY_ANNOTATIONS, job, OVERWRITE_ANNOTATIONS, sc
Constructor and Description |
---|
GtfReporterMapImporter() |
Modifier and Type | Method and Description |
---|---|
void |
configure(GuiContext context,
Request request,
Response response)
Store configuration settings for
Request.COMMAND_CONFIGURE_PLUGIN and
Request.COMMAND_CONFIGURE_JOB . |
private java.util.List<PluginParameter<java.lang.String>> |
getAllColumnMappings() |
private RequestInformation |
getConfigurePluginParameters(GuiContext context) |
protected long |
getNumBytes(FlatFileParser ffp)
Get the number of bytes read from the original file.
|
RequestInformation |
getRequestInformation(GuiContext context,
java.lang.String command)
The
Request.COMMAND_CONFIGURE_PLUGIN command will ask for
parser regular expressions and column mappings. |
void |
init(SessionControl sc,
ParameterValues configuration,
ParameterValues job)
Store copies of the session control, plugin and job configuration.
|
java.lang.String |
isInContext(GuiContext context,
java.lang.Object item)
Returns null if the item is a
ArrayDesign that doesn't already have
any features and is using a supported platform/variant. |
java.io.InputStream |
wrapInputStream(java.io.InputStream in)
Wrap the input stream with a
GtfInputStream . |
begin, beginData, end, getGuiContexts, getPermissions, getSuccessMessage, handleData, requiresConfiguration, supportsConfigurations
addErrorHandler, checkColumnMapping, checkColumnMapping, continueWithNextFileAfterError, doImport, finish, getCharset, getCharset, getDecimalSeparator, getErrorHandler, getErrorOption, getFileIterator, getInitializedFlatFileParser, getMainType, getMapper, getMapper, getNumberFormat, getProgress, getSignalHandler, getTotalFileSize, handleHeader, handleSection, isImportable, isImportable, log, log, log, log, run, setUpErrorHandling, start
cloneParameterWithDefaultValue, closeLogFile, createLogFile, done, getCopyAnnotationsParmeter, getCurrentConfiguration, getCurrentJob, getJobOrConfigurationValue, getOverwriteAnnotationsParameters, log, log, storeValue, storeValue, storeValues, validateRequestParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGuiContexts
done, getMainType, getPermissions, requiresConfiguration, run, supportsConfigurations
private InputStreamTracker tracker
private RequestInformation configurePlugin
private RequestInformation configureJob
private java.util.List<PluginParameter<java.lang.String>> allColumnMappings
protected static final PluginParameter<java.lang.String> requiredFeatureIdColumnMapping
public void init(SessionControl sc, ParameterValues configuration, ParameterValues job) throws BaseException
AbstractPlugin
AbstractPlugin.sc
, AbstractPlugin.configuration
and AbstractPlugin.job
variables. If a subclass overrides this method it is
recommended that it also calls super.init(sc, configuration, job)
.init
in interface Plugin
init
in class AbstractPlugin
sc
- A SessionControl
object that the plugin
can use to communicate with the core.configuration
- The configuration parameters for the pluginjob
- The job parameters for the pluginBaseException
- if there is an error.public java.lang.String isInContext(GuiContext context, java.lang.Object item)
ReporterMapFlatFileImporter
ArrayDesign
that doesn't already have
any features and is using a supported platform/variant.isInContext
in interface InteractivePlugin
isInContext
in class ReporterMapFlatFileImporter
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
item
- The currently active item, it's type should match the
GuiContext.getItem()
type, or null if the context is a list
contextNull
if the plugin can use that item, or
a warning-level message explaining why the plugin can't be usedpublic RequestInformation getRequestInformation(GuiContext context, java.lang.String command) throws BaseException
ReporterMapFlatFileImporter
Request.COMMAND_CONFIGURE_PLUGIN
command will ask for
parser regular expressions and column mappings.
The Request.COMMAND_CONFIGURE_JOB
command will ask for
a file and the array design that features should be added to.getRequestInformation
in interface InteractivePlugin
getRequestInformation
in class ReporterMapFlatFileImporter
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
command
- The commandRequestInformation
for the commandBaseException
- if there is an errorpublic void configure(GuiContext context, Request request, Response response)
ReporterMapFlatFileImporter
Request.COMMAND_CONFIGURE_PLUGIN
and
Request.COMMAND_CONFIGURE_JOB
.configure
in interface InteractivePlugin
configure
in class ReporterMapFlatFileImporter
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
request
- Request object with the command and parametersresponse
- Response object in for the plugin to response
throughpublic java.io.InputStream wrapInputStream(java.io.InputStream in) throws java.io.IOException
GtfInputStream
.wrapInputStream
in interface WrappedConfigureByExample
wrapInputStream
in class AbstractFlatFileImporter
in
- The input stream to wrapjava.io.IOException
- If there is an errorAbstractFlatFileImporter.getNumBytes(FlatFileParser)
protected long getNumBytes(FlatFileParser ffp)
getNumBytes
in class AbstractFlatFileImporter
ffp
- The file parser that is used to parsed the fileAbstractFlatFileImporter.wrapInputStream(InputStream)
,
AbstractFlatFileImporter.getProgress(FlatFileParser)
private java.util.List<PluginParameter<java.lang.String>> getAllColumnMappings()
private RequestInformation getConfigurePluginParameters(GuiContext context)