Ignore:
Timestamp:
2009-06-24T20:42:27+02:00 (15 years ago)
Author:
Gubaer
Message:

#2703: patch (slightly extended) by dmuecke
clean up: few issues in Capabilities and OsmApi

Location:
trunk/src/org/openstreetmap/josm/io
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/Capabilities.java

    r1665 r1691  
    1515    }
    1616
    17     public boolean isDefind(String element, String attribute) {
     17    public boolean isDefined(String element, String attribute) {
    1818        if (! capabilities.containsKey(element)) return false;
    1919        HashMap<String, String> e = capabilities.get(element);
     
    2929    }
    3030
    31     public Double getDouble(String element, String attribute) {
     31    /**
     32     * replies the value of configuration item in the capabilities as
     33     * double value
     34     *
     35     * @param element  the name of the element
     36     * @param attribute the name of the attribute
     37     * @return the value; null, if the respective configuration item doesn't exist
     38     * @throws NumberFormatException  if the value is not a valid double
     39     */
     40    public Double getDouble(String element, String attribute) throws NumberFormatException {
    3241        String s = get(element, attribute);
    3342        if (s == null) return null;
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r1690 r1691  
    327327
    328328        String diff = duv.getDocument();
    329         String diffresult = sendRequest("POST", "changeset/" + changeset.id + "/upload", diff);
    330329        try {
     330            String diffresult = sendRequest("POST", "changeset/" + changeset.id + "/upload", diff);
    331331            DiffResultReader.parseDiffResult(diffresult, list, processed, duv.getNewIdMap(), Main.pleaseWaitDlg);
    332332        } catch(Exception e) {
     
    496496        );
    497497    }
     498
     499    /**
     500     * returns the API capabilities; null, if the API is not initialized yet
     501     *
     502     * @return the API capabilities
     503     */
     504    public Capabilities getCapabilities() {
     505        return capabilities;
     506    }
    498507}
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r1682 r1691  
    112112                    }
    113113                } catch (Exception ee) {
     114                    ee.printStackTrace();
    114115                    // ignore nested exception
    115116                }
Note: See TracChangeset for help on using the changeset viewer.