public abstract class IlpAbstractSAXHandler extends org.xml.sax.helpers.DefaultHandler
Constructor and Description |
---|
IlpAbstractSAXHandler() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Notifies the text in one element.
|
protected boolean |
checkState(int testState)
Check if the given state is present.
|
void |
clearContent()
Erases the current content.
|
protected void |
clearState()
Clear the state flag.
|
void |
error(SAXParseException ex)
Process the given SAX exception logging it as an error.
|
void |
fatalError(SAXParseException ex)
Process the given SAX exception logging it as a fatal error.
|
String |
getContent()
Returns the content of an element.
|
abstract Locator |
getLocator()
Returns the locator used by the handler.
|
abstract Logger |
getLogger()
Returns the logger used by the handler.
|
protected int |
getState() |
abstract XMLReader |
getXMLReader()
Returns the XMLReader used by the handler.
|
void |
ignoreUntil(String element,
String reason) |
protected void |
log(Level level,
String message,
Object[] parameters)
Logs a message with full location information.
|
protected void |
logIgnoreElement(String element,
String reason)
Logs information about an element being ignored.
|
protected void |
processSAXParseException(SAXParseException se,
Level level) |
protected void |
removeState(int oldState) |
protected void |
setState(int newState) |
protected void |
throwSAXParseException(String message)
Throws a
SAXParseException . |
void |
warning(SAXParseException ex)
Process the given SAX exception logging it as a warning.
|
endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl
protected int getState()
protected void setState(int newState)
newState
- New state valueprotected void removeState(int oldState)
oldState
- State to be removedprotected void clearState()
protected boolean checkState(int testState)
testState
- Statetrue
if state is presentpublic void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
SAXException
getContent()
public String getContent()
endElement
only.public void clearContent()
startElement
.public void warning(SAXParseException ex)
warning
in interface ErrorHandler
warning
in class org.xml.sax.helpers.DefaultHandler
ex
- Exceptionpublic void error(SAXParseException ex)
error
in interface ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
ex
- Exceptionpublic void fatalError(SAXParseException ex) throws SAXException
fatalError
in interface ErrorHandler
fatalError
in class org.xml.sax.helpers.DefaultHandler
ex
- ExceptionSAXException
protected void processSAXParseException(SAXParseException se, Level level)
protected void throwSAXParseException(String message) throws SAXParseException
SAXParseException
.
Note that the location information is correct only when invoking
the events in the SAX ContentHandler
interface. The
application should not attempt to use this information at any other time.
message
- The message to appear in the SAXParseException
.SAXParseException
protected void logIgnoreElement(String element, String reason)
Logs information about an element being ignored.
This method logs the following message as a warning:
"Ignoring element element parameter (line: line number, col: column number) the reason parameter"
element
- The element being ignored.reason
- The reason why the current element is ignored.protected void log(Level level, String message, Object[] parameters)
Logs a message with full location information.
Note that the location information is correct only when invoking
the events in the SAX ContentHandler
interface. The
application should not attempt to use this information at any other time.
level
- The log level.message
- The message. The first three parameters of the message will be replaced
as follows: {0} by the line number, {1} by the column number, {2} by the
public id.
Any subsequent parameter, like {3}, will replace the parameters given in
parameter
. Note that the current element is retrieved from the
Locator
and may be null
.parameters
- The parameters for the message. The first parameter in this
array replaces {3} in the message, the second replaces {4}, and so on. parameters
may be null
public abstract Logger getLogger()
Each implementation should return the logger which is used.
public abstract Locator getLocator()
public abstract XMLReader getXMLReader()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.