|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.metamatrix.common.xml.xmi.XMIContentHandler
public class XMIContentHandler
Nested Class Summary | |
---|---|
protected class |
XMIContentHandler.BodyHandler
Inner class to handle the XMI Body |
Field Summary | |
---|---|
protected XMIContentHandler.BodyHandler |
bodyHandler
|
static java.lang.String |
HREF
|
static java.lang.String |
NAME
|
static java.lang.String |
XMI_CONTENT
|
static java.lang.String |
XMI_CONTENT_HANDLER
|
static java.lang.String |
XMI_ID
|
static java.lang.String |
XMI_ID_REF
|
static java.lang.String |
XMI_LABEL
|
static java.lang.String |
XMI_UUID
|
Constructor Summary | |
---|---|
XMIContentHandler(XMIReaderAdapter adapter)
Constructor: initializes two inner classes |
Method Summary | |
---|---|
void |
characters(char[] characters,
int start,
int length)
Called by the SAXParser when it encounters character data while processing an element. |
void |
endDocument()
Called by the SAXParser when it reaches the end of the Document |
void |
endElement(java.lang.String uri,
java.lang.String name,
java.lang.String qName)
Called by the SAXParser when it reaches an end Element tag |
void |
ignorableWhitespace(char[] characters,
int start,
int length)
Capture ignorable whitespace as text. |
static void |
read(java.io.InputStream stream,
MessageList messages,
XMIReaderAdapter adapter,
boolean closeStream)
Utility method to use SAX and this ContentHandler to read in XMI from the specified stream. |
void |
setXMIHeader(XMIHeader header)
Method to set the XMIHeader attribute. |
void |
startDocument()
Called by the SAXParser when it starts processing the Document |
void |
startElement(java.lang.String uri,
java.lang.String name,
java.lang.String qName,
org.xml.sax.Attributes atts)
Called by the SAXParser when it reaches an start Element tag |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XMI_CONTENT_HANDLER
public static final java.lang.String XMI_UUID
public static final java.lang.String XMI_ID
public static final java.lang.String NAME
public static final java.lang.String HREF
public static final java.lang.String XMI_LABEL
public static final java.lang.String XMI_ID_REF
public static final java.lang.String XMI_CONTENT
protected XMIContentHandler.BodyHandler bodyHandler
Constructor Detail |
---|
public XMIContentHandler(XMIReaderAdapter adapter)
Method Detail |
---|
public void setXMIHeader(XMIHeader header)
XMIHeader
- header, the XMIHeaderpublic void characters(char[] characters, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
ch
- The characters.start
- The start position in the character array.length
- The number of characters to use from the
character array.
org.xml.sax.SAXException
- Any SAX exception, possibly
wrapping another exception.public void ignorableWhitespace(char[] characters, int start, int length) throws org.xml.sax.SAXException
Capture ignorable whitespace as text. If setIgnoringElementContentWhitespace(true) has been called then this method does nothing.
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
ch
- []
- char array of ignorable whitespacestart
- int
- starting position within arraylength
- int
- length of whitespace after start
org.xml.sax.SAXException
- when things go wrongpublic void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(java.lang.String uri, java.lang.String name, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
String
- uri of the elementString
- name of the elementString
- qName of the element
org.xml.sax.SAXException
public void startElement(java.lang.String uri, java.lang.String name, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
String
- uri of the elementString
- name of the elementString
- qName of the elementAttributes
- atts of the elements
org.xml.sax.SAXException
public static void read(java.io.InputStream stream, MessageList messages, XMIReaderAdapter adapter, boolean closeStream) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |