Changeset 29686 in osm
- Timestamp:
- 2013-06-21T02:08:30+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/DataGouvFrModule.java
r28364 r29686 32 32 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.transport.AeroportsHandler; 33 33 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.transport.PassageNiveauHandler; 34 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.transport.Route500Handler; 34 35 35 36 public class DataGouvFrModule extends AbstractModule { … … 51 52 handlers.add(InventaireForestierNationalHandler.class); 52 53 handlers.add(AeroportsHandler.class); 54 handlers.add(Route500Handler.class); 53 55 } 54 56 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/AbstractDataSetHandler.java
r29680 r29686 159 159 } 160 160 161 protected final boolean accepts7ZipFilename(String filename, String ... expected) { 162 return acceptsFilename(filename, expected, SEVENZIP_EXT); 163 } 164 161 165 protected final boolean acceptsCsvKmzFilename(String filename, String ... expected) { 162 166 return acceptsFilename(filename, expected, CSV_EXT, KMZ_EXT); -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NetworkReader.java
r29019 r29686 30 30 import org.openstreetmap.josm.plugins.opendata.core.OdConstants; 31 31 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler; 32 import org.openstreetmap.josm.plugins.opendata.core.io.archive.ArchiveReader; 33 import org.openstreetmap.josm.plugins.opendata.core.io.archive.SevenZipReader; 32 34 import org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipReader; 33 35 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlReader; … … 84 86 if (contentType.startsWith("application/zip")) { 85 87 return ZipReader.class; 88 } else if (contentType.startsWith("application/x-7z-compressed")) { 89 return SevenZipReader.class; 86 90 } else if (contentType.startsWith("application/vnd.ms-excel")) { 87 91 return XlsReader.class; … … 122 126 } else if (filename.endsWith("."+ZIP_EXT)) { 123 127 return ZipReader.class; 128 } else if (filename.endsWith("."+SEVENZIP_EXT)) { 129 return SevenZipReader.class; 124 130 } else { 125 131 return null; … … 151 157 } 152 158 instance = progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false); 153 if (readerClass.equals(ZipReader.class)) { 154 ZipReader zipReader = new ZipReader(in, handler, promptUser); 159 if (readerClass.equals(ZipReader.class) || readerClass.equals(SevenZipReader.class)) { 160 ArchiveReader zipReader = readerClass.equals(ZipReader.class) 161 ? new ZipReader(in, handler, promptUser) : new SevenZipReader(in, handler, promptUser); 155 162 DataSet ds = zipReader.parseDoc(instance); 156 163 file = zipReader.getReadFile();
Note:
See TracChangeset
for help on using the changeset viewer.