public class OsmDataSessionImporter extends java.lang.Object implements SessionLayerImporter
OsmDataLayer.| Constructor and Description |
|---|
OsmDataSessionImporter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkMetaVersion(org.w3c.dom.Element elem)
Checks that element defines the expected version number.
|
static java.lang.String |
extractFileName(org.w3c.dom.Element elem,
SessionReader.ImportSupport support)
Extract file name from element.
|
static Layer |
importData(OsmImporter osmImporter,
SessionReader.ImportSupport support,
java.lang.String fileStr,
ProgressMonitor progressMonitor)
Import data as a new layer.
|
Layer |
load(org.w3c.dom.Element elem,
SessionReader.ImportSupport support,
ProgressMonitor progressMonitor)
Load the layer from xml meta-data.
|
public OsmDataSessionImporter()
public Layer load(org.w3c.dom.Element elem, SessionReader.ImportSupport support, ProgressMonitor progressMonitor) throws java.io.IOException, IllegalDataException
SessionLayerImporterload in interface SessionLayerImporterelem - XML elementsupport - support class providing import utilitiesprogressMonitor - progress monitorjava.io.IOException - if any I/O error occursIllegalDataException - if invalid data is readpublic static void checkMetaVersion(org.w3c.dom.Element elem) throws IllegalDataException
elem - element to checkIllegalDataException - if version is not the expected onepublic static java.lang.String extractFileName(org.w3c.dom.Element elem, SessionReader.ImportSupport support) throws IllegalDataException
elem - element to parsesupport - import/export supportIllegalDataException - if file name missing or emptypublic static Layer importData(OsmImporter osmImporter, SessionReader.ImportSupport support, java.lang.String fileStr, ProgressMonitor progressMonitor) throws java.io.IOException, IllegalDataException
osmImporter - OSM importersupport - import/export supportfileStr - file name to importprogressMonitor - progress monitorjava.io.IOException - in case of I/O errorIllegalDataException - in case of illegal data