|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.utils.SAX2FilterImpl
org.jasig.portal.utils.SAX2BufferImpl
public class SAX2BufferImpl
A basic XML buffer implementation.
| Field Summary | |
|---|---|
protected boolean |
buffering
|
static Integer |
CHARACTERS
|
static Integer |
COMMENT
|
protected boolean |
copyCharBlock
|
static Integer |
ENDCDATA
|
static Integer |
ENDDOCUMENT
|
static Integer |
ENDDTD
|
static Integer |
ENDELEMENT
|
static Integer |
ENDENTITY
|
static Integer |
ENDPREFIXMAPPING
|
static Integer |
ERROR
|
protected Vector |
eventArguments
|
protected Vector |
eventTypes
|
static Integer |
FATALERROR
|
static Integer |
IGNORABLEWHITESPACE
|
static Integer |
NOTATIONDECL
|
protected boolean |
outputAtDocumentEnd
|
static Integer |
PROCESSINGINSTRUCTION
|
static Integer |
SKIPPEDENTITY
|
static Integer |
STARTCDATA
|
static Integer |
STARTDOCUMENT
|
static Integer |
STARTDTD
|
static Integer |
STARTELEMENT
|
static Integer |
STARTENTITY
|
static Integer |
STARTPREFIXMAPPING
|
static Integer |
UNPARSEDENTITYDECL
|
static Integer |
WARNING
|
| Fields inherited from class org.jasig.portal.utils.SAX2FilterImpl |
|---|
contentHandler, dtdHandler, entityResolver, errorHandler, lexicalHandler, locator, log |
| Constructor Summary | |
|---|---|
SAX2BufferImpl()
Construct an empty XML buffer, with no parent. |
|
SAX2BufferImpl(ContentHandler ch)
Construct an XML filter based on a unified handler. |
|
SAX2BufferImpl(ContentHandler ch,
EntityResolver er,
ErrorHandler eh,
LexicalHandler lh,
DTDHandler dh)
Construct an XML filter with the specified children. |
|
SAX2BufferImpl(XMLReader parent)
Construct an XML filter with the specified parent. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Filter a character data event. |
void |
clearBuffer()
|
void |
comment(char[] ch,
int start,
int length)
Filter comment event. |
void |
endCDATA()
Filter endCDATA event. |
void |
endDocument()
Filter an end document event. |
void |
endDTD()
Filter endDTD event |
void |
endElement(String uri,
String localName,
String qName)
Filter an end element event. |
void |
endEntity(String name)
Filter endEntity event. |
void |
endPrefixMapping(String prefix)
Filter an end Namespace prefix mapping event. |
void |
error(SAXParseException e)
Filter an error event. |
void |
fatalError(SAXParseException e)
Filter a fatal error event. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Filter an ignorable whitespace event. |
boolean |
isEmpty()
|
void |
notationDecl(String name,
String publicId,
String systemId)
Filter a notation declaration event. |
void |
outputBuffer()
Outputs buffer's content to a current set of handlers. |
void |
outputBuffer(ContentHandler ch)
Outputs buffer's content to a specified content handler. |
void |
processingInstruction(String target,
String data)
Filter a processing instruction event. |
void |
setDocumentLocator(Locator locator)
Filter a new document locator event. |
void |
setOutputAtDocumentEnd(boolean setting)
Tells buffer to automatically output itself once an end of a document is reached. |
void |
skippedEntity(String name)
Filter a skipped entity event. |
void |
startBuffering()
|
void |
startCDATA()
Filter startCDATA event. |
void |
startDocument()
Filter a start document event. |
void |
startDTD(String name,
String publicId,
String systemId)
Filter startDTD event. |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
Filter a start element event. |
void |
startEntity(String name)
Filter startEntity event. |
void |
startPrefixMapping(String prefix,
String uri)
Filter a start Namespace prefix mapping event. |
void |
stopBuffering()
|
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
Filter an unparsed entity declaration event. |
void |
warning(SAXParseException e)
Filter a warning event. |
| Methods inherited from class org.jasig.portal.utils.SAX2FilterImpl |
|---|
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, parse, parse, resolveEntity, setAllHandlers, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setLexicalHandler, setParent, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Vector eventTypes
protected Vector eventArguments
protected boolean buffering
protected boolean outputAtDocumentEnd
public static final Integer STARTDOCUMENT
public static final Integer ENDDOCUMENT
public static final Integer STARTELEMENT
public static final Integer ENDELEMENT
public static final Integer CHARACTERS
public static final Integer IGNORABLEWHITESPACE
public static final Integer PROCESSINGINSTRUCTION
public static final Integer NOTATIONDECL
public static final Integer UNPARSEDENTITYDECL
public static final Integer STARTPREFIXMAPPING
public static final Integer ENDPREFIXMAPPING
public static final Integer SKIPPEDENTITY
public static final Integer WARNING
public static final Integer ERROR
public static final Integer FATALERROR
public static final Integer COMMENT
public static final Integer STARTCDATA
public static final Integer ENDCDATA
public static final Integer STARTDTD
public static final Integer ENDDTD
public static final Integer STARTENTITY
public static final Integer ENDENTITY
protected boolean copyCharBlock
| Constructor Detail |
|---|
public SAX2BufferImpl()
This filter will have no parent: you must assign a parent before you start a parse or do any configuration with setFeature or setProperty.
By default, buffering is on, outputAtDocumentEnd is off.
XMLReader.setFeature(java.lang.String, boolean),
XMLReader.setProperty(java.lang.String, java.lang.Object)public SAX2BufferImpl(XMLReader parent)
Same default flag settings as with empty constructor
SAX2FilterImpl.setParent(XMLReader),
SAX2FilterImpl.getParent()
public SAX2BufferImpl(ContentHandler ch,
EntityResolver er,
ErrorHandler eh,
LexicalHandler lh,
DTDHandler dh)
Same default flag settings as with empty constructor
SAX2FilterImpl.setContentHandler(ContentHandler),
SAX2FilterImpl.setDTDHandler(DTDHandler),
SAX2FilterImpl.setErrorHandler(ErrorHandler),
SAX2FilterImpl.setEntityResolver(EntityResolver),
SAX2FilterImpl.setLexicalHandler(LexicalHandler)public SAX2BufferImpl(ContentHandler ch)
Same default flag settings as with empty constructor.
| Method Detail |
|---|
public void setOutputAtDocumentEnd(boolean setting)
setting - a boolean valuepublic void clearBuffer()
public void stopBuffering()
throws SAXException
SAXExceptionpublic void startBuffering()
public boolean isEmpty()
public void outputBuffer()
throws SAXException
SAXException - if an error occurs
public void outputBuffer(ContentHandler ch)
throws SAXException
ch - a ContenteHandler value
SAXException - if an error occurs
public void startDTD(String name,
String publicId,
String systemId)
throws SAXException
SAX2FilterImpl
startDTD in interface LexicalHandlerstartDTD in class SAX2FilterImplname - The document type name.publicId - The declared public identifier for the
external DTD subset, or null if none was declared.systemId - The declared system identifier for the
external DTD subset, or null if none was declared.
SAXException - The application may raise an
exception.SAX2FilterImpl.endDTD(),
SAX2FilterImpl.startEntity(java.lang.String)
public void endDTD()
throws SAXException
SAX2FilterImpl
endDTD in interface LexicalHandlerendDTD in class SAX2FilterImplSAXException - The application may raise an exception.SAX2FilterImpl.startDTD(java.lang.String, java.lang.String, java.lang.String)
public void startEntity(String name)
throws SAXException
SAX2FilterImpl
startEntity in interface LexicalHandlerstartEntity in class SAX2FilterImplname - The name of the entity. If it is a parameter
entity, the name will begin with '%'.
SAXException - The application may raise an exception.SAX2FilterImpl.endEntity(java.lang.String),
DeclHandler.internalEntityDecl(java.lang.String, java.lang.String),
DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
public void endEntity(String name)
throws SAXException
SAX2FilterImpl
endEntity in interface LexicalHandlerendEntity in class SAX2FilterImplname - The name of the entity that is ending.
SAXException - The application may raise an exception.SAX2FilterImpl.startEntity(java.lang.String)
public void startCDATA()
throws SAXException
SAX2FilterImpl
startCDATA in interface LexicalHandlerstartCDATA in class SAX2FilterImplSAXException - The application may raise an exception.SAX2FilterImpl.endCDATA()
public void endCDATA()
throws SAXException
SAX2FilterImpl
endCDATA in interface LexicalHandlerendCDATA in class SAX2FilterImplSAXException - The application may raise an exception.SAX2FilterImpl.startCDATA()
public void comment(char[] ch,
int start,
int length)
throws SAXException
SAX2FilterImpl
comment in interface LexicalHandlercomment in class SAX2FilterImplch - An array holding the characters in the comment.start - The starting position in the array.length - The number of characters to use from the array.
SAXException - The application may raise an exception.
public void notationDecl(String name,
String publicId,
String systemId)
throws SAXException
SAX2FilterImpl
notationDecl in interface DTDHandlernotationDecl in class SAX2FilterImplname - The notation name.publicId - The notation's public identifier, or null.systemId - The notation's system identifier, or null.
SAXException - The client may throw
an exception during processing.DTDHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)
public void unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
throws SAXException
SAX2FilterImpl
unparsedEntityDecl in interface DTDHandlerunparsedEntityDecl in class SAX2FilterImplname - The entity name.publicId - The entity's public identifier, or null.systemId - The entity's system identifier, or null.notationName - The name of the associated notation.
SAXException - The client may throw
an exception during processing.DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)public void setDocumentLocator(Locator locator)
SAX2FilterImpl
setDocumentLocator in interface ContentHandlersetDocumentLocator in class SAX2FilterImpllocator - The document locator.ContentHandler.setDocumentLocator(org.xml.sax.Locator)
public void startDocument()
throws SAXException
SAX2FilterImpl
startDocument in interface ContentHandlerstartDocument in class SAX2FilterImplSAXException - The client may throw
an exception during processing.ContentHandler.startDocument()
public void endDocument()
throws SAXException
SAX2FilterImpl
endDocument in interface ContentHandlerendDocument in class SAX2FilterImplSAXException - The client may throw
an exception during processing.ContentHandler.endDocument()
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
SAX2FilterImpl
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class SAX2FilterImplprefix - The Namespace prefix.uri - The Namespace URI.
SAXException - The client may throw
an exception during processing.ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)
public void endPrefixMapping(String prefix)
throws SAXException
SAX2FilterImpl
endPrefixMapping in interface ContentHandlerendPrefixMapping in class SAX2FilterImplprefix - The Namespace prefix.
SAXException - The client may throw
an exception during processing.ContentHandler.endPrefixMapping(java.lang.String)
public void startElement(String uri,
String localName,
String qName,
Attributes atts)
throws SAXException
SAX2FilterImpl
startElement in interface ContentHandlerstartElement in class SAX2FilterImpluri - The element's Namespace URI, or the empty string.localName - The element's local name, or the empty string.qName - The element's qualified (prefixed) name, or the empty
string.atts - The element's attributes.
SAXException - The client may throw
an exception during processing.ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endElement(String uri,
String localName,
String qName)
throws SAXException
SAX2FilterImpl
endElement in interface ContentHandlerendElement in class SAX2FilterImpluri - The element's Namespace URI, or the empty string.localName - The element's local name, or the empty string.qName - The element's qualified (prefixed) name, or the empty
string.
SAXException - The client may throw
an exception during processing.ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void characters(char[] ch,
int start,
int length)
throws SAXException
SAX2FilterImpl
characters in interface ContentHandlercharacters in class SAX2FilterImplch - An array of characters.start - The starting position in the array.length - The number of characters to use from the array.
SAXException - The client may throw
an exception during processing.ContentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
SAX2FilterImpl
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class SAX2FilterImplch - An array of characters.start - The starting position in the array.length - The number of characters to use from the array.
SAXException - The client may throw
an exception during processing.ContentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(String target,
String data)
throws SAXException
SAX2FilterImpl
processingInstruction in interface ContentHandlerprocessingInstruction in class SAX2FilterImpltarget - The processing instruction target.data - The text following the target.
SAXException - The client may throw
an exception during processing.ContentHandler.processingInstruction(java.lang.String, java.lang.String)
public void skippedEntity(String name)
throws SAXException
SAX2FilterImpl
skippedEntity in interface ContentHandlerskippedEntity in class SAX2FilterImplname - The name of the skipped entity.
SAXException - The client may throw
an exception during processing.ContentHandler.skippedEntity(java.lang.String)
public void warning(SAXParseException e)
throws SAXException
SAX2FilterImpl
warning in interface ErrorHandlerwarning in class SAX2FilterImple - The nwarning as an exception.
SAXException - The client may throw
an exception during processing.ErrorHandler.warning(org.xml.sax.SAXParseException)
public void error(SAXParseException e)
throws SAXException
SAX2FilterImpl
error in interface ErrorHandlererror in class SAX2FilterImple - The error as an exception.
SAXException - The client may throw
an exception during processing.ErrorHandler.error(org.xml.sax.SAXParseException)
public void fatalError(SAXParseException e)
throws SAXException
SAX2FilterImpl
fatalError in interface ErrorHandlerfatalError in class SAX2FilterImple - The error as an exception.
SAXException - The client may throw
an exception during processing.ErrorHandler.fatalError(org.xml.sax.SAXParseException)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||