public class SessionReader extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
SessionReader.CancelOrContinueDialog
Show Dialog when there is an error for one layer.
|
class |
SessionReader.ImportSupport |
static class |
SessionReader.LayerDependency |
Modifier and Type | Field and Description |
---|---|
private int |
active |
private List<Layer> |
layers |
private List<Runnable> |
postLoadTasks |
private URI |
sessionFileURI |
private static Map<String,Class<? extends SessionLayerImporter>> |
sessionLayerImporters |
private ViewportData |
viewport |
private boolean |
zip |
private ZipFile |
zipFile |
Constructor and Description |
---|
SessionReader() |
Modifier and Type | Method and Description |
---|---|
private InputStream |
createInputStream(File sessionFile,
boolean zip) |
private static void |
error(String msg) |
Layer |
getActive() |
private static Element |
getElementByTagName(Element root,
String name) |
List<Layer> |
getLayers() |
List<Runnable> |
getPostLoadTasks() |
static SessionLayerImporter |
getSessionLayerImporter(String layerType) |
ViewportData |
getViewport()
Return the viewport (map position and scale).
|
private static InputStream |
getZipInputStream(ZipFile zipFile) |
void |
loadSession(File sessionFile,
boolean zip,
ProgressMonitor progressMonitor) |
private void |
loadSession(InputStream josIS,
URI sessionFileURI,
boolean zip,
ProgressMonitor progressMonitor) |
private void |
parseJos(Document doc,
ProgressMonitor progressMonitor) |
static void |
registerSessionLayerImporter(String layerType,
Class<? extends SessionLayerImporter> importer) |
private static Map<String,Class<? extends SessionLayerImporter>> sessionLayerImporters
private URI sessionFileURI
private boolean zip
private int active
private List<Runnable> postLoadTasks
private ViewportData viewport
public SessionReader()
public static void registerSessionLayerImporter(String layerType, Class<? extends SessionLayerImporter> importer)
public static SessionLayerImporter getSessionLayerImporter(String layerType)
public List<Runnable> getPostLoadTasks()
public ViewportData getViewport()
private static void error(String msg) throws IllegalDataException
IllegalDataException
private void parseJos(Document doc, ProgressMonitor progressMonitor) throws IllegalDataException
IllegalDataException
public void loadSession(File sessionFile, boolean zip, ProgressMonitor progressMonitor) throws IllegalDataException, IOException
IllegalDataException
IOException
private InputStream createInputStream(File sessionFile, boolean zip) throws IOException, IllegalDataException
IOException
IllegalDataException
private static InputStream getZipInputStream(ZipFile zipFile) throws ZipException, IOException, IllegalDataException
private void loadSession(InputStream josIS, URI sessionFileURI, boolean zip, ProgressMonitor progressMonitor) throws IOException, IllegalDataException
IOException
IllegalDataException
private static Element getElementByTagName(Element root, String name)