Class OsmWriterFactory


  • public class OsmWriterFactory
    extends java.lang.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.
    • Method Detail

      • createOsmWriter

        public static OsmWriter createOsmWriter​(java.io.PrintWriter out,
                                                boolean osmConform,
                                                java.lang.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​(java.io.PrintWriter out,
                                                boolean osmConform,
                                                java.lang.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