Package mgui.io.domestic.datasources
Class DataSourceWriter
java.lang.Object
mgui.io.FileWriter
mgui.io.domestic.datasources.DataSourceWriter
- All Implemented Interfaces:
InterfaceIO
,IconObject
public class DataSourceWriter extends FileWriter
Writes a Data Source object to file.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DataSourceWriter.FileType
-
Field Summary
Fields Modifier and Type Field Description DataSourceWriter.FileType
type
Fields inherited from class mgui.io.FileWriter
dataFile, dataURL, failure_message, options, success_message
-
Constructor Summary
Constructors Constructor Description DataSourceWriter()
DataSourceWriter(java.io.File file)
DataSourceWriter(java.io.File file, DataSourceWriter.FileType type)
DataSourceWriter(DataSourceWriter.FileType type)
-
Method Summary
Modifier and Type Method Description boolean
write(InterfaceIOOptions options, ProgressUpdater progressBar)
Writes this object according to the givenoptions
.boolean
writeDataSource(DataSource source)
Writes this data source to a text file.boolean
writeDataSourceAsXml(DataSource source)
Methods inherited from class mgui.io.FileWriter
getComplementIOType, getFailureMessage, getFile, getIOType, getLoaderComplement, getObjectIcon, getOptions, getProgressMessage, getSuccessMessage, getSupportedObjects, getTitle, getURL, setFile, setOptions, setURL, toString, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
type
-
-
Constructor Details
-
DataSourceWriter
public DataSourceWriter() -
DataSourceWriter
-
DataSourceWriter
public DataSourceWriter(java.io.File file) -
DataSourceWriter
-
-
Method Details
-
write
Description copied from class:FileWriter
Writes this object according to the givenoptions
. If loaded object is of typePersistentObject
, this method should also set the file writer and reference URL for the object.- Specified by:
write
in classFileWriter
- Returns:
-
writeDataSource
Writes this data source to a text file.- Parameters:
source
-- Returns:
- Throws:
java.io.IOException
-
writeDataSourceAsXml
- Throws:
java.io.IOException
-