org.openstreetmap.josm.io.session
Class SessionReader
java.lang.Object
org.openstreetmap.josm.io.session.SessionReader
public class SessionReader
- extends java.lang.Object
Reads a .jos session file and loads the layers in the process.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sessionLayerImporters
private static java.util.Map<java.lang.String,java.lang.Class<? extends SessionLayerImporter>> sessionLayerImporters
sessionFile
private java.io.File sessionFile
zip
private boolean zip
zipFile
private java.util.zip.ZipFile zipFile
layers
private java.util.List<Layer> layers
postLoadTasks
private java.util.List<java.lang.Runnable> postLoadTasks
SessionReader
public SessionReader()
registerSessionLayerImporter
public static void registerSessionLayerImporter(java.lang.String layerType,
java.lang.Class<? extends SessionLayerImporter> importer)
getSessionLayerImporter
public static SessionLayerImporter getSessionLayerImporter(java.lang.String layerType)
getLayers
public java.util.List<Layer> getLayers()
- Returns:
- list of layers that are later added to the mapview
getPostLoadTasks
public java.util.List<java.lang.Runnable> getPostLoadTasks()
- Returns:
- actions executed in EDT after layers have been added (message dialog, etc.)
error
private void error(java.lang.String msg)
throws IllegalDataException
- Throws:
IllegalDataException
parseJos
private void parseJos(org.w3c.dom.Document doc,
ProgressMonitor progressMonitor)
throws IllegalDataException
- Throws:
IllegalDataException
loadSession
public void loadSession(java.io.File sessionFile,
boolean zip,
ProgressMonitor progressMonitor)
throws IllegalDataException,
java.io.IOException
- Throws:
IllegalDataException
java.io.IOException
JOSM