Changeset 28053 in osm
- Timestamp:
- 2012-03-12T20:18:35+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 1 added
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/DataGouvFrModule.java
r28000 r28053 23 23 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.diplomatie.EtabAEFEHandler; 24 24 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.ecologie.AssainissementHandler; 25 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.ecologie.ForetsPubliquesHandler; 25 26 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.education.Etab1er2ndDegreHandler; 26 27 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.education.EtabSupHandler; … … 41 42 handlers.add(new PassageNiveauHandler()); 42 43 handlers.add(new ROEHandler()); 44 handlers.add(new ForetsPubliquesHandler()); 43 45 } 44 46 } -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/agriculture/RegistreParcellaireHandler.java
r28050 r28053 24 24 import org.openstreetmap.josm.data.osm.OsmPrimitive; 25 25 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry; 26 import org.openstreetmap.josm.plugins.opendata.core.datasets.fr.French Department;26 import org.openstreetmap.josm.plugins.opendata.core.datasets.fr.FrenchAdministrativeUnit; 27 27 import org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.DataGouvDataSetHandler; 28 28 import org.openstreetmap.josm.tools.Pair; … … 144 144 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>(); 145 145 try { 146 for (French Department dpt : FrenchDepartment.allDepartments) {146 for (FrenchAdministrativeUnit dpt : FrenchAdministrativeUnit.allDepartments) { 147 147 result.add(getRpgURL(dpt.getCode(), dpt.getName())); 148 148 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/DataSetUpdater.java
r28044 r28053 30 30 if (associatedFile != null) { 31 31 handler.setAssociatedFile(associatedFile); 32 handler.setSourceDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date(associatedFile.lastModified()))); 32 long lastmodified = associatedFile.lastModified(); 33 if (lastmodified > 0) { 34 handler.setSourceDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date(lastmodified))); 35 } 33 36 } 34 37 if (!Main.pref.getBoolean(PREF_RAWDATA)) { -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/fr/FrenchAdministrativeUnit.java
r28050 r28053 16 16 package org.openstreetmap.josm.plugins.opendata.core.datasets.fr; 17 17 18 public finalclass FrenchDepartment {18 public abstract class FrenchAdministrativeUnit { 19 19 private final String code; 20 20 private final String name; 21 21 22 private French Department(String code, String name) {22 private FrenchAdministrativeUnit(String code, String name) { 23 23 this.code = code; 24 24 this.name = name; … … 31 31 public final String getName() { 32 32 return name; 33 } 34 35 public static final class FrenchDepartment extends FrenchAdministrativeUnit { 36 private FrenchDepartment(String code, String name) { 37 super(code, name); 38 } 39 } 40 41 public static final class FrenchRegion extends FrenchAdministrativeUnit { 42 private FrenchRegion(String code, String name) { 43 super(code, name); 44 } 33 45 } 34 46 … … 136 148 new FrenchDepartment("976", "Mayotte"), 137 149 }; 150 151 public static final FrenchRegion[] allRegions = new FrenchRegion[] { 152 new FrenchRegion("42", "Alsace"), 153 new FrenchRegion("72", "Aquitaine"), 154 new FrenchRegion("83", "Auvergne"), 155 new FrenchRegion("25", "Basse-Normandie"), 156 new FrenchRegion("26", "Bourgogne"), 157 new FrenchRegion("53", "Bretagne"), 158 new FrenchRegion("24", "Centre"), 159 new FrenchRegion("21", "Champagne-Ardenne"), 160 new FrenchRegion("94", "Corse"), 161 new FrenchRegion("43", "Franche-Comté"), 162 new FrenchRegion("23", "Haute-Normandie"), 163 new FrenchRegion("11", "Île-de-France"), 164 new FrenchRegion("91", "Languedoc-Roussillon"), 165 new FrenchRegion("74", "Limousin"), 166 new FrenchRegion("41", "Lorraine"), 167 new FrenchRegion("73", "Midi-Pyrénées"), 168 new FrenchRegion("31", "Nord-Pas-de-Calais"), 169 new FrenchRegion("52", "Pays de la Loire"), 170 new FrenchRegion("22", "Picardie"), 171 new FrenchRegion("54", "Poitou-Charentes"), 172 new FrenchRegion("93", "Provence-Alpes-Côte d'Azur"), 173 new FrenchRegion("82", "Rhône-Alpes"), 174 new FrenchRegion("01", "Guadeloupe"), 175 new FrenchRegion("02", "Martinique"), 176 new FrenchRegion("03", "Guyane"), 177 new FrenchRegion("04", "La Réunion"), 178 new FrenchRegion("05", "Mayotte") 179 }; 138 180 }
Note:
See TracChangeset
for help on using the changeset viewer.