Class MetaExtractionPlugin
- java.lang.Object
-
- org.hansken.plugin.extraction.api.MetaExtractionPlugin
-
- All Implemented Interfaces:
BaseExtractionPlugin
,ExtractionPlugin
public abstract class MetaExtractionPlugin extends Object implements ExtractionPlugin
Meta extraction plugins can be used by Hansken to processtraces
during the extraction process. A processed trace can be enriched with new information and new child traces can also be created.The difference between this and a normal
ExtractionPlugin
is that this plugin does not receive or processes any data, only a trace itself.When a plugin matches on the trace which is currently processed by Hansken (for example, because it has certain properties), the plugin will receive the matched trace in order to process it (see
process(Trace)
).Note for Hansken core developers: specifying
'meta'
in the matcher is not necessary, the framework takes care of this.
-
-
Constructor Summary
Constructors Constructor Description MetaExtractionPlugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
process(Trace trace)
Start processing atrace
without any of its associated data streams.void
process(Trace trace, DataContext dataContext)
Start processing atrace
with a givendata context
.-
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.api.BaseExtractionPlugin
pluginInfo
-
-
-
-
Method Detail
-
process
public final void process(Trace trace, DataContext dataContext) throws IOException
Description copied from interface:ExtractionPlugin
Start processing atrace
with a givendata context
. When processing a given trace, new properties may be set on it. New children can be added usingTrace.newChild(String, ThrowingConsumer)
.A trace can have multiple data sequences of different types. Because of this, a certain trace might be processed multiple times (depending on if this plugin triggers on the different data types).
Note: the given trace should only be modified within the scope of this method. Any modifications afterwards may be guarded against or result in undefined behavior.
- Specified by:
process
in interfaceExtractionPlugin
- Parameters:
trace
- the trace to processdataContext
- data context of the traces data stream that is being processed- Throws:
IOException
- when an I/O error occurs
-
process
public abstract void process(Trace trace) throws IOException
Start processing atrace
without any of its associated data streams. When processing a given trace, new properties may be set on it. New children can be added usingTrace.newChild(String, ThrowingConsumer)
.Note: the given trace should only be modified within the scope of this method. Any modifications afterwards may be guarded against or result in undefined behaviour.
- Parameters:
trace
- the trace to process- Throws:
IOException
- when an I/O error occurs
-
-