public abstract class ADFConversionHandler<O> extends AbstractHandler implements ConversionHandler<ADF,O>
IDF
to some external output resource.listeners
Constructor and Description |
---|
ADFConversionHandler() |
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(ADF data)
Performs specific checks on the ADF to determine if this handler can convert it.
|
void |
convert(ADF data,
O out)
Invoke this convert handler.
|
protected abstract void |
convertData(ADF 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<ADF,O>
data
- the data that needs to be writtenoutputResource
- the output resource the will be written topublic void convert(ADF data, O out) throws ConversionException
convertData(uk.ac.ebi.arrayexpress2.magetab.datamodel.ADF, Object)
. This method
itself governs the update of progress tracking and status information.convert
in interface ConversionHandler<ADF,O>
data
- the data model object that information should be written fromout
- the resource that data can be converted toConversionException
- if the handler failed to convert data from it's sourceprotected abstract boolean canConvertData(ADF data)
canConvert(Object, Object)
in that it is typed to the ADF and not any object - canConvert(Object,
Object)
handles type checking at the abstract level.data
- the ADF to checkprotected abstract void convertData(ADF data, O out) throws ConversionException
data
- the data to convertout
- the object model being converted toConversionException
- if there was an error writing the dataCopyright © 2014. All rights reserved.