Ignore:
Timestamp:
2016-09-17T23:13:48+02:00 (8 years ago)
Author:
Don-vip
Message:

javadoc

File:
1 edited

Legend:

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

    r11009 r11016  
    77import java.io.Reader;
    88import java.net.URL;
     9import java.util.Collections;
    910import java.util.LinkedList;
    1011import java.util.List;
     
    4041    }
    4142
     43    /**
     44     * Performs a Nominatim search.
     45     * @param searchExpression Nominatim search expression
     46     * @return search results
     47     * @throws IOException if any IO error occurs.
     48     */
    4249    public static List<SearchResult> queryNominatim(final String searchExpression) throws IOException {
    4350        return query(new URL(NOMINATIM_URL + Utils.encodeUrl(searchExpression)));
    4451    }
    4552
     53    /**
     54     * Performs a custom search.
     55     * @param url search URL to any Nominatim instance
     56     * @return search results
     57     * @throws IOException if any IO error occurs.
     58     */
    4659    public static List<SearchResult> query(final URL url) throws IOException {
    4760        final HttpClient connection = HttpClient.create(url);
     
    5467    }
    5568
     69    /**
     70     * Parse search results as returned by Nominatim.
     71     * @param reader reader
     72     * @return search results
     73     * @throws ParserConfigurationException if a parser cannot be created which satisfies the requested configuration.
     74     * @throws SAXException for SAX errors.
     75     * @throws IOException if any IO error occurs.
     76     */
    5677    public static List<SearchResult> parseSearchResults(Reader reader) throws IOException, ParserConfigurationException, SAXException {
    5778        InputSource inputSource = new InputSource(reader);
     
    249270
    250271        public List<SearchResult> getResult() {
    251             return data;
     272            return Collections.unmodifiableList(data);
    252273        }
    253274    }
Note: See TracChangeset for help on using the changeset viewer.