Package org.openstreetmap.josm.io
Class OsmWriterFactory
- java.lang.Object
-
- org.openstreetmap.josm.io.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.
-
-
Field Summary
Fields Modifier and Type Field Description private static OsmWriterFactory
theFactory
-
Constructor Summary
Constructors Constructor Description OsmWriterFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OsmWriter
createOsmWriter(java.io.PrintWriter out, boolean osmConform, java.lang.String version)
Creates newOsmWriter
.protected OsmWriter
createOsmWriterImpl(java.io.PrintWriter out, boolean osmConform, java.lang.String version)
Creates newOsmWriter
.static void
setDefaultFactory(OsmWriterFactory factory)
Sets the default factory.
-
-
-
Field Detail
-
theFactory
private static volatile OsmWriterFactory theFactory
-
-
Constructor Detail
-
OsmWriterFactory
public OsmWriterFactory()
-
-
Method Detail
-
createOsmWriter
public static OsmWriter createOsmWriter(java.io.PrintWriter out, boolean osmConform, java.lang.String version)
Creates newOsmWriter
.- Parameters:
out
- print writerosmConform
- iftrue
, prevents modification attributes to be written to the common partversion
- 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 newOsmWriter
.- Parameters:
out
- print writerosmConform
- iftrue
, prevents modification attributes to be written to the common partversion
- OSM API version (0.6)- Returns:
- new
OsmWriter
-
-