Ignore:
Timestamp:
2009-06-17T09:46:26+02:00 (17 years ago)
Author:
stoecker
Message:

fix build issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java

    r13611 r15961  
    4141    final String cBBoxCommunStart = "new GeoBox(";
    4242    final String cBBoxCommunEnd = ")";
    43    
     43
    4444    final String cInterfaceVector = "afficherCarteCommune.do";
    4545    final String cInterfaceRaster = "afficherCarteTa.do";
    46        
     46
    4747    CadastreInterface(CadastreGrabber cadastreGrabber) {
    4848        this.cadastreGrabber = cadastreGrabber;
    4949    }
    50    
     50
    5151    public boolean retrieveInterface(WMSLayer wmsLayer) throws DuplicateLayerException {
    5252        if (wmsLayer.name.equals(""))
     
    6464            JOptionPane.showMessageDialog(Main.parent,
    6565                    tr("Town/city {0} not found or not available in WMS.\n" +
    66                                 "Please check its availibility on www.cadastre.gouv.fr", wmsLayer.getLocation()));
     66                            "Please check its availibility on www.cadastre.gouv.fr", wmsLayer.getLocation()));
    6767            return false;
    6868        }
     
    9999        cadastreGrabber.setLastWMSLayerName(null);
    100100    }
    101    
     101
    102102    public void resetCookieIfNewLayer(String newWMSLayerName) {
    103103        if (!newWMSLayerName.equals(cadastreGrabber.getLastWMSLayerName())) {
     
    105105        }
    106106    }
    107    
     107
    108108    public void setCookie() {
    109109        urlConn.setRequestProperty("Cookie", cookie);
    110110    }
    111    
     111
    112112    private void getInterface(WMSLayer wmsLayer) throws IOException, DuplicateLayerException {
    113113        // first attempt : search for given name without codeCommune
     
    134134            }
    135135        }
    136        
     136
    137137        if (interfaceRef == null)
    138138            throw new IOException("Town/city " + wmsLayer.getLocation() + " not found.");
    139139    }
    140    
     140
    141141    private void openInterface() throws IOException  {
    142142        try {
     
    158158        }
    159159    }
    160    
     160
    161161    /**
    162162     * Post the form with the commune name and check the returned answer which is embedded
    163163     * in HTTP XML packets. This function doesn't use an XML parser yet but that would be a good idea
    164164     * for the next releases.
    165      * Two possibilities : 
     165     * Two possibilities :
    166166     * - either the commune name matches and we receive an URL starting with "afficherCarteCommune.do" or
    167167     * - we don't receive a single answer but a list of possible values. This answer looks like:
     
    171171     *   <option value="QK066" >COLMAR - 68000</option>
    172172     *   </select>
    173      * 
     173     *
    174174     * @param location
    175175     * @param codeCommune
     
    245245        return null;
    246246    }
    247    
     247
    248248    private void parseCommuneList(String input) {
    249249        if (input.indexOf(c0ptionListStart) != -1) {
     
    264264        }
    265265    }
    266    
     266
    267267    private void parseTAList(String input) {
    268268        while (input.indexOf(cInterfaceRaster) != -1) {
     
    272272            if (!listOfTA.contains(codeTA)) {
    273273                System.out.println("parse "+codeTA);
    274                 listOfTA.add(codeTA);               
     274                listOfTA.add(codeTA);
    275275            }
    276276            input = input.substring(cInterfaceRaster.length());
     
    314314        return cInterfaceRaster + "?f=" + codeCommune;
    315315    }
    316    
     316
    317317    public EastNorthBound retrieveCommuneBBox() throws IOException {
    318318        if (interfaceRef == null)
     
    340340        return parseBBoxCommune(line);
    341341    }
    342    
     342
    343343    private EastNorthBound parseBBoxCommune(String input) {
    344344        if (input.indexOf(cBBoxCommunStart) != -1) {
     
    356356        return null;
    357357    }
    358    
     358
    359359    private void checkLayerDuplicates(WMSLayer wmsLayer) throws DuplicateLayerException {
    360360        if (Main.map != null) {
     
    369369        }
    370370    }
    371    
    372     public void cancel() {     
     371
     372    public void cancel() {
    373373        Main.pleaseWaitDlg.currentAction.setText(tr("Aborting..."));
    374374        if (urlConn != null) {
Note: See TracChangeset for help on using the changeset viewer.