Changeset 9231 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2016-01-01T02:35:34+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 17 edited
-
FileImporter.java (modified) (3 diffs)
-
GpxExporter.java (modified) (1 diff)
-
GpxReader.java (modified) (3 diffs)
-
GpxWriter.java (modified) (3 diffs)
-
MultiFetchServerObjectReader.java (modified) (4 diffs)
-
OsmReader.java (modified) (4 diffs)
-
OsmServerBackreferenceReader.java (modified) (1 diff)
-
OsmServerHistoryReader.java (modified) (1 diff)
-
OsmServerWriter.java (modified) (1 diff)
-
OsmWriter.java (modified) (2 diffs)
-
UTFInputStreamReader.java (modified) (2 diffs)
-
XmlWriter.java (modified) (2 diffs)
-
remotecontrol/AddTagsDialog.java (modified) (2 diffs)
-
remotecontrol/RequestProcessor.java (modified) (2 diffs)
-
remotecontrol/handler/AddWayHandler.java (modified) (1 diff)
-
session/SessionReader.java (modified) (1 diff)
-
session/SessionWriter.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/FileImporter.java
r8929 r9231 19 19 import org.openstreetmap.josm.gui.util.GuiHelper; 20 20 21 /** 22 * Abstract file importer. 23 * @since 1637 24 */ 21 25 public abstract class FileImporter implements Comparable<FileImporter>, LayerChangeListener { 22 26 … … 77 81 78 82 /** 79 * Wrapper to give meaningful output if things go wrong. 83 * Wrapper to {@link #importData(File, ProgressMonitor)} to give meaningful output if things go wrong. 84 * @param f data file to import 85 * @param progressMonitor progress monitor 80 86 * @return true if data import was successful 81 87 */ … … 121 127 } 122 128 129 /** 130 * Wrapper to {@link #importData(List, ProgressMonitor)} to give meaningful output if things go wrong. 131 * @param files data files to import 132 * @param progressMonitor progress monitor 133 * @return true if data import was successful 134 */ 123 135 public boolean importDataHandleExceptions(List<File> files, ProgressMonitor progressMonitor) { 124 136 try { -
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r8870 r9231 248 248 /** 249 249 * Add all those listeners to handle the enable state of the fields. 250 * @param data GPX data 251 * @param author Author checkbox 252 * @param authorName Author name textfield 253 * @param email E-mail textfield 254 * @param copyright Copyright textfield 255 * @param predefined Predefined button 256 * @param copyrightYear Copyright year textfield 257 * @param nameLabel Name label 258 * @param emailLabel E-mail label 259 * @param copyrightLabel Copyright label 260 * @param copyrightYearLabel Copyright year label 261 * @param warning Warning label 250 262 */ 251 263 private static void addDependencies( -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r9078 r9231 499 499 /** 500 500 * convert url/urlname to link element (GPX 1.0 -> GPX 1.1). 501 * @param attr attributes 501 502 */ 502 503 private void convertUrlToLink(Map<String, Object> attr) { … … 509 510 GpxLink link = new GpxLink(url); 510 511 link.text = urlname; 511 @SuppressWarnings( {"unchecked", "rawtypes" })512 @SuppressWarnings("unchecked") 512 513 Collection<GpxLink> links = (Collection<GpxLink>) attr.get(META_LINKS); 513 514 links.add(link); … … 531 532 * @throws IOException if an IO error occurs, e.g. the input stream is closed. 532 533 */ 533 @SuppressWarnings("resource")534 534 public GpxReader(InputStream source) throws IOException { 535 535 Reader utf8stream = UTFInputStreamReader.create(source); -
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r8846 r9231 248 248 * if content not null, open tag, write encoded content, and close tag 249 249 * else do nothing. 250 * @param tag GPX tag 251 * @param content content 250 252 */ 251 253 private void simpleTag(String tag, String content) { … … 260 262 /** 261 263 * output link 264 * @param link link 262 265 */ 263 266 private void gpxLink(GpxLink link) { … … 272 275 /** 273 276 * output a point 277 * @param pnt waypoint 278 * @param mode {@code WAY_POINT} for {@code wpt}, {@code ROUTE_POINT} for {@code rtept}, {@code TRACK_POINT} for {@code trkpt} 274 279 */ 275 280 private void wayPoint(WayPoint pnt, int mode) { -
trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
r9078 r9231 299 299 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, 300 300 * {@link OsmPrimitiveType#RELATION RELATION} 301 * @param progressMonitor progress monitor 301 302 * @throws OsmTransferException if an error occurs while communicating with the API server 302 303 */ … … 485 486 * {@link OsmPrimitiveType#RELATION RELATION} 486 487 * @param pkg the package of ids 488 * @param progressMonitor progress monitor 487 489 * @return the {@link FetchResult} of this operation 488 490 * @throws OsmTransferException if an error occurs while communicating with the API server … … 513 515 * {@link OsmPrimitiveType#RELATION RELATION} 514 516 * @param id the id 517 * @param progressMonitor progress monitor 515 518 * @return the {@link DataSet} resulting of this operation 516 519 * @throws OsmTransferException if an error occurs while communicating with the API server … … 544 547 * {@link OsmPrimitiveType#RELATION RELATION} 545 548 * @param pkg the set of ids 549 * @param progressMonitor progress monitor 546 550 * @return the {@link FetchResult} of this operation 547 551 * @throws OsmTransferException if an error occurs while communicating with the API server -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r9087 r9231 57 57 private static volatile List<OsmServerReadPostprocessor> postprocessors; 58 58 59 /** register a new postprocessor */ 59 /** Register a new postprocessor. 60 * @param pp postprocessor 61 * @see #deregisterPostprocessor 62 */ 60 63 public static void registerPostprocessor(OsmServerReadPostprocessor pp) { 61 64 if (postprocessors == null) { … … 65 68 } 66 69 67 /** deregister a postprocessor previously registered with registerPostprocessor */ 70 /** 71 * Deregister a postprocessor previously registered with {@link #registerPostprocessor}. 72 * @param pp postprocessor 73 * @see #registerPostprocessor 74 */ 68 75 public static void deregisterPostprocessor(OsmServerReadPostprocessor pp) { 69 76 if (postprocessors != null) { … … 399 406 * This is basically the same code as parseUnknown(), except for the warnings, which 400 407 * are displayed for inner elements and not at top level. 408 * @param printWarning if {@code true}, a warning message will be printed if an unknown element is met 401 409 * @throws XMLStreamException if there is an error processing the underlying XML source 402 410 */ … … 432 440 /** 433 441 * Read out the common attributes and put them into current OsmPrimitive. 442 * @param current primitive to update 434 443 * @throws XMLStreamException if there is an error processing the underlying XML source 435 444 */ -
trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
r8510 r9231 148 148 * Reads referring ways from the API server and replies them in a {@link DataSet} 149 149 * 150 * @param progressMonitor progress monitor 150 151 * @return the data set 151 152 * @throws OsmTransferException if any error occurs during dialog with OSM API -
trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java
r9078 r9231 50 50 /** 51 51 * Fetches the history from the OSM API and parses it 52 * @param progressMonitor progress monitor 52 53 * 53 54 * @return the data set with the parsed history data -
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r9078 r9231 256 256 /** 257 257 * Calls all registered upload postprocessors. 258 * @param pm progress monitor 258 259 */ 259 260 public void executePostprocessors(ProgressMonitor pm) { -
trunk/src/org/openstreetmap/josm/io/OsmWriter.java
r9078 r9231 46 46 47 47 /** 48 * Do not call this directly. Use OsmWriterFactory instead. 48 * Constructs a new {@code OsmWriter}. 49 * Do not call this directly. Use {@link OsmWriterFactory} instead. 50 * @param out print writer 51 * @param version OSM API version (0.6) 49 52 */ 50 53 protected OsmWriter(PrintWriter out, boolean osmConform, String version) { … … 279 282 * Add the common part as the form of the tag as well as the XML attributes 280 283 * id, action, user, and visible. 284 * @param osm osm primitive 285 * @param tagname XML tag matching osm primitive (node, way, relation) 281 286 */ 282 287 protected void addCommon(IPrimitive osm, String tagname) { -
trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java
r8926 r9231 15 15 /** 16 16 * Creates a new {@link InputStreamReader} from the {@link InputStream} with UTF-8 as default encoding. 17 * @param input input stream 17 18 * @return A reader with the correct encoding. Starts to read after the BOM. 18 19 * @throws IOException if any I/O error occurs … … 25 26 /** 26 27 * Creates a new {@link InputStreamReader} from the {@link InputStream}. 28 * @param input input stream 27 29 * @param defaultEncoding Used, when no BOM was recognized. Can be null. 28 30 * @return A reader with the correct encoding. Starts to read after the BOM. -
trunk/src/org/openstreetmap/josm/io/XmlWriter.java
r8929 r9231 17 17 protected final PrintWriter out; 18 18 19 /** 20 * Constructs a new {@code XmlWriter}. 21 * @param out print writer 22 */ 19 23 public XmlWriter(PrintWriter out) { 20 24 this.out = out; … … 30 34 } 31 35 36 /** 37 * Encode the given string in XML1.0 format. 38 * Optimized to fast pass strings that don't need encoding (normal case). 39 * 40 * @param unencoded the unencoded input string 41 * @return XML1.0 string 42 */ 32 43 public static String encode(String unencoded) { 33 44 return encode(unencoded, false); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r9078 r9231 119 119 /** 120 120 * Constructs a new {@code AddTagsDialog}. 121 * @param tags tags to add 122 * @param senderName String for skipping confirmations. Use empty string for always confirmed adding. 123 * @param primitives OSM objects that will be modified 121 124 */ 122 125 public AddTagsDialog(String[][] tags, String senderName, Collection<? extends OsmPrimitive> primitives) { … … 260 263 * parse addtags parameters Example URL (part): 261 264 * addtags=wikipedia:de%3DResidenzschloss Dresden|name:en%3DDresden Castle 265 * @param args request arguments 266 * @param sender is a string for skipping confirmations. Use empty string for always confirmed adding. 267 * @param primitives OSM objects that will be modified 262 268 */ 263 269 public static void addTags(final Map<String, String> args, final String sender, final Collection<? extends OsmPrimitive> primitives) { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r9078 r9231 301 301 * @param out 302 302 * The writer where the error is written 303 * @param help 304 * Optional HTML help content to display, can be null 303 305 * @throws IOException 304 306 * If the error can not be written … … 323 325 * @param out 324 326 * The writer where the error is written 327 * @param help 328 * Optional HTML help content to display, can be null 325 329 * @throws IOException 326 330 * If the error can not be written -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r8929 r9231 122 122 * Find the node with almost the same coords in dataset or in already added nodes 123 123 * @param ll coordinates 124 * @param commands list of commands that will be modified if needed 124 125 * @return node with almost the same coords 125 126 * @since 5845 126 127 */ 127 Node findOrCreateNode(LatLon ll, List<Command> commands) {128 Node findOrCreateNode(LatLon ll, List<Command> commands) { 128 129 Node nd = null; 129 130 -
trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
r9087 r9231 145 145 * Add a task, e.g. a message dialog, that should 146 146 * be executed in EDT after all layers have been added. 147 * @param task task to run in EDT 147 148 */ 148 149 public void addPostLayersTask(Runnable task) { -
trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
r9078 r9231 65 65 * 66 66 * The exporter class must have a one-argument constructor with layerClass as formal parameter type. 67 * @param layerClass layer class 68 * @param exporter exporter for this layer class 67 69 */ 68 70 public static void registerSessionLayerExporter(Class<? extends Layer> layerClass, Class<? extends SessionLayerExporter> exporter) { … … 95 97 * @param active The index of active layer in {@code layers} (starts at 0). Ignored if set to -1 96 98 * @param exporters The exporters to use to save layers 99 * @param dependencies layer dependencies 97 100 * @param zip {@code true} if a joz archive has to be created, {@code false otherwise} 98 101 * @since 6271
Note:
See TracChangeset
for help on using the changeset viewer.
