Ignore:
Timestamp:
2016-01-01T02:35:34+01:00 (4 years ago)
Author:
Don-vip
Message:

javadoc update

Location:
trunk/src/org/openstreetmap/josm/io
Files:
17 edited

Legend:

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

    r8929 r9231  
    1919import org.openstreetmap.josm.gui.util.GuiHelper;
    2020
     21/**
     22 * Abstract file importer.
     23 * @since 1637
     24 */
    2125public abstract class FileImporter implements Comparable<FileImporter>, LayerChangeListener {
    2226
     
    7781
    7882    /**
    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
    8086     * @return true if data import was successful
    8187     */
     
    121127    }
    122128
     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     */
    123135    public boolean importDataHandleExceptions(List<File> files, ProgressMonitor progressMonitor) {
    124136        try {
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r8870 r9231  
    248248    /**
    249249     * 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
    250262     */
    251263    private static void addDependencies(
  • trunk/src/org/openstreetmap/josm/io/GpxReader.java

    r9078 r9231  
    499499        /**
    500500         * convert url/urlname to link element (GPX 1.0 -&gt; GPX 1.1).
     501         * @param attr attributes
    501502         */
    502503        private void convertUrlToLink(Map<String, Object> attr) {
     
    509510                GpxLink link = new GpxLink(url);
    510511                link.text = urlname;
    511                 @SuppressWarnings({ "unchecked", "rawtypes" })
     512                @SuppressWarnings("unchecked")
    512513                Collection<GpxLink> links = (Collection<GpxLink>) attr.get(META_LINKS);
    513514                links.add(link);
     
    531532     * @throws IOException if an IO error occurs, e.g. the input stream is closed.
    532533     */
    533     @SuppressWarnings("resource")
    534534    public GpxReader(InputStream source) throws IOException {
    535535        Reader utf8stream = UTFInputStreamReader.create(source);
  • trunk/src/org/openstreetmap/josm/io/GpxWriter.java

    r8846 r9231  
    248248     * if content not null, open tag, write encoded content, and close tag
    249249     * else do nothing.
     250     * @param tag GPX tag
     251     * @param content content
    250252     */
    251253    private void simpleTag(String tag, String content) {
     
    260262    /**
    261263     * output link
     264     * @param link link
    262265     */
    263266    private void gpxLink(GpxLink link) {
     
    272275    /**
    273276     * 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}
    274279     */
    275280    private void wayPoint(WayPoint pnt, int mode) {
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r9078 r9231  
    299299     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
    300300     * {@link OsmPrimitiveType#RELATION RELATION}
     301     * @param progressMonitor progress monitor
    301302     * @throws OsmTransferException if an error occurs while communicating with the API server
    302303     */
     
    485486         * {@link OsmPrimitiveType#RELATION RELATION}
    486487         * @param pkg the package of ids
     488         * @param progressMonitor progress monitor
    487489         * @return the {@link FetchResult} of this operation
    488490         * @throws OsmTransferException if an error occurs while communicating with the API server
     
    513515         * {@link OsmPrimitiveType#RELATION RELATION}
    514516         * @param id the id
     517         * @param progressMonitor progress monitor
    515518         * @return the {@link DataSet} resulting of this operation
    516519         * @throws OsmTransferException if an error occurs while communicating with the API server
     
    544547         * {@link OsmPrimitiveType#RELATION RELATION}
    545548         * @param pkg the set of ids
     549         * @param progressMonitor progress monitor
    546550         * @return the {@link FetchResult} of this operation
    547551         * @throws OsmTransferException if an error occurs while communicating with the API server
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r9087 r9231  
    5757    private static volatile List<OsmServerReadPostprocessor> postprocessors;
    5858
    59     /** register a new postprocessor */
     59    /** Register a new postprocessor.
     60     * @param pp postprocessor
     61     * @see #deregisterPostprocessor
     62     */
    6063    public static void registerPostprocessor(OsmServerReadPostprocessor pp) {
    6164        if (postprocessors == null) {
     
    6568    }
    6669
    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     */
    6875    public static void deregisterPostprocessor(OsmServerReadPostprocessor pp) {
    6976        if (postprocessors != null) {
     
    399406     * This is basically the same code as parseUnknown(), except for the warnings, which
    400407     * 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
    401409     * @throws XMLStreamException if there is an error processing the underlying XML source
    402410     */
     
    432440    /**
    433441     * Read out the common attributes and put them into current OsmPrimitive.
     442     * @param current primitive to update
    434443     * @throws XMLStreamException if there is an error processing the underlying XML source
    435444     */
  • trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java

    r8510 r9231  
    148148     * Reads referring ways from the API server and replies them in a {@link DataSet}
    149149     *
     150     * @param progressMonitor progress monitor
    150151     * @return the data set
    151152     * @throws OsmTransferException if any error occurs during dialog with OSM API
  • trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java

    r9078 r9231  
    5050    /**
    5151     * Fetches the history from the OSM API and parses it
     52     * @param progressMonitor progress monitor
    5253     *
    5354     * @return the data set with the parsed history data
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r9078 r9231  
    256256    /**
    257257     * Calls all registered upload postprocessors.
     258     * @param pm progress monitor
    258259     */
    259260    public void executePostprocessors(ProgressMonitor pm) {
  • trunk/src/org/openstreetmap/josm/io/OsmWriter.java

    r9078 r9231  
    4646
    4747    /**
    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)
    4952     */
    5053    protected OsmWriter(PrintWriter out, boolean osmConform, String version) {
     
    279282     * Add the common part as the form of the tag as well as the XML attributes
    280283     * id, action, user, and visible.
     284     * @param osm osm primitive
     285     * @param tagname XML tag matching osm primitive (node, way, relation)
    281286     */
    282287    protected void addCommon(IPrimitive osm, String tagname) {
  • trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java

    r8926 r9231  
    1515    /**
    1616     * Creates a new {@link InputStreamReader} from the {@link InputStream} with UTF-8 as default encoding.
     17     * @param input input stream
    1718     * @return A reader with the correct encoding. Starts to read after the BOM.
    1819     * @throws IOException if any I/O error occurs
     
    2526    /**
    2627     * Creates a new {@link InputStreamReader} from the {@link InputStream}.
     28     * @param input input stream
    2729     * @param defaultEncoding Used, when no BOM was recognized. Can be null.
    2830     * @return A reader with the correct encoding. Starts to read after the BOM.
  • trunk/src/org/openstreetmap/josm/io/XmlWriter.java

    r8929 r9231  
    1717    protected final PrintWriter out;
    1818
     19    /**
     20     * Constructs a new {@code XmlWriter}.
     21     * @param out print writer
     22     */
    1923    public XmlWriter(PrintWriter out) {
    2024        this.out = out;
     
    3034    }
    3135
     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     */
    3243    public static String encode(String unencoded) {
    3344        return encode(unencoded, false);
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r9078 r9231  
    119119    /**
    120120     * 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
    121124     */
    122125    public AddTagsDialog(String[][] tags, String senderName, Collection<? extends OsmPrimitive> primitives) {
     
    260263     * parse addtags parameters Example URL (part):
    261264     * 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
    262268     */
    263269    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  
    301301     * @param out
    302302     *            The writer where the error is written
     303     * @param help
     304     *            Optional HTML help content to display, can be null
    303305     * @throws IOException
    304306     *             If the error can not be written
     
    323325     * @param out
    324326     *            The writer where the error is written
     327     * @param help
     328     *            Optional HTML help content to display, can be null
    325329     * @throws IOException
    326330     *             If the error can not be written
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java

    r8929 r9231  
    122122     * Find the node with almost the same coords in dataset or in already added nodes
    123123     * @param ll coordinates
     124     * @param commands list of commands that will be modified if needed
    124125     * @return node with almost the same coords
    125126     * @since 5845
    126127     */
    127     Node findOrCreateNode(LatLon ll,  List<Command> commands) {
     128    Node findOrCreateNode(LatLon ll, List<Command> commands) {
    128129        Node nd = null;
    129130
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

    r9087 r9231  
    145145         * Add a task, e.g. a message dialog, that should
    146146         * be executed in EDT after all layers have been added.
     147         * @param task task to run in EDT
    147148         */
    148149        public void addPostLayersTask(Runnable task) {
  • trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java

    r9078 r9231  
    6565     *
    6666     * 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
    6769     */
    6870    public static void registerSessionLayerExporter(Class<? extends Layer> layerClass, Class<? extends SessionLayerExporter> exporter) {
     
    9597     * @param active The index of active layer in {@code layers} (starts at 0). Ignored if set to -1
    9698     * @param exporters The exporters to use to save layers
     99     * @param dependencies layer dependencies
    97100     * @param zip {@code true} if a joz archive has to be created, {@code false otherwise}
    98101     * @since 6271
Note: See TracChangeset for help on using the changeset viewer.