public abstract class AbstractExporttoFileService extends Object implements ExporttoService
Modifier and Type | Field and Description |
---|---|
protected static ExporttoManager |
EXPORTTO_MANAGER |
protected ExporttoService |
exporttoService |
protected FeatureStore |
featureStore |
protected File |
file |
Constructor and Description |
---|
AbstractExporttoFileService(File file,
FeatureStore featureStore) |
Modifier and Type | Method and Description |
---|---|
abstract void |
addParameters(NewFeatureStoreParameters newFeatureStoreParameters) |
void |
cancelRequest()
Request to the task that cancel.
|
void |
export(FeatureSet featureSet)
This method export a
FeatureSet to other FeatureSet . |
abstract String |
getFileExtension() |
TaskStatus |
getTaskStatus() |
boolean |
isCancellationRequested()
Return true if has request to cancel to the task.
|
void |
open() |
void |
setFinishAction(ExporttoServiceFinishAction exporttoServiceFinishAction)
Sets the
ExporttoServiceFinishAction that is used at the end
of the ExporttoService . |
protected static final ExporttoManager EXPORTTO_MANAGER
protected File file
protected FeatureStore featureStore
protected ExporttoService exporttoService
public AbstractExporttoFileService(File file, FeatureStore featureStore)
public void open() throws ExporttoServiceException
ExporttoServiceException
public abstract void addParameters(NewFeatureStoreParameters newFeatureStoreParameters) throws DataException
DataException
public abstract String getFileExtension()
public void export(FeatureSet featureSet) throws ExporttoServiceException
ExporttoService
FeatureSet
to other FeatureSet
.
The other necessary parameters to make this conversion are specific
for every ExporttoService
. e.g: a shape exporter needs a
file and a projection, a database exporter needs a connection
parameters...export
in interface ExporttoService
featureSet
- the set of features hat have to be exported.ExporttoServiceException
- if there is any exception in the exporting processpublic void setFinishAction(ExporttoServiceFinishAction exporttoServiceFinishAction)
ExporttoService
ExporttoServiceFinishAction
that is used at the end
of the ExporttoService
.setFinishAction
in interface ExporttoService
exporttoServiceFinishAction
- it contains an action that can be executed at the end of the
export processpublic TaskStatus getTaskStatus()
getTaskStatus
in interface MonitorableTask
public boolean isCancellationRequested()
CancellableTask
isCancellationRequested
in interface CancellableTask
public void cancelRequest()
CancellableTask
cancelRequest
in interface CancellableTask