public abstract class ExportFileMarshal extends ExportMarshal
ExportMarshal.Progress
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
contentType |
protected android.content.Context |
context |
protected java.util.List<java.lang.String> |
exportedUIDs
Track which UIDs have already been exported e.g.
|
protected java.lang.String |
filename |
protected int |
iconId |
protected boolean |
isCancelled |
protected java.lang.String |
mimeType |
progress
sort
Constructor and Description |
---|
ExportFileMarshal(android.content.Context context,
java.lang.String contentType,
java.lang.String mimeType,
int icon) |
Modifier and Type | Method and Description |
---|---|
protected void |
cancelMarshal()
Cancel the export e.g.
|
void |
execute(java.util.List<Exportable> exports)
Initiate export.
|
boolean |
filterListItemImpl(HierarchyListItem item)
Allow SpatialDB files
|
java.lang.String |
getContentType()
UI type and icon
|
protected java.lang.String |
getExtension() |
abstract java.io.File |
getFile()
Get marshal target
|
int |
getIconId() |
java.lang.String |
getMIMEType() |
protected boolean |
marshal(java.util.Collection<Exportable> exports)
Marshal or organize export for marshaling during finalize().
|
protected abstract boolean |
marshal(Exportable export)
Export the specified data
|
void |
postMarshal()
Will be invoked on UI thread, upon successful export
|
static void |
send3rdParty(android.content.Context context,
java.lang.String contentType,
java.lang.String mimeType,
java.io.File file) |
static boolean |
sendFile(android.content.Context context,
java.lang.String contentType,
java.io.File file,
boolean bImport,
java.lang.String onReceiveAction)
Send specified file via ATAK contact list
Note .shp files and .zip (e.g.
|
static void |
sendFTP(android.content.Context context,
java.lang.String contentType,
java.lang.String mimeType,
java.io.File file) |
static void |
sendFTP(int notificationId,
java.lang.String contentType,
java.lang.String mimeType,
java.io.File file,
java.lang.String passwd,
boolean skipDialog,
java.lang.String callbackAction,
android.os.Parcelable callbackExtra) |
static java.lang.String |
timestamp() |
java.lang.String |
toString() |
accept, addFilter, beginMarshal, filterGroup, filterItem, filterOverlay, finalizeMarshal, getFilters, getTargetClass, hasProgress, setProgress
acceptEntry, isDefaultFilter
protected java.lang.String filename
protected final java.lang.String contentType
protected final java.lang.String mimeType
protected final int iconId
protected final android.content.Context context
protected boolean isCancelled
protected final java.util.List<java.lang.String> exportedUIDs
public ExportFileMarshal(android.content.Context context, java.lang.String contentType, java.lang.String mimeType, int icon)
public java.lang.String getContentType()
ExportMarshal
getContentType
in class ExportMarshal
public java.lang.String getMIMEType()
getMIMEType
in class ExportMarshal
public int getIconId()
getIconId
in class ExportMarshal
public abstract java.io.File getFile() throws java.io.IOException
java.io.IOException
- if there is a problem constructing the file.protected abstract boolean marshal(Exportable export) throws java.io.IOException, FormatNotSupportedException
export
- FormatNotSupportedException
java.io.IOException
protected boolean marshal(java.util.Collection<Exportable> exports) throws java.io.IOException, FormatNotSupportedException
ExportMarshal
marshal
in class ExportMarshal
java.io.IOException
FormatNotSupportedException
public void execute(java.util.List<Exportable> exports)
ExportMarshal
beginMarshal
execute
in class ExportMarshal
protected java.lang.String getExtension()
public static java.lang.String timestamp()
public java.lang.String toString()
toString
in class HierarchyListFilter
public void postMarshal()
ExportMarshal
postMarshal
in class ExportMarshal
public static void send3rdParty(android.content.Context context, java.lang.String contentType, java.lang.String mimeType, java.io.File file)
public static void sendFTP(android.content.Context context, java.lang.String contentType, java.lang.String mimeType, java.io.File file)
public static void sendFTP(int notificationId, java.lang.String contentType, java.lang.String mimeType, java.io.File file, java.lang.String passwd, boolean skipDialog, java.lang.String callbackAction, android.os.Parcelable callbackExtra)
public static boolean sendFile(android.content.Context context, java.lang.String contentType, java.io.File file, boolean bImport, java.lang.String onReceiveAction)
context
- contentType
- file
- bImport
- onReceiveAction
- [optional] broadcast on receiver deviceprotected void cancelMarshal()
ExportMarshal
cancelMarshal
in class ExportMarshal
public boolean filterListItemImpl(HierarchyListItem item)
filterListItemImpl
in class ExportMarshal