org.xml.sax.DocumentHandler
, org.xml.sax.ErrorHandler
public abstract class SaxUnmarshaller
extends java.lang.Object
implements org.xml.sax.DocumentHandler, org.xml.sax.ErrorHandler
Modifier and Type | Field | Description |
---|---|---|
protected org.xml.sax.Locator |
_locator |
The document locator
|
Constructor | Description |
---|---|
SaxUnmarshaller() |
Modifier and Type | Method | Description |
---|---|---|
void |
characters(char[] ch,
int start,
int length) |
|
abstract java.lang.String |
elementName() |
Returns the name of the element that this SaxUnmarshaller
handles
|
void |
endDocument() |
|
void |
endElement(java.lang.String name) |
|
void |
error(java.lang.String err) |
This method is called for a general error.
|
void |
error(org.xml.sax.SAXParseException exception) |
|
void |
fatalError(org.xml.sax.SAXParseException exception) |
|
void |
finish() |
Called to signal an end of unmarshalling.
|
org.xml.sax.Locator |
getDocumentLocator() |
|
abstract java.lang.Object |
getObject() |
Returns the Object created by this Unmarshaller
|
Resolver |
getResolver() |
Returns the resolver used for resolving id references.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
|
void |
illegalAttribute(java.lang.String attName) |
This method is called when an illegal Attribute is encountered.
|
void |
illegalElement(java.lang.String name) |
This method is called when an illegal Element is encountered.
|
static boolean |
isWhiteSpace(char[] chars,
int start,
int length) |
Determines if the given sequence of characters consists
of whitespace characters
|
void |
outOfOrder(java.lang.String name) |
This method is called when an out of order element is encountered
|
void |
processingInstruction(java.lang.String target,
java.lang.String data) |
|
void |
redefinedElement(java.lang.String name) |
This method is called when an element which may only
be defined once, is redefined.
|
void |
redefinedElement(java.lang.String name,
java.lang.String xtraInfo) |
This method is called when an element which may only
be defined once, is redefined.
|
void |
setDocumentLocator(org.xml.sax.Locator locator) |
|
void |
setResolver(Resolver resolver) |
Sets the Resolver to be used for resolving id references
|
void |
startDocument() |
|
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList atts) |
|
static int |
toInt(java.lang.String str) |
Converts the given String to an int
|
void |
warning(org.xml.sax.SAXParseException exception) |
public abstract java.lang.String elementName()
public abstract java.lang.Object getObject()
public void finish() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public org.xml.sax.Locator getDocumentLocator()
public Resolver getResolver()
public void setResolver(Resolver resolver)
resolver
- the Resolver to be used for resolving
id referencespublic static boolean isWhiteSpace(char[] chars, int start, int length)
chars
- an array of characters to check for whitespacestart
- the start index into the character arraylength
- the number of characters to checkpublic void error(java.lang.String err) throws org.xml.sax.SAXException
err
- the error message to reportorg.xml.sax.SAXException
- always thrown.public void illegalAttribute(java.lang.String attName) throws org.xml.sax.SAXException
attName
- the name of the illegal attribute.org.xml.sax.SAXException
- always thrown.public void illegalElement(java.lang.String name) throws org.xml.sax.SAXException
name
- the name of the illegal elementorg.xml.sax.SAXException
- always thrown.public void redefinedElement(java.lang.String name) throws org.xml.sax.SAXException
name
- the name of the elementorg.xml.sax.SAXException
- always thrown.public void redefinedElement(java.lang.String name, java.lang.String xtraInfo) throws org.xml.sax.SAXException
name
- the name of the elementorg.xml.sax.SAXException
- always thrown.public void outOfOrder(java.lang.String name) throws org.xml.sax.SAXException
org.xml.sax.SAXException
- always thrown.public static int toInt(java.lang.String str) throws java.lang.IllegalArgumentException
str
- the String to convert to an intjava.lang.IllegalArgumentException
- when the given
String does not represent a valid intpublic void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void endElement(java.lang.String name) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.DocumentHandler
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void startElement(java.lang.String name, org.xml.sax.AttributeList atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void error(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public void warning(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com