Class SaxUnmarshaller
java.lang.Object
org.exolab.castor.xml.schema.reader.SaxUnmarshaller
- All Implemented Interfaces:
DocumentHandler
,ErrorHandler
The base class for unmarshallers
- Version:
- $Revision$ $Date: 2006-04-14 04:14:43 -0600 (Fri, 14 Apr 2006) $
- Author:
- Keith Visco
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) abstract String
Returns the name of the element that this SaxUnmarshaller handlesvoid
void
endElement
(String name) void
This method is called for a general error.void
error
(SAXParseException exception) void
fatalError
(SAXParseException exception) void
finish()
Called to signal an end of unmarshalling.abstract Object
Returns the Object created by this UnmarshallerReturns the resolver used for resolving id references.void
ignorableWhitespace
(char[] ch, int start, int length) void
illegalAttribute
(String attName) This method is called when an illegal Attribute is encountered.void
illegalElement
(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 charactersvoid
outOfOrder
(String name) This method is called when an out of order element is encounteredvoid
processingInstruction
(String target, String data) void
redefinedElement
(String name) This method is called when an element which may only be defined once, is redefined.void
redefinedElement
(String name, String xtraInfo) This method is called when an element which may only be defined once, is redefined.void
setDocumentLocator
(Locator locator) void
setResolver
(Resolver resolver) Sets the Resolver to be used for resolving id referencesvoid
void
startElement
(String name, AttributeList atts) static int
Converts the given String to an intvoid
warning
(SAXParseException exception)
-
Field Details
-
_locator
The document locator
-
-
Constructor Details
-
SaxUnmarshaller
public SaxUnmarshaller()
-
-
Method Details
-
elementName
Returns the name of the element that this SaxUnmarshaller handles- Returns:
- the name of the element that this SaxUnmarshaller handles
-
getObject
Returns the Object created by this Unmarshaller- Returns:
- the Object created by this Unmarshaller
-
finish
Called to signal an end of unmarshalling. This method should be overridden to perform any necessary clean up by an unmarshaller- Throws:
SAXException
-
getDocumentLocator
-
getResolver
Returns the resolver used for resolving id references.- Returns:
- the resolver used for resolving id references.
-
setResolver
Sets the Resolver to be used for resolving id references- Parameters:
resolver
- the Resolver to be used for resolving id references
-
isWhiteSpace
public static boolean isWhiteSpace(char[] chars, int start, int length) Determines if the given sequence of characters consists of whitespace characters- Parameters:
chars
- an array of characters to check for whitespacestart
- the start index into the character arraylength
- the number of characters to check- Returns:
- true if the characters specficied consist only of whitespace characters
-
error
This method is called for a general error.- Parameters:
err
- the error message to report- Throws:
SAXException
- always thrown.
-
illegalAttribute
This method is called when an illegal Attribute is encountered.- Parameters:
attName
- the name of the illegal attribute.- Throws:
SAXException
- always thrown.
-
illegalElement
This method is called when an illegal Element is encountered.- Parameters:
name
- the name of the illegal element- Throws:
SAXException
- always thrown.
-
redefinedElement
This method is called when an element which may only be defined once, is redefined.- Parameters:
name
- the name of the element- Throws:
SAXException
- always thrown.
-
redefinedElement
This method is called when an element which may only be defined once, is redefined.- Parameters:
name
- the name of the element- Throws:
SAXException
- always thrown.
-
outOfOrder
This method is called when an out of order element is encountered- Throws:
SAXException
- always thrown.
-
toInt
Converts the given String to an int- Parameters:
str
- the String to convert to an int- Returns:
- the int derived from the given String
- Throws:
IllegalArgumentException
- when the given String does not represent a valid int
-
characters
- Specified by:
characters
in interfaceDocumentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceDocumentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceDocumentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceDocumentHandler
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceDocumentHandler
-
startDocument
- Specified by:
startDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
startElement
- Specified by:
startElement
in interfaceDocumentHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-