public abstract class AbstractBaseExtractor extends java.lang.Object implements Extractor
AbstractBaseExtractor class implements most of the stuff you need
in order
to implement a full extractor. Handling of item factory, error handling and
destruction (unregistering)
are handled for you.| Constructor and Description |
|---|
AbstractBaseExtractor(java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
protected DataItemInputChained |
createInput(java.lang.String localId) |
protected abstract void |
doProcess(ExecutionResult result)
Process the execution result as input.
|
protected void |
fillNoError(java.util.Map<java.lang.String,Variant> attributes) |
void |
process(ExecutionResult result) |
void |
register(Hive hive,
FolderItemFactory folderItemFactory) |
protected void |
setError(java.lang.Throwable executionError,
java.lang.String which)
Set the error flags
|
void |
unregister() |
protected DataItemInputChained createInput(java.lang.String localId)
public void process(ExecutionResult result)
protected void setError(java.lang.Throwable executionError,
java.lang.String which)
executionError - the error that occurredprotected void fillNoError(java.util.Map<java.lang.String,Variant> attributes)
protected abstract void doProcess(ExecutionResult result) throws java.lang.Exception
This method will only be called if no execution error occurred. Otherwise the error flags of all data items are automatically set.
This method must apply the attributes from fillNoError(Map) when
updating items. This is needed since applying them afterwards would cause
two updates on the dataitem and the state would by async to the value
itself.
result - the execution result that has to be processesjava.lang.Exception - if anything goes wrongpublic void register(Hive hive, FolderItemFactory folderItemFactory)
public void unregister()
unregister in interface Extractor
Copyright (c) IBH SYSTEMS GmbH and others 2010, 2013.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0