be.ac.vub.cocompose.io.xmi
Class XMIModelWriter

java.lang.Object
  extended bybe.ac.vub.cocompose.io.FileModelWriter
      extended bybe.ac.vub.cocompose.io.xmi.XMIModelWriter
All Implemented Interfaces:
ModelWriter

public class XMIModelWriter
extends FileModelWriter

Writes the model to an XMI file.

Since:
0.2.0
Version:
0.2.0, 09/01/2004
Author:
Dennis Wagelaar

Constructor Summary
XMIModelWriter()
          Constructs an XMIModelWriter.
 
Method Summary
 ModelVisitor getStacked()
          Gets the stacked visitor for the contained visitors.
 ContentHandler getXmlWriter()
          Gets the xml writer.
 void setStacked(ModelVisitor stacked)
          Sets a stacked visitor for the contained visitors.
 void setXmlWriter(ContentHandler xmlWriter)
          Sets the xml writer.
 void write(Model model)
          Writes the model to its URI.
 void writeXMI(Model model)
          Writes the XMI representation of the given model to the xml writer.
 
Methods inherited from class be.ac.vub.cocompose.io.FileModelWriter
getOutputStream, getStreamWriter, setStreamWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMIModelWriter

public XMIModelWriter()
Constructs an XMIModelWriter.

Method Detail

write

public void write(Model model)
           throws IOException,
                  ModelElementException
Writes the model to its URI.

Specified by:
write in interface ModelWriter
Overrides:
write in class FileModelWriter
Parameters:
model - - the model to write.
Throws:
IOException - - if the model could not be written.
ModelElementException - - if a model element could not be written.

getXmlWriter

public ContentHandler getXmlWriter()
Gets the xml writer.

Returns:
the xml writer.

setXmlWriter

public void setXmlWriter(ContentHandler xmlWriter)
Sets the xml writer.

Parameters:
xmlWriter - - the xml writer.

writeXMI

public void writeXMI(Model model)
              throws IOException,
                     ModelElementException
Writes the XMI representation of the given model to the xml writer.

Parameters:
model - - the model to write.
Throws:
IOException - - if the model could not be written.
ModelElementException - - if a model element could not be written.

getStacked

public ModelVisitor getStacked()
Gets the stacked visitor for the contained visitors.

Returns:
the stacked visitor.

setStacked

public void setStacked(ModelVisitor stacked)
Sets a stacked visitor for the contained visitors.

Parameters:
stacked - - the stacked visitor.