public abstract class ADFNodeConversionHandler<D extends ADFNode,O> extends AbstractHandler implements ConversionHandler<D,O>
ADFNode
to some external output resource.listeners
Constructor and Description |
---|
ADFNodeConversionHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Object data,
Object outputResource)
Determine whether this handler can convert the supplied data.
|
protected abstract boolean |
canConvertData(ADFNode data)
Performs specific checks on the ADFNode to determine if this handler can convert it.
|
void |
convert(D data,
O out)
Invoke this convert handler.
|
protected abstract void |
convertData(D data,
O out)
Performs the unit of work to convert the data into the given output resource.
|
accept, addListener, fireHandlingFailedEvent, fireHandlingStartedEvent, fireHandlingSucceededEvent, getListeners, getLog, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, addListener, getListeners, removeListener
public boolean canConvert(Object data, Object outputResource)
ConversionHandler
canConvert
in interface ConversionHandler<D extends ADFNode,O>
data
- the data that needs to be writtenoutputResource
- the output resource the will be written topublic void convert(D data, O out) throws ConversionException
convertData(ADFNode, Object)
. This method itself governs the update of progress
tracking and status information.convert
in interface ConversionHandler<D extends ADFNode,O>
data
- the ADF node to convert outout
- the resource to convert data toConversionException
- if the handler failed to convert data from it's sourceprotected abstract boolean canConvertData(ADFNode data)
canConvert(Object, Object)
in that it is typed to the ADFNode and not any object - canConvert(Object,
Object)
handles type checking at the abstract level.data
- the ADFNode to checkprotected abstract void convertData(D data, O out) throws ConversionException
data
- the adf node to convertout
- the resource to convert data toConversionException
- if there was an error writing the dataCopyright © 2014. All rights reserved.