Class OsmWriterFactory

java.lang.Object
org.openstreetmap.josm.io.OsmWriterFactory

public class OsmWriterFactory extends Object
This factory is called by everyone who needs an OsmWriter object, instead of directly calling the OsmWriter constructor. This enables plugins to substitute the original OsmWriter with their own version, altering the way JOSM writes objects to the server, and to disk.
  • Field Details

  • Constructor Details

  • Method Details

    • createOsmWriter

      public static OsmWriter createOsmWriter(PrintWriter out, boolean osmConform, String version)
      Creates new OsmWriter.
      Parameters:
      out - print writer
      osmConform - if true, prevents modification attributes to be written to the common part
      version - OSM API version (0.6)
      Returns:
      new OsmWriter
    • setDefaultFactory

      public static void setDefaultFactory(OsmWriterFactory factory)
      Sets the default factory.
      Parameters:
      factory - new default factory
      Since:
      11851
    • createOsmWriterImpl

      protected OsmWriter createOsmWriterImpl(PrintWriter out, boolean osmConform, String version)
      Creates new OsmWriter.
      Parameters:
      out - print writer
      osmConform - if true, prevents modification attributes to be written to the common part
      version - OSM API version (0.6)
      Returns:
      new OsmWriter