/** * Creates a new instance. * * @param file * The file to write. * @param compressionMethod * Specifies the compression method to employ. */ public XmlWriter(File file, CompressionMethod compressionMethod) { super(file, compressionMethod); osmWriter = new OsmWriter("osm", 0, true, false); }
/** * Creates a new instance. * * @param writer * The writer to send all data to. */ public XmlWriter(BufferedWriter writer) { super(writer); osmWriter = new OsmWriter("osm", 0, true, false); }
/** * Creates a new instance. * * @param file * The file to write. * @param compressionMethod * Specifies the compression method to employ. */ public XmlWriter(File file, CompressionMethod compressionMethod) { super(file, compressionMethod); osmWriter = new OsmWriter("osm", 0, true, false); }
/** * Creates a new instance. * * @param writer * The writer to send all data to. */ public XmlWriter(BufferedWriter writer) { super(writer); osmWriter = new OsmWriter("osm", 0, true, false); }
/** * Creates a new instance. * * @param elementName * The name of the element to be written. * @param indentLevel * The indent level of the element. */ public OsmChangeWriter(final String elementName, final int indentLevel) { super(elementName, indentLevel); osmCreateWriter = new OsmWriter("create", indentLevel + 1, false, false); osmModifyWriter = new OsmWriter("modify", indentLevel + 1, false, false); osmDeleteWriter = new OsmWriter("delete", indentLevel + 1, false, false); activeOsmWriter = null; lastAction = null; }
/** * Creates a new instance. * * @param file * The file to write. * @param compressionMethod * Specifies the compression method to employ. * @param legacyBound * If true, write the legacy {@literal <bound>} element * instead of the correct {@literal <bounds>} one. */ public XmlWriter(File file, CompressionMethod compressionMethod, boolean legacyBound) { super(file, compressionMethod); osmWriter = new OsmWriter("osm", 0, true, legacyBound); }
/** * Creates a new instance. * * @param file * The file to write. * @param compressionMethod * Specifies the compression method to employ. * @param legacyBound * If true, write the legacy {@literal <bound>} element * instead of the correct {@literal <bounds>} one. */ public XmlWriter(File file, CompressionMethod compressionMethod, boolean legacyBound) { super(file, compressionMethod); osmWriter = new OsmWriter("osm", 0, true, legacyBound); }
/** * Creates a new instance. * * @param elementName * The name of the element to be written. * @param indentLevel * The indent level of the element. */ public OsmChangeWriter(final String elementName, final int indentLevel) { super(elementName, indentLevel); osmCreateWriter = new OsmWriter("create", indentLevel + 1, false, false); osmModifyWriter = new OsmWriter("modify", indentLevel + 1, false, false); osmDeleteWriter = new OsmWriter("delete", indentLevel + 1, false, false); activeOsmWriter = null; lastAction = null; }
/** * Performs pre-test activities. */ @Before public void setUp() { testWriter = new StringWriter(); testBufferedWriter = new BufferedWriter(testWriter); testOsmWriter = new OsmWriter("osm", 0, true, true); testOsmWriter.setWriter(testBufferedWriter); }