Changeset 6889 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2014-02-27T01:41:49+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
r6643 r6889 25 25 * Common intervals 26 26 */ 27 final static publicint INTERVAL_ALWAYS = -1;28 final static publicint INTERVAL_HOURLY = 60*60;29 final static publicint INTERVAL_DAILY = INTERVAL_HOURLY * 24;30 final static publicint INTERVAL_WEEKLY = INTERVAL_DAILY * 7;31 final static publicint INTERVAL_MONTHLY = INTERVAL_WEEKLY * 4;32 final static publicint INTERVAL_NEVER = Integer.MAX_VALUE;27 public static final int INTERVAL_ALWAYS = -1; 28 public static final int INTERVAL_HOURLY = 60*60; 29 public static final int INTERVAL_DAILY = INTERVAL_HOURLY * 24; 30 public static final int INTERVAL_WEEKLY = INTERVAL_DAILY * 7; 31 public static final int INTERVAL_MONTHLY = INTERVAL_WEEKLY * 4; 32 public static final int INTERVAL_NEVER = Integer.MAX_VALUE; 33 33 34 34 /** … … 40 40 * The ident that identifies the stored file. Includes file-ending. 41 41 */ 42 final privateString ident;42 private final String ident; 43 43 44 44 /** 45 45 * The (file-)path where the data will be stored 46 46 */ 47 final privateFile path;47 private final File path; 48 48 49 49 /** 50 50 * How often to update the cached version 51 51 */ 52 final privateint updateInterval;52 private final int updateInterval; 53 53 54 54 /** -
trunk/src/org/openstreetmap/josm/io/CacheFiles.java
r6248 r6889 29 29 * Common expirey dates 30 30 */ 31 final static publicint EXPIRE_NEVER = -1;32 final static publicint EXPIRE_DAILY = 60 * 60 * 24;33 final static publicint EXPIRE_WEEKLY = EXPIRE_DAILY * 7;34 final static publicint EXPIRE_MONTHLY = EXPIRE_WEEKLY * 4;35 36 final privateFile dir;37 final privateString ident;38 final privateboolean enabled;31 public static final int EXPIRE_NEVER = -1; 32 public static final int EXPIRE_DAILY = 60 * 60 * 24; 33 public static final int EXPIRE_WEEKLY = EXPIRE_DAILY * 7; 34 public static final int EXPIRE_MONTHLY = EXPIRE_WEEKLY * 4; 35 36 private final File dir; 37 private final String ident; 38 private final boolean enabled; 39 39 40 40 private long expire; // in seconds … … 273 273 } 274 274 275 final static public int CLEAN_ALL = 0; 276 final static public int CLEAN_SMALL_FILES = 1; 277 final static public int CLEAN_BY_DATE = 2; 275 public static final int CLEAN_ALL = 0; 276 public static final int CLEAN_SMALL_FILES = 1; 277 public static final int CLEAN_BY_DATE = 2; 278 278 279 /** 279 280 * Performs a non-default, specified clean up -
trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java
r6643 r6889 31 31 * that a changeset was closed 32 32 */ 33 final static publicString ERROR_HEADER_PATTERN = "The changeset (\\d+) was closed at (.*)";33 public static final String ERROR_HEADER_PATTERN = "The changeset (\\d+) was closed at (.*)"; 34 34 35 35 public static enum Source { … … 57 57 * @return true if <code>errorHeader</code> matches with {@link #ERROR_HEADER_PATTERN} 58 58 */ 59 static public boolean errorHeaderMatchesPattern(String errorHeader) {59 public static boolean errorHeaderMatchesPattern(String errorHeader) { 60 60 if (errorHeader == null) 61 61 return false; -
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r6830 r6889 36 36 * 37 37 */ 38 static public ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException{38 public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException{ 39 39 return new ChangesetQueryUrlParser().parse(query); 40 40 } -
trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java
r6380 r6889 32 32 public class DiffResultProcessor { 33 33 34 static privateclass DiffResultEntry {34 private static class DiffResultEntry { 35 35 public long new_id; 36 36 public int new_version; -
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r6815 r6889 39 39 40 40 public class GpxExporter extends FileExporter implements GpxConstants { 41 private final staticString warningGpl = "<html><font color='red' size='-2'>"41 private static final String warningGpl = "<html><font color='red' size='-2'>" 42 42 + tr("Note: GPL is not compatible with the OSM license. Do not upload GPL licensed tracks.") + "</html>"; 43 43 -
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r6552 r6889 41 41 private String indent = ""; 42 42 43 private final staticint WAY_POINT = 0;44 private final staticint ROUTE_POINT = 1;45 private final staticint TRACK_POINT = 2;43 private static final int WAY_POINT = 0; 44 private static final int ROUTE_POINT = 1; 45 private static final int TRACK_POINT = 2; 46 46 47 47 public void write(GpxData data) { -
trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
r6867 r6889 34 34 File file = null; 35 35 36 public final staticlong DEFAULT_MAXTIME = -1L;36 public static final long DEFAULT_MAXTIME = -1L; 37 37 38 38 /** -
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r6822 r6889 132 132 public GpxData data; 133 133 134 // private final staticSimpleDateFormat GGATIMEFMT =134 // private static final SimpleDateFormat GGATIMEFMT = 135 135 // new SimpleDateFormat("HHmmss.SSS"); 136 private final staticSimpleDateFormat RMCTIMEFMT =136 private static final SimpleDateFormat RMCTIMEFMT = 137 137 new SimpleDateFormat("ddMMyyHHmmss.SSS"); 138 private final staticSimpleDateFormat RMCTIMEFMTSTD =138 private static final SimpleDateFormat RMCTIMEFMTSTD = 139 139 new SimpleDateFormat("ddMMyyHHmmss"); 140 140 141 private Date readTime(String p) 142 { 141 private Date readTime(String p) { 143 142 Date d = RMCTIMEFMT.parse(p, new ParsePosition(0)); 144 143 if (d == null) { -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r6875 r6889 59 59 * Maximum number of retries to send a request in case of HTTP 500 errors or timeouts 60 60 */ 61 static public final int DEFAULT_MAX_NUM_RETRIES = 5;61 public static final int DEFAULT_MAX_NUM_RETRIES = 5; 62 62 63 63 /** … … 67 67 * @since 5386 68 68 */ 69 static public final int MAX_DOWNLOAD_THREADS = 2;69 public static final int MAX_DOWNLOAD_THREADS = 2; 70 70 71 71 /** … … 73 73 * @since 5422 74 74 */ 75 static public final String DEFAULT_API_URL = "http://api.openstreetmap.org/api";75 public static final String DEFAULT_API_URL = "http://api.openstreetmap.org/api"; 76 76 77 77 // The collection of instantiated OSM APIs … … 88 88 * 89 89 */ 90 static public OsmApi getOsmApi(String serverUrl) {90 public static OsmApi getOsmApi(String serverUrl) { 91 91 OsmApi api = instances.get(serverUrl); 92 92 if (api == null) { … … 102 102 * @return the OsmApi 103 103 */ 104 static public OsmApi getOsmApi() {104 public static OsmApi getOsmApi() { 105 105 String serverUrl = Main.pref.get("osm-server.url", DEFAULT_API_URL); 106 106 return getOsmApi(serverUrl); -
trunk/src/org/openstreetmap/josm/io/OsmApiPrimitiveGoneException.java
r3083 r6889 17 17 * The regexp pattern for the error header replied by the OSM API 18 18 */ 19 static public final String ERROR_HEADER_PATTERN = "The (\\S+) with the id (\\d+) has already been deleted";19 public static final String ERROR_HEADER_PATTERN = "The (\\S+) with the id (\\d+) has already been deleted"; 20 20 /** the type of the primitive which is gone on the server */ 21 21 private OsmPrimitiveType type; -
trunk/src/org/openstreetmap/josm/io/OsmChangeBuilder.java
r6009 r6889 18 18 */ 19 19 public class OsmChangeBuilder { 20 static public final String DEFAULT_API_VERSION = "0.6";20 public static final String DEFAULT_API_VERSION = "0.6"; 21 21 22 22 private String currentMode; -
trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java
r6695 r6889 25 25 public class OsmServerUserInfoReader extends OsmServerReader { 26 26 27 static protectedString getAttribute(Node node, String name) {27 protected static String getAttribute(Node node, String name) { 28 28 return node.getAttributes().getNamedItem(name).getNodeValue(); 29 29 } … … 35 35 * @throws OsmDataParsingException if parsing goes wrong 36 36 */ 37 static public UserInfo buildFromXML(Document document) throws OsmDataParsingException {37 public static UserInfo buildFromXML(Document document) throws OsmDataParsingException { 38 38 try { 39 39 XPathFactory factory = XPathFactory.newInstance();
Note:
See TracChangeset
for help on using the changeset viewer.