- Timestamp:
- 2014-03-05T18:37:26+01:00 (11 years ago)
- Location:
- trunk
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data_nodist/wms-cache.xsd
r4183 r6897 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://josm.openstreetmap.de/wms-cache "3 xmlns:tns="http://josm.openstreetmap.de/wms-cache " xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"2 <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://josm.openstreetmap.de/wms-cache-1.0" 3 xmlns:tns="http://josm.openstreetmap.de/wms-cache-1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 4 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 5 xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" -
trunk/src/org/openstreetmap/josm/Main.java
r6883 r6897 110 110 /** 111 111 * The JOSM website URL. 112 * @since 6 143113 */ 114 p ublicstatic final String JOSM_WEBSITE = "http://josm.openstreetmap.de";112 * @since 6897 (was public from 6143 to 6896) 113 */ 114 private static final String JOSM_WEBSITE = "http://josm.openstreetmap.de"; 115 115 116 116 /** 117 117 * The OSM website URL. 118 * @since 6 453119 */ 120 p ublicstatic final String OSM_WEBSITE = "http://www.openstreetmap.org";118 * @since 6897 (was public from 6453 to 6896) 119 */ 120 private static final String OSM_WEBSITE = "http://www.openstreetmap.org"; 121 121 122 122 /** … … 1484 1484 return new HashMap<String, Throwable>(NETWORK_ERRORS); 1485 1485 } 1486 1487 /** 1488 * Returns the JOSM website URL. 1489 * @return the josm website URL 1490 * @since 6897 1491 */ 1492 public static String getJOSMWebsite() { 1493 if(Main.pref != null) 1494 return Main.pref.get("josm.url", JOSM_WEBSITE); 1495 return JOSM_WEBSITE; 1496 } 1497 1498 /** 1499 * Returns the JOSM XML URL. 1500 * @return the josm XML URL 1501 * @since 6897 1502 */ 1503 public static String getXMLBase() { 1504 if(Main.pref != null) 1505 return Main.pref.get("xml.url", JOSM_WEBSITE); 1506 return JOSM_WEBSITE; 1507 } 1508 1509 /** 1510 * Returns the OSM website URL. 1511 * @return the OSM website URL 1512 * @since 6897 1513 */ 1514 public static String getOSMWebsite() { 1515 if(Main.pref != null) 1516 return Main.pref.get("osm.url", OSM_WEBSITE); 1517 return OSM_WEBSITE; 1518 } 1486 1519 } -
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r6380 r6897 85 85 info.add(GBC.glue(0,10), GBC.eol()); 86 86 info.add(new JLabel(tr("Homepage")), GBC.std().insets(10,0,10,0)); 87 info.add(new UrlLabel(Main. JOSM_WEBSITE,2), GBC.eol().fill(GBC.HORIZONTAL));87 info.add(new UrlLabel(Main.getJOSMWebsite(),2), GBC.eol().fill(GBC.HORIZONTAL)); 88 88 info.add(GBC.glue(0,5), GBC.eol()); 89 89 info.add(new JLabel(tr("Bug Reports")), GBC.std().insets(10,0,10,0)); -
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r6889 r6897 48 48 if (ret.startsWith("http://api.openstreetmap.org/")) { 49 49 ret = ret.substring("http://api.openstreetmap.org/".length()); 50 ret = Main. OSM_WEBSITE+ "/" + ret;50 ret = Main.getOSMWebsite() + "/" + ret; 51 51 } 52 52 return ret; … … 67 67 if (ret.startsWith("http://api.openstreetmap.org/")) { 68 68 ret = ret.substring("http://api.openstreetmap.org/".length()); 69 ret = Main. OSM_WEBSITE+ "/" + ret;69 ret = Main.getOSMWebsite() + "/" + ret; 70 70 } 71 71 return ret; -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6889 r6897 1307 1307 * The default plugin site 1308 1308 */ 1309 private static final String[] DEFAULT_PLUGIN_SITE = {Main. JOSM_WEBSITE+"/plugin%<?plugins=>"};1309 private static final String[] DEFAULT_PLUGIN_SITE = {Main.getJOSMWebsite()+"/plugin%<?plugins=>"}; 1310 1310 1311 1311 /** … … 1554 1554 StringBuilder b = new StringBuilder( 1555 1555 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + 1556 "<preferences xmlns=\""+Main. JOSM_WEBSITE+"/preferences-1.0\" version=\""+1556 "<preferences xmlns=\""+Main.getXMLBase()+"/preferences-1.0\" version=\""+ 1557 1557 Version.getInstance().getVersion() + "\">\n"); 1558 1558 SettingToXml toXml = new SettingToXml(b, nopass); -
trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java
r6143 r6897 26 26 public static final String META_EXTENSIONS = META_PREFIX + "extensions"; 27 27 28 public static final String JOSM_EXTENSIONS_NAMESPACE_URI = Main. JOSM_WEBSITE+ "/gpx-extensions-1.0";28 public static final String JOSM_EXTENSIONS_NAMESPACE_URI = Main.getXMLBase() + "/gpx-extensions-1.0"; 29 29 30 30 public static List<String> WPT_KEYS = Arrays.asList("ele", "time", "magvar", "geoidheight", -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
r6883 r6897 26 26 27 27 private static final String[] DEFAULT_LAYER_SITES = { 28 Main. JOSM_WEBSITE+"/maps"28 Main.getJOSMWebsite()+"/maps" 29 29 }; 30 30 -
trunk/src/org/openstreetmap/josm/data/imagery/types/ProjectionType.java
r6830 r6897 25 25 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 26 26 * <sequence> 27 * <element name="entry" type="{http://josm.openstreetmap.de/wms-cache }entry" maxOccurs="unbounded" minOccurs="0"/>27 * <element name="entry" type="{http://josm.openstreetmap.de/wms-cache-1.0}entry" maxOccurs="unbounded" minOccurs="0"/> 28 28 * </sequence> 29 29 * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> -
trunk/src/org/openstreetmap/josm/data/imagery/types/WmsCacheType.java
r6830 r6897 26 26 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 27 27 * <sequence> 28 * <element name="projection" type="{http://josm.openstreetmap.de/wms-cache }projection" maxOccurs="unbounded" minOccurs="0"/>28 * <element name="projection" type="{http://josm.openstreetmap.de/wms-cache-1.0}projection" maxOccurs="unbounded" minOccurs="0"/> 29 29 * </sequence> 30 30 * <attribute name="tileSize" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /> -
trunk/src/org/openstreetmap/josm/data/imagery/types/package-info.java
r6069 r6897 6 6 // 7 7 8 @javax.xml.bind.annotation.XmlSchema(namespace = "http://josm.openstreetmap.de/wms-cache ", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)8 @javax.xml.bind.annotation.XmlSchema(namespace = "http://josm.openstreetmap.de/wms-cache-1.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) 9 9 package org.openstreetmap.josm.data.imagery.types; -
trunk/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java
r6883 r6897 32 32 * The default OSM OAuth request token URL. 33 33 */ 34 public static final String DEFAULT_REQUEST_TOKEN_URL = Main. OSM_WEBSITE+ "/oauth/request_token";34 public static final String DEFAULT_REQUEST_TOKEN_URL = Main.getOSMWebsite() + "/oauth/request_token"; 35 35 /** 36 36 * The default OSM OAuth access token URL. 37 37 */ 38 public static final String DEFAULT_ACCESS_TOKEN_URL = Main. OSM_WEBSITE+ "/oauth/access_token";38 public static final String DEFAULT_ACCESS_TOKEN_URL = Main.getOSMWebsite() + "/oauth/access_token"; 39 39 /** 40 40 * The default OSM OAuth authorize URL. 41 41 */ 42 public static final String DEFAULT_AUTHORISE_URL = Main. OSM_WEBSITE+ "/oauth/authorize";42 public static final String DEFAULT_AUTHORISE_URL = Main.getOSMWebsite() + "/oauth/authorize"; 43 43 44 44 -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r6869 r6897 231 231 232 232 /** 233 * Determines the {@code index}-th key/value/tag (depending on {@code type}) of the {@link Selector.GeneralSelector}. 233 * Determines the {@code index}-th key/value/tag (depending on {@code type}) of the 234 * {@link org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector}. 234 235 */ 235 236 static String determineArgument(Selector.GeneralSelector matchingSelector, int index, String type) { -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r6889 r6897 160 160 161 161 private String fixImageLinks(String s) { 162 Matcher m = Pattern.compile("src=\""+Main. JOSM_WEBSITE+"/browser/trunk(/images/.*?\\.png)\\?format=raw\"").matcher(s);162 Matcher m = Pattern.compile("src=\""+Main.getJOSMWebsite()+"/browser/trunk(/images/.*?\\.png)\\?format=raw\"").matcher(s); 163 163 StringBuffer sb = new StringBuffer(); 164 164 while (m.find()) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
r6890 r6897 72 72 + "<p><strong>" + tr("Examples") + "</strong></p>" 73 73 + "<ul>" 74 + "<li><a href=\""+Main. OSM_WEBSITE+"/browse/changesets?open=true\">"+Main.OSM_WEBSITE+"/browse/changesets?open=true</a></li>"74 + "<li><a href=\""+Main.getOSMWebsite()+"/browse/changesets?open=true\">"+Main.getOSMWebsite()+"/browse/changesets?open=true</a></li>" 75 75 + "<li><a href=\"http://api.openstreetmap.org/api/0.6/changesets?open=true\">http://api.openstreetmap.org/api/0.6/changesets?open=true</a></li>" 76 76 + "</ul>" -
trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java
r6784 r6897 28 28 */ 29 29 public static String getWikiBaseUrl() { 30 return Main.pref.get("help.baseurl", Main. JOSM_WEBSITE);30 return Main.pref.get("help.baseurl", Main.getJOSMWebsite()); 31 31 } 32 32 -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r6890 r6897 230 230 * @param monitor 231 231 * @see MemoryTileCache#clear() 232 * @see OsmFileCacheTileLoader#clearCache(org.openstreetmap.gui.jmapviewer.interfaces.TileSource, org.openstreetmap.gui.jmapviewer. OsmFileCacheTileLoader.TileClearController)232 * @see OsmFileCacheTileLoader#clearCache(org.openstreetmap.gui.jmapviewer.interfaces.TileSource, org.openstreetmap.gui.jmapviewer.interfaces.TileClearController) 233 233 */ 234 234 void clearTileCache(ProgressMonitor monitor) { -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r6890 r6897 679 679 * Finds the most suitable resolution for the current zoom level, but prefers 680 680 * higher resolutions. Snaps to values defined in snapLevels. 681 * @return 681 * @return best zoom level 682 682 */ 683 683 private static double getBestZoom() { -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java
r6453 r6897 43 43 JPanel msg = new JPanel(new GridBagLayout()); 44 44 msg.add(new JLabel(tr("<html>Upload of unprocessed GPS data as map data is considered harmful.<br>If you want to upload traces, look here:</html>")), GBC.eol()); 45 msg.add(new UrlLabel(Main. OSM_WEBSITE+ "/traces", 2), GBC.eop());45 msg.add(new UrlLabel(Main.getOSMWebsite() + "/traces", 2), GBC.eop()); 46 46 if (!ConditionalOptionPaneUtil.showConfirmationDialog("convert_to_data", Main.parent, msg, tr("Warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, JOptionPane.OK_OPTION)) { 47 47 return; -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r6896 r6897 30 30 import org.openstreetmap.josm.tools.Utils; 31 31 import org.openstreetmap.josm.Main; 32 33 /************* 34 * <pre> 35 * Parser definitions 36 * 37 * rule 38 * _______________________|______________________________ 39 * | | 40 * selector declaration 41 * _________|___________________ _________|____________ 42 * | | | | 43 * 44 * way|z11-12[highway=residential] { color: red; width: 3 } 45 * 46 * |_____||___________________| |_________| 47 * | | | 48 * zoom condition instruction 49 * 50 * more general: 51 * 52 * way|z13-[a=b][c=d]::subpart, way|z-3[u=v]:closed::subpart2 { p1 : val; p2 : val; } 53 * 54 * 'val' can be a literal, or an expression like "prop(width, default) + 0.8". 55 * 56 * {@literal @media} { ... } queries are supported, following http://www.w3.org/TR/css3-mediaqueries/#syntax 57 * 58 * media_query 59 * ___________________________|_______________________________ 60 * | | 61 * {@literal @media} all and (min-josm-version: 7789) and (max-josm-version: 7790), all and (user-agent: xyz) { ... } 62 * |______________________| 63 * | 64 * media_expression 65 * </pre> 66 */ 32 67 33 68 public class MapCSSParser { … … 112 147 } 113 148 114 /*************115 * Parser definitions116 *117 * rule118 * _______________________|______________________________119 * | |120 * selector declaration121 * _________|___________________ _________|____________122 * | | | |123 *124 * way|z11-12[highway=residential] { color: red; width: 3 }125 *126 * |_____||___________________| |_________|127 * | | |128 * zoom condition instruction129 *130 * more general:131 *132 * way|z13-[a=b][c=d]::subpart, way|z-3[u=v]:closed::subpart2 { p1 : val; p2 : val; }133 *134 * 'val' can be a literal, or an expression like "prop(width, default) + 0.8".135 *136 * @media { ... } queries are supported, following http://www.w3.org/TR/css3-mediaqueries/#syntax137 *138 * media_query139 * ___________________________|_______________________________140 * | |141 * @media all and (min-josm-version: 7789) and (max-josm-version: 7790), all and (user-agent: xyz) { ... }142 * |______________________|143 * |144 * media_expression145 */146 147 149 int uint() : 148 150 { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r6883 r6897 311 311 312 312 /** 313 * Super class of {@link GeneralSelector} and {@link LinkSelector}. 313 * Super class of {@link org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector} and 314 * {@link org.openstreetmap.josm.gui.mappaint.mapcss.Selector.LinkSelector}. 314 315 * @since 5841 315 316 */ -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r6867 r6897 80 80 XmlObjectParser parser = new XmlObjectParser(new XmlStyleSourceHandler(this)); 81 81 parser.startWithValidation(reader, 82 Main. JOSM_WEBSITE+"/mappaint-style-1.0",82 Main.getXMLBase()+"/mappaint-style-1.0", 83 83 "resource://data/mappaint-style.xsd"); 84 84 while (parser.hasNext()); -
trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
r6883 r6897 87 87 88 88 public MapPaintSourceEditor() { 89 super(SourceType.MAP_PAINT_STYLE, Main. JOSM_WEBSITE+"/styles", styleSourceProviders, true);89 super(SourceType.MAP_PAINT_STYLE, Main.getJOSMWebsite()+"/styles", styleSourceProviders, true); 90 90 } 91 91 -
trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
r6883 r6897 192 192 193 193 public TaggingPresetSourceEditor() { 194 super(SourceType.TAGGING_PRESET, Main. JOSM_WEBSITE+"/presets", presetSourceProviders, true);194 super(SourceType.TAGGING_PRESET, Main.getJOSMWebsite()+"/presets", presetSourceProviders, true); 195 195 } 196 196 -
trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreference.java
r6806 r6897 58 58 59 59 public TagCheckerRulesSourceEditor() { 60 super(SourceType.TAGCHECKER_RULE, Main. JOSM_WEBSITE+"/rules", ruleSourceProviders, false);60 super(SourceType.TAGCHECKER_RULE, Main.getJOSMWebsite()+"/rules", ruleSourceProviders, false); 61 61 } 62 62 -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
r6867 r6897 105 105 106 106 if (validate) { 107 parser.startWithValidation(in, Main. JOSM_WEBSITE+"/tagging-preset-1.0", "resource://data/tagging-preset.xsd");107 parser.startWithValidation(in, Main.getXMLBase()+"/tagging-preset-1.0", "resource://data/tagging-preset.xsd"); 108 108 } else { 109 109 parser.start(in); -
trunk/src/org/openstreetmap/josm/io/MessageNotifier.java
r6695 r6897 67 67 JPanel panel = new JPanel(new GridBagLayout()); 68 68 panel.add(new JLabel(trn("You have {0} unread message.", "You have {0} unread messages.", unread, unread)), GBC.eol()); 69 panel.add(new UrlLabel(Main. OSM_WEBSITE+ "/user/"+userInfo.getDisplayName()+"/inbox", tr("Click here to see your inbox.")), GBC.eol());69 panel.add(new UrlLabel(Main.getOSMWebsite() + "/user/"+userInfo.getDisplayName()+"/inbox", tr("Click here to see your inbox.")), GBC.eol()); 70 70 panel.setOpaque(false); 71 71 new Notification().setContent(panel) -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
r6798 r6897 58 58 @Override 59 59 public String[] getUsageExamples() { 60 return new String[] { "/import?url="+Main. JOSM_WEBSITE+"/browser/josm/trunk/data_nodist/direction-arrows.osm" };60 return new String[] { "/import?url="+Main.getJOSMWebsite()+"/browser/josm/trunk/data_nodist/direction-arrows.osm" }; 61 61 } 62 62 -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r6797 r6897 162 162 tr("You have encountered an error in JOSM. Before you file a bug report " + 163 163 "make sure you have updated to the latest version of JOSM here:")), GBC.eol()); 164 p.add(new UrlLabel(Main. JOSM_WEBSITE,2), GBC.eop().insets(8,0,0,0));164 p.add(new UrlLabel(Main.getJOSMWebsite(),2), GBC.eop().insets(8,0,0,0)); 165 165 p.add(new JMultilineLabel( 166 166 tr("You should also update your plugins. If neither of those help please " + … … 174 174 tr("Alternatively, if that does not work you can manually fill in the information " + 175 175 "below at this URL:")), GBC.eol()); 176 p.add(new UrlLabel(Main. JOSM_WEBSITE+"/newticket",2), GBC.eop().insets(8,0,0,0));176 p.add(new UrlLabel(Main.getJOSMWebsite()+"/newticket",2), GBC.eop().insets(8,0,0,0)); 177 177 if (Utils.copyToClipboard(text)) { 178 178 p.add(new JLabel(tr("(The text has already been copied to your clipboard.)")), GBC.eop()); … … 217 217 Utils.close(gzip); 218 218 219 return new URL(Main. JOSM_WEBSITE+"/josmticket?" +219 return new URL(Main.getJOSMWebsite()+"/josmticket?" + 220 220 "gdata="+Base64.encode(ByteBuffer.wrap(out.toByteArray()), true)); 221 221 } catch (IOException e) { … … 234 234 URL url = getBugReportUrl(debugText); 235 235 if (url != null) { 236 return new UrlLabel(url.toString(), Main. JOSM_WEBSITE+"/josmticket?...", 2);236 return new UrlLabel(url.toString(), Main.getJOSMWebsite()+"/josmticket?...", 2); 237 237 } 238 238 return null; -
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r6889 r6897 304 304 double lon = (Math.round(dlon * decimals)); 305 305 lon /= decimals; 306 return Main. OSM_WEBSITE+ "/#map="+zoom+"/"+lat+"/"+lon;306 return Main.getOSMWebsite() + "/#map="+zoom+"/"+lat+"/"+lon; 307 307 } 308 308 } -
trunk/src/org/openstreetmap/josm/tools/WikiReader.java
r6642 r6897 30 30 */ 31 31 public WikiReader() { 32 this.baseurl = Main.pref.get("help.baseurl", Main. JOSM_WEBSITE);32 this.baseurl = Main.pref.get("help.baseurl", Main.getJOSMWebsite()); 33 33 } 34 34 … … 114 114 String b = ""; 115 115 String full = ""; 116 String baseurlus = baseurl.replace("https:","http:"); 117 String baseurlse = baseurlus.replace("http:","https:"); 116 118 for (String line = in.readLine(); line != null; line = in.readLine()) { 117 119 full += line; … … 136 138 b += line.replaceAll("<img ", "<img border=\"0\" ") 137 139 .replaceAll("<span class=\"icon\">.</span>", "") 138 .replaceAll("href=\"/", "href=\"" + baseurl + "/") 140 .replaceAll("href=\"/", "href=\"" + baseurlus + "/") 141 .replaceAll("href=\"/", "href=\"" + baseurlse + "/") 139 142 .replaceAll(" />", ">") 140 143 + "\n";
Note:
See TracChangeset
for help on using the changeset viewer.