Ignore:
Timestamp:
2012-03-15T13:59:12+01:00 (13 years ago)
Author:
donvip
Message:

opendata: Le Mans data support, continuation

Location:
applications/editors/josm/plugins/opendata
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/modules/fr.lemans/src/org/openstreetmap/josm/plugins/opendata/modules/fr/lemans/LeMansModule.java

    r28087 r28088  
    1818import org.openstreetmap.josm.plugins.opendata.core.modules.AbstractModule;
    1919import org.openstreetmap.josm.plugins.opendata.core.modules.ModuleInformation;
     20import org.openstreetmap.josm.plugins.opendata.modules.fr.lemans.datasets.CantonsSartheHandler;
    2021import org.openstreetmap.josm.plugins.opendata.modules.fr.lemans.datasets.ServicesCommunautairesMunicipauxHandler;
    2122
     
    2526                super(info);
    2627                handlers.add(new ServicesCommunautairesMunicipauxHandler());
     28                handlers.add(new CantonsSartheHandler());
    2729    }
    2830}
  • applications/editors/josm/plugins/opendata/modules/fr.lemans/src/org/openstreetmap/josm/plugins/opendata/modules/fr/lemans/datasets/LeMansDataSetHandler.java

    r28087 r28088  
    107107                List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
    108108                try {
    109                         if (csvUuid != null && !csvUuid.isEmpty()) result.add(new Pair<String, URL>("CSV", new URL(PORTAL + "download.do?uuid=" + csvUuid)));
     109                        //if (csvUuid != null && !csvUuid.isEmpty()) result.add(new Pair<String, URL>("CSV", new URL(PORTAL + "download.do?uuid=" + csvUuid)));
    110110                        if (kmzUuid != null && !kmzUuid.isEmpty()) result.add(new Pair<String, URL>("KMZ", new URL(PORTAL + "download.do?uuid=" + kmzUuid)));
    111111                        if (shpUuid != null && !shpUuid.isEmpty()) result.add(new Pair<String, URL>("SHP", new URL(PORTAL + "download.do?uuid=" + shpUuid)));
  • applications/editors/josm/plugins/opendata/modules/fr.lemans/src/org/openstreetmap/josm/plugins/opendata/modules/fr/lemans/datasets/ServicesCommunautairesMunicipauxHandler.java

    r28087 r28088  
    1717
    1818import org.openstreetmap.josm.data.osm.DataSet;
     19import org.openstreetmap.josm.data.osm.Node;
    1920
    2021public class ServicesCommunautairesMunicipauxHandler extends LeMansDataSetHandler {
     
    3334        @Override
    3435        public void updateDataSet(DataSet ds) {
    35                 // TODO Auto-generated method stub
     36                for (Node n : ds.getNodes()) {
     37                        replace(n, "NOM", "name");
     38                }
    3639        }
    3740}
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NetworkReader.java

    r28050 r28088  
    6969                String cdisp = this.activeConnection.getHeaderField("Content-disposition");
    7070                if (cdisp != null) {
    71                         Matcher m = Pattern.compile("attachment; filename=(.*)").matcher(cdisp);
     71                        Matcher m = Pattern.compile("attachment;.?filename=(.*)").matcher(cdisp);
    7272                        if (m.matches()) {
    7373                                filename = m.group(1);
     
    9797
    9898        private Class<? extends AbstractReader> findReaderByExtension(String filename) {
     99                filename = filename.replace("\"", "");
    99100        if (filename.endsWith("."+XLS_EXT)) {
    100101                return XlsReader.class;
Note: See TracChangeset for help on using the changeset viewer.