@Test public void testWriteDocumentString() { String filename = "unittest-writedocumentstring.xmi"; File file = new File(filename); assertFalse(file.exists()); XmiWriter.writeDocument(model, modelIndex, filename); assertTrue(file.exists()); file.deleteOnExit(); }
public static final void writeDocument(final Model model, final ModelIndex mapper, final OutputStream outstream) { final XMLOutputFactory xof = XMLOutputFactory.newInstance(); try { final XMLStreamWriter xsw = new IndentingXMLStreamWriter(xof.createXMLStreamWriter(outstream, "UTF-8")); xsw.writeStartDocument("UTF-8", "1.0"); try { XmiWriter.writeXMI(model, mapper, xsw); } finally { xsw.writeEndDocument(); } xsw.flush(); } catch (final XMLStreamException e) { throw new XmiRuntimeException(e); } }
XmiWriter { public static final void writeDocument(final Model model, final ModelIndex mapper, final OutputStream outstream) { final XMLOutputFactory xof = XMLOutputFactory.newInstance(); try { final XMLStreamWriter xsw = new IndentingXMLStreamWriter(xof.createXMLStreamWriter(outstream, "UTF-8")); xsw.writeStartDocument("UTF-8", "1.0"); try { XmiWriter.writeXMI(model, mapper, xsw); } finally { xsw.writeEndDocument(); } xsw.flush(); } catch (final XMLStreamException e) { throw new XmiRuntimeException(e); } } }
XmiWriter { public static final void writeDocument(final Model model, final ModelIndex mapper, final OutputStream outstream) { final XMLOutputFactory xof = XMLOutputFactory.newInstance(); try { final XMLStreamWriter xsw = new IndentingXMLStreamWriter(xof.createXMLStreamWriter(outstream, "UTF-8")); xsw.writeStartDocument("UTF-8", "1.0"); try { XmiWriter.writeXMI(model, mapper, xsw); } finally { xsw.writeEndDocument(); } xsw.flush(); } catch (final XMLStreamException e) { throw new XmiRuntimeException(e); } }  }
XmiWriter { public static final void writeDocument(final Model model, final ModelIndex mapper, final OutputStream outstream) { final XMLOutputFactory xof = XMLOutputFactory.newInstance(); try { final XMLStreamWriter xsw = new IndentingXMLStreamWriter(xof.createXMLStreamWriter(outstream, "UTF-8")); xsw.writeStartDocument("UTF-8", "1.0"); try { XmiWriter.writeXMI(model, mapper, xsw); } finally { xsw.writeEndDocument(); } xsw.flush(); } catch (final XMLStreamException e) { throw new XmiRuntimeException(e); } }  static final void writeDocument(final Model model, final ModelIndex mapper, final OutputStream outstream); static final void writeDocument(final Model model, final ModelIndex mapper, final String fileName); static final void writeDocument(final Model model, final ModelIndex mapper, final File file); }
XmiWriter { public static final void writeDocument(final Model model, final ModelIndex mapper, final OutputStream outstream) { final XMLOutputFactory xof = XMLOutputFactory.newInstance(); try { final XMLStreamWriter xsw = new IndentingXMLStreamWriter(xof.createXMLStreamWriter(outstream, "UTF-8")); xsw.writeStartDocument("UTF-8", "1.0"); try { XmiWriter.writeXMI(model, mapper, xsw); } finally { xsw.writeEndDocument(); } xsw.flush(); } catch (final XMLStreamException e) { throw new XmiRuntimeException(e); } }  static final void writeDocument(final Model model, final ModelIndex mapper, final OutputStream outstream); static final void writeDocument(final Model model, final ModelIndex mapper, final String fileName); static final void writeDocument(final Model model, final ModelIndex mapper, final File file);  }