org.argouml.xml.xmi
Class XMIReader

java.lang.Object
  |
  +--ru.novosoft.uml.xmi.XMIReader
        |
        +--org.argouml.xml.xmi.XMIReader

public class XMIReader
extends ru.novosoft.uml.xmi.XMIReader

Parses an XMI file. Extended from the NSUML XMIReader since this reader does not handle errorhandling very well and is not very well programmed at all. This led to issues loading xmi files and hanging ArgoUML by doing that.

See Also:
ru.novosoft.uml.xmi.XMIReader, Serialized Form

Constructor Summary
XMIReader()
          Constructor for XMIReader.
XMIReader(MFactory p_factory)
          Constructor for XMIReader.
 
Method Summary
 boolean getErrors()
           
 org.xml.sax.Parser getParser()
           
protected  void parseSourceStream(org.xml.sax.InputSource p_is)
          Parses an xmi inputsource.
 MModel parseToModel(org.xml.sax.InputSource p_is)
          Parses a given inputsource to a model.
 void setErrors(boolean errors)
           
 void setParser(org.xml.sax.Parser parser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMIReader

public XMIReader()
          throws org.xml.sax.SAXException,
                 javax.xml.parsers.ParserConfigurationException
Constructor for XMIReader.

Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException

XMIReader

public XMIReader(MFactory p_factory)
          throws org.xml.sax.SAXException,
                 javax.xml.parsers.ParserConfigurationException
Constructor for XMIReader.

Parameters:
p_factory -
Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
Method Detail

parseSourceStream

protected void parseSourceStream(org.xml.sax.InputSource p_is)
                          throws org.xml.sax.SAXException,
                                 java.io.IOException
Parses an xmi inputsource. Sets errors to true if an exception is thrown. Could not change the API from the superclass. Therefore this strange construction.

org.xml.sax.SAXException
java.io.IOException
See Also:
ru.novosoft.uml.xmi.XMIReader#parseStream(InputSource)

parseToModel

public MModel parseToModel(org.xml.sax.InputSource p_is)
                    throws org.xml.sax.SAXException,
                           java.io.IOException
Parses a given inputsource to a model. Does not override the novosoft parse method since that does not have the right signature.

Parameters:
p_is -
Returns:
MModel
Throws:
org.xml.sax.SAXException
java.io.IOException

setErrors

public void setErrors(boolean errors)

getErrors

public boolean getErrors()

setParser

public void setParser(org.xml.sax.Parser parser)

getParser

public org.xml.sax.Parser getParser()


ArgoUML © 1996-2003 (20040216)ArgoUML Project HomeArgoUML Cookbook