public abstract class ExportMarshal extends HierarchyListFilter
execute
.
Implementations may confirm or collect additional information
from the user
2) execute
then invokes beginMarshal
. Default
implementation simply launches a worker thread to handle the marshaling
(see ExportMarshalTask
)
3) ExportMarshalTask
displays a progress dialog while worker
thread is busy
4) ExportMarshalTask
invokes marshal
on the
worker thread to export the user specified data
5) ExportMarshalTask
invokes finalizeMarshal
on
the worker thread to complete the exports
6) ExportMarshalTask
invokes postMarshal
on the
UI thread. Implementations may notify the user of export completionModifier and Type | Class and Description |
---|---|
static interface |
ExportMarshal.Progress
Interface for callback during export
|
Modifier and Type | Field and Description |
---|---|
protected ExportMarshal.Progress |
progress
Optional progress callback
|
sort
Constructor and Description |
---|
ExportMarshal() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(HierarchyListItem item)
Return true if item should be shown in the UI, otherwise item will be hidden
|
void |
addFilter(ExportFilter filter) |
protected void |
beginMarshal(android.content.Context context,
java.util.List<Exportable> exports)
Begin the export.
|
protected abstract void |
cancelMarshal()
Cancel the export e.g.
|
abstract void |
execute(java.util.List<Exportable> exports)
Initiate export.
|
boolean |
filterGroup(MapGroup group)
Default implementation filters on the "Layer Outlines" group
|
boolean |
filterItem(MapItem item)
Default implementation filters non-Exportable and then
defers to the
ExportFilters |
boolean |
filterListItemImpl(HierarchyListItem item) |
boolean |
filterOverlay(MapOverlay overlay)
Default implementation display 4 top level affiliations
|
protected abstract void |
finalizeMarshal()
Finalize the export, e.g.
|
abstract java.lang.String |
getContentType()
UI type and icon
|
ExportFilters |
getFilters() |
abstract int |
getIconId() |
abstract java.lang.String |
getMIMEType() |
abstract java.lang.Class<?> |
getTargetClass()
Target class this implementation exports to
|
boolean |
hasProgress() |
protected abstract boolean |
marshal(java.util.Collection<Exportable> exports)
Marshal or organize export for marshaling during finalize().
|
protected abstract void |
postMarshal()
Will be invoked on UI thread, upon successful export
|
void |
setProgress(ExportMarshal.Progress progress) |
acceptEntry, isDefaultFilter, toString
protected ExportMarshal.Progress progress
public boolean hasProgress()
public void setProgress(ExportMarshal.Progress progress)
public ExportFilters getFilters()
public void addFilter(ExportFilter filter)
public abstract java.lang.Class<?> getTargetClass()
public abstract java.lang.String getContentType()
public abstract java.lang.String getMIMEType()
public abstract int getIconId()
public boolean accept(HierarchyListItem item)
accept
in class HierarchyListFilter
item
- public boolean filterListItemImpl(HierarchyListItem item)
item
- public boolean filterItem(MapItem item)
ExportFilters
item
- public boolean filterGroup(MapGroup group)
group
- public boolean filterOverlay(MapOverlay overlay)
overlay
- public abstract void execute(java.util.List<Exportable> exports) throws java.io.IOException, FormatNotSupportedException
beginMarshal
exports
- java.io.IOException
FormatNotSupportedException
protected void beginMarshal(android.content.Context context, java.util.List<Exportable> exports)
context
- exports
- protected abstract boolean marshal(java.util.Collection<Exportable> exports) throws java.io.IOException, FormatNotSupportedException
exports
- java.io.IOException
FormatNotSupportedException
protected abstract void finalizeMarshal() throws java.io.IOException
java.io.IOException
protected abstract void postMarshal()
protected abstract void cancelMarshal()