Changeset 31848 in osm for applications/editors/josm
- Timestamp:
- 2015-12-22T18:51:36+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/wikipedia/src/org/wikipedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java
r31847 r31848 47 47 final String url = "https://tools.wmflabs.org/wp-world/marks.php?" 48 48 + "bbox=" + bbox + "&LANG=" + wikipediaLang; 49 System.out.println("Wikipedia: GET " + url);49 Main.info("Wikipedia: GET " + url); 50 50 // parse XML document 51 51 final XPathExpression xpathPlacemark = XPathFactory.newInstance().newXPath().compile("//Placemark"); … … 81 81 + "&depth=" + depth 82 82 + "&cat=" + encodeURL(category); 83 System.out.println("Wikipedia: GET " + url);83 Main.info("Wikipedia: GET " + url); 84 84 try (final InputStream in = Utils.openURL(new URL(url)); 85 85 final Scanner scanner = new Scanner(in, "UTF-8").useDelimiter("\n")) { … … 116 116 final String url = "https://tools.wmflabs.org/wiwosm/osmjson/getGeoJSON.php?action=check" 117 117 + "&lang=" + wikipediaLang; 118 System.out.println("Wikipedia: POST " + url + " " + articleNames);118 Main.info("Wikipedia: POST " + url + " " + articleNames); 119 119 120 120 try { … … 175 175 "&lllimit=500" + 176 176 "&format=xml"; 177 System.out.println("Wikipedia: GET " + url);177 Main.info("Wikipedia: GET " + url); 178 178 try (final InputStream in = Utils.openURL(new URL(url))) { 179 179 final Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in); … … 270 270 final WikipediaLangArticle wp = WikipediaLangArticle.parseFromUrl(getHrefFromDescription(description)); 271 271 if (wp == null) { 272 System.err.println("Could not extract Wikipedia tag from: " + getHrefFromDescription(description));272 Main.warn("Could not extract Wikipedia tag from: " + getHrefFromDescription(description)); 273 273 } 274 274 this.wikipediaLang = wp == null ? null : wp.lang; … … 291 291 return m.group(1); 292 292 } else { 293 System.err.println("Could not parse URL from: " + description);293 Main.warn("Could not parse URL from: " + description); 294 294 return null; 295 295 } … … 305 305 + "&lang=" + wikipediaLang 306 306 + "&article=" + encodeURL(wikipediaArticle); 307 System.out.println("Wikipedia: GET " + url);307 Main.info("Wikipedia: GET " + url); 308 308 try (final InputStream in = Utils.openURL(new URL(url)); 309 309 final Scanner scanner = new Scanner(in, "UTF-8")) { -
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java
r31114 r31848 228 228 if (list.getSelectedValue() != null) { 229 229 final String url = ((WikipediaEntry) list.getSelectedValue()).getBrowserUrl(); 230 System.out.println("Wikipedia: opening " + url);230 Main.info("Wikipedia: opening " + url); 231 231 OpenBrowser.displayUrl(url); 232 232 }
Note:
See TracChangeset
for help on using the changeset viewer.