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 an
ExtractionPluginProcessor, which simply delegates
the ExtractionPluginProcessor.process(ClientTrace, ClientDataContext) call to the given ExtractionPlugin.
Depending on the type of 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
FieldsFields inherited from interface org.hansken.plugin.extraction.test.ExtractionPluginProcessor
TRACE_TO_JSON -
Method Summary
Modifier and TypeMethodDescriptionembedded(DeferredExtractionPlugin plugin, boolean verboseLoggingEnabled) DefaultExtractionPluginProcessorfor embedded deferred extraction plugins.embedded(ExtractionPlugin plugin, boolean verboseLoggingEnabled) DefaultExtractionPluginProcessorfor embedded extraction plugins.protected booleanisHqlMatch(org.hansken.plugin.extraction.runtime.grpc.client.api.ClientTrace trace, DataContext context, boolean verboseLoggingEnabled) name()Optional<nl.minvenj.nfi.flits.api.FlitsResult> remote(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, waitMethods inherited from interface org.hansken.plugin.extraction.test.ExtractionPluginProcessor
generator, process, processDeferred, validatorMethods inherited from interface nl.minvenj.nfi.flits.api.FlitsProcessor
process
-
Field Details
-
_info
-
-
Method Details
-
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)
-