Class DefaultExtractionPluginProcessor
- java.lang.Object
-
- org.hansken.plugin.extraction.test.base.DefaultExtractionPluginProcessor
-
- All Implemented Interfaces:
nl.minvenj.nfi.flits.api.FlitsProcessor,ExtractionPluginProcessor
public abstract class DefaultExtractionPluginProcessor extends Object implements ExtractionPluginProcessor
Base implementation of anExtractionPluginProcessor, which simply delegates theExtractionPluginProcessor.process(ClientTrace, ClientDataContext)call to the givenExtractionPlugin.Depending on the
typeof plugin under test, the test case input is used as follows:-
PluginType.EXTRACTION_PLUGINorPluginType.DEFERRED_EXTRACTION_PLUGIN: the implementation loads the file pointed to by the given input path as the data stream. Optionally, a sibling file may be present with extension.trace, which will be taken as the base inputTrace. -
PluginType.META_EXTRACTION_PLUGIN: the implementation deserializes the file pointed to by the given input as the inputTrace.
-
-
Field Summary
Fields Modifier and Type Field Description protected PluginInfo_info-
Fields inherited from interface org.hansken.plugin.extraction.test.ExtractionPluginProcessor
TRACE_TO_JSON
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultExtractionPluginProcessorembedded(DeferredExtractionPlugin plugin, boolean verboseLoggingEnabled)DefaultExtractionPluginProcessorfor embedded deferred extraction plugins.static DefaultExtractionPluginProcessorembedded(ExtractionPlugin plugin, boolean verboseLoggingEnabled)DefaultExtractionPluginProcessorfor embedded extraction plugins.protected booleanisHqlMatch(org.hansken.plugin.extraction.runtime.grpc.client.api.ClientTrace trace, DataContext context, boolean verboseLoggingEnabled)Stringname()Optional<nl.minvenj.nfi.flits.api.FlitsResult>process(Path inputPath, Path relativePath)static DefaultExtractionPluginProcessorremote(org.hansken.plugin.extraction.runtime.grpc.client.ExtractionPluginClient client, boolean verboseLoggingEnabled)DefaultExtractionPluginProcessorfor remote extraction plugins.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hansken.plugin.extraction.test.ExtractionPluginProcessor
generator, process, processDeferred, validator
-
-
-
-
Field Detail
-
_info
protected final PluginInfo _info
-
-
Method Detail
-
name
public String name()
- Specified by:
namein interfacenl.minvenj.nfi.flits.api.FlitsProcessor
-
process
public Optional<nl.minvenj.nfi.flits.api.FlitsResult> process(Path inputPath, Path relativePath) throws IOException
- Specified by:
processin interfacenl.minvenj.nfi.flits.api.FlitsProcessor- Throws:
IOException
-
embedded
public static DefaultExtractionPluginProcessor embedded(ExtractionPlugin plugin, boolean verboseLoggingEnabled)
DefaultExtractionPluginProcessorfor embedded extraction plugins.- Parameters:
plugin- The extraction plugin to be usedverboseLoggingEnabled- enable verbose logging for HQL queries- Returns:
DefaultExtractionPluginProcessorfor embedded extraction plugins.
-
embedded
public static DefaultExtractionPluginProcessor embedded(DeferredExtractionPlugin plugin, boolean verboseLoggingEnabled)
DefaultExtractionPluginProcessorfor embedded deferred extraction plugins.- Parameters:
plugin- The deferred extraction plugin to be usedverboseLoggingEnabled- enable verbose logging for HQL queries- Returns:
DefaultExtractionPluginProcessorfor embedded deferred extraction plugins.
-
remote
public static DefaultExtractionPluginProcessor remote(org.hansken.plugin.extraction.runtime.grpc.client.ExtractionPluginClient client, boolean verboseLoggingEnabled)
DefaultExtractionPluginProcessorfor remote extraction plugins.- Parameters:
client- client that is connects to the remote extraction pluginverboseLoggingEnabled- enable verbose logging for HQL queries- Returns:
DefaultExtractionPluginProcessorfor remote extraction plugins.
-
isHqlMatch
protected boolean isHqlMatch(org.hansken.plugin.extraction.runtime.grpc.client.api.ClientTrace trace, DataContext context, boolean verboseLoggingEnabled)
-
-