Package org.gephi.project.io
Class SaveTask
- java.lang.Object
-
- org.gephi.project.io.SaveTask
-
- All Implemented Interfaces:
org.gephi.utils.longtask.spi.LongTask
public class SaveTask extends Object implements org.gephi.utils.longtask.spi.LongTask
- Author:
- Mathieu Bastian
-
-
Field Summary
Fields Modifier and Type Field Description private booleancancelprivate Filefileprivate org.gephi.utils.progress.ProgressTicketprogressTicketprivate Projectprojectprivate static StringZIP_LEVEL_PREFERENCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()private static StringgetFileExtension(File file)private static StringgetFileNameWithoutExt(File file)static XMLStreamWriternewXMLWriter(OutputStream outputStream)booleanrun()voidsetProgressTicket(org.gephi.utils.progress.ProgressTicket progressTicket)private voidwriteProject(OutputStream outputStream, ZipOutputStream zipOut)private voidwriteWorkspace(Workspace workspace, OutputStream outputStream, ZipOutputStream zipOut)private voidwriteWorkspaceChildrenBytes(Workspace workspace, WorkspaceBytesPersistenceProvider persistenceProvider, DataOutputStream outputStream, ZipOutputStream zipOut)private voidwriteWorkspaceChildrenXML(Workspace workspace, WorkspaceXMLPersistenceProvider persistenceProvider, OutputStream outputStream, ZipOutputStream zipOut)
-
-
-
Field Detail
-
ZIP_LEVEL_PREFERENCE
private static final String ZIP_LEVEL_PREFERENCE
- See Also:
- Constant Field Values
-
file
private final File file
-
project
private final Project project
-
cancel
private boolean cancel
-
progressTicket
private org.gephi.utils.progress.ProgressTicket progressTicket
-
-
Method Detail
-
newXMLWriter
public static XMLStreamWriter newXMLWriter(OutputStream outputStream) throws XMLStreamException
- Throws:
XMLStreamException
-
run
public boolean run()
-
writeProject
private void writeProject(OutputStream outputStream, ZipOutputStream zipOut) throws Exception
- Throws:
Exception
-
writeWorkspace
private void writeWorkspace(Workspace workspace, OutputStream outputStream, ZipOutputStream zipOut) throws Exception
- Throws:
Exception
-
writeWorkspaceChildrenXML
private void writeWorkspaceChildrenXML(Workspace workspace, WorkspaceXMLPersistenceProvider persistenceProvider, OutputStream outputStream, ZipOutputStream zipOut) throws Exception
- Throws:
Exception
-
writeWorkspaceChildrenBytes
private void writeWorkspaceChildrenBytes(Workspace workspace, WorkspaceBytesPersistenceProvider persistenceProvider, DataOutputStream outputStream, ZipOutputStream zipOut) throws Exception
- Throws:
Exception
-
cancel
public boolean cancel()
- Specified by:
cancelin interfaceorg.gephi.utils.longtask.spi.LongTask
-
setProgressTicket
public void setProgressTicket(org.gephi.utils.progress.ProgressTicket progressTicket)
- Specified by:
setProgressTicketin interfaceorg.gephi.utils.longtask.spi.LongTask
-
-