Author: tfmorris
Date: 2007-06-08 00:50:27-0700
New Revision: 12783
Modified:
trunk/src/model/src/org/argouml/model/Model.java
trunk/src/model/src/org/argouml/model/ModelImplementation.java
trunk/src/model/src/org/argouml/model/XmiReader.java
Log:
Issue 4777 - Refactor XMI writer
Modified: trunk/src/model/src/org/argouml/model/Model.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/Model.java?view=diff&rev=12783&p1=trunk/src/model/src/org/argouml/model/Model.java&p2=trunk/src/model/src/org/argouml/model/Model.java&r1=12782&r2=12783
==============================================================================
--- trunk/src/model/src/org/argouml/model/Model.java (original)
+++ trunk/src/model/src/org/argouml/model/Model.java 2007-06-08 00:50:27-0700
@@ -24,6 +24,7 @@
package org.argouml.model;
+import java.io.OutputStream;
import java.io.Writer;
@@ -463,11 +464,31 @@
* @return the object implementing the XmiWriter interface
* @throws UmlException
* on any error while writing
+ * @deprecated for 0.25.4 by tfmorris. Use
+ * {@link #getXmiWriter(Object, OutputStream, String)}.
*/
public static XmiWriter getXmiWriter(Object model, Writer writer,
String version) throws UmlException {
return impl.getXmiWriter(model, writer, version);
}
+
+ /**
+ * Get the XmiWriter object.
+ *
+ * @param model
+ * the project member model
+ * @param writer
+ * the writer
+ * @param version
+ * string to be written into file header as XMI writer version
+ * @return the object implementing the XmiWriter interface
+ * @throws UmlException
+ * on any error while writing
+ */
+ public static XmiWriter getXmiWriter(Object model, OutputStream stream,
+ String version) throws UmlException {
+ return impl.getXmiWriter(model, stream, version);
+ }
/**
* @return <code>true</code> if the Model subsystem is correctly initiated.
Modified: trunk/src/model/src/org/argouml/model/ModelImplementation.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/ModelImplementation.java?view=diff&rev=12783&p1=trunk/src/model/src/org/argouml/model/ModelImplementation.java&p2=trunk/src/model/src/org/argouml/model/ModelImplementation.java&r1=12782&r2=12783
==============================================================================
--- trunk/src/model/src/org/argouml/model/ModelImplementation.java (original)
+++ trunk/src/model/src/org/argouml/model/ModelImplementation.java 2007-06-08 00:50:27-0700
@@ -24,6 +24,7 @@
package org.argouml.model;
+import java.io.OutputStream;
import java.io.Writer;
@@ -282,11 +283,30 @@
* @return the object implementing the XmiWriter interface
* @throws UmlException
* on any error while writing
+ * @deprecated for 0.25.4 by tfmorris. Use
+ * {@link #getXmiWriter(Object, OutputStream, String)}
*/
XmiWriter getXmiWriter(Object model, Writer writer, String version)
throws UmlException;
/**
+ * A factory method that creates a new instance of an XmiWriter on each
+ * call.
+ *
+ * @param model
+ * the project member model
+ * @param stream the output stream to write to
+ * @param version
+ * the version of ArgoUML which may be written to the output
+ * to help identify who wrote it
+ * @return the object implementing the XmiWriter interface
+ * @throws UmlException
+ * on any error while writing
+ */
+ XmiWriter getXmiWriter(Object model, OutputStream stream, String version)
+ throws UmlException;
+
+ /**
* Get the copy helper.
*
* @return the CopyHelper
Modified: trunk/src/model/src/org/argouml/model/XmiReader.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/XmiReader.java?view=diff&rev=12783&p1=trunk/src/model/src/org/argouml/model/XmiReader.java&p2=trunk/src/model/src/org/argouml/model/XmiReader.java&r1=12782&r2=12783
==============================================================================
--- trunk/src/model/src/org/argouml/model/XmiReader.java (original)
+++ trunk/src/model/src/org/argouml/model/XmiReader.java 2007-06-08 00:50:27-0700
@@ -47,6 +47,8 @@
* @param pIs the input source for parsing
* @return a collection of top level elements
* @throws UmlException on any error
+ * @deprecated for 0.25.4 by tfmorris. Use
+ * {@link #parse(InputSource, boolean)}.
*/
Collection parse(InputSource pIs) throws UmlException;
@@ -62,6 +64,7 @@
* @return a collection of top level elements
* @throws UmlException
* on any error
+ * @since 0.22
*/
Collection parse(InputSource pIs, boolean profile) throws UmlException;
@@ -98,4 +101,11 @@
* @return the count
*/
public int getIgnoredElementCount();
+
+ /**
+ * Return the name of the outermost tag in the XMI file.
+ *
+ * @return the tag name
+ */
+ public String getTagName();
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.