Package org.postgresql.pljava.internal
Class SyntheticXMLReader.EventCarrier
- java.lang.Object
-
- org.postgresql.pljava.internal.SyntheticXMLReader.EventCarrier
-
- Enclosing class:
- SyntheticXMLReader
public abstract class SyntheticXMLReader.EventCarrier extends Object
Base class for a closure carrying one or more SAX events.Only
toSAX()
needs to be provided by an implementing class. It can usecontent()
,dtd()
,entity()
,err()
,decl()
, andlex()
to obtain the various SAX handlers onto which it should disgorge events. Those methods never return null; a no-op handler will be returned if the consumer code did not register a handler of the corresponding type.Additional convenience methods are provided for generating the most common SAX parse events.
-
-
Constructor Summary
Constructors Constructor Description EventCarrier()
-
Method Summary
Modifier and Type Method Description protected SyntheticXMLReader.FluentAttributes2
attrs()
Return the per-instance, reusableFluentAttributes2
instance, without clearing it first, so the attributes from its last use can be reused or modified.protected void
cdataCharacters(String s)
Write aString
value as aCDATA
segment.protected void
characters(String s)
Write aString
value as character content.protected SyntheticXMLReader.FluentAttributes2
cleared()
Return the per-instance, reusableFluentAttributes2
instance, clearing it first.protected ContentHandler
content()
protected DeclHandler
decl()
protected DTDHandler
dtd()
protected void
endElement(String localName)
End an element with only a local name.protected EntityResolver2
entity()
protected ErrorHandler
err()
protected LexicalHandler
lex()
protected void
startElement(String localName)
Start an element with only a local name and no attributes.protected void
startElement(String localName, Attributes atts)
Start an element with only a local name, and attributes.abstract void
toSAX()
-
-
-
Method Detail
-
content
protected ContentHandler content()
-
dtd
protected DTDHandler dtd()
-
entity
protected EntityResolver2 entity()
-
err
protected ErrorHandler err()
-
decl
protected DeclHandler decl()
-
lex
protected LexicalHandler lex()
-
attrs
protected SyntheticXMLReader.FluentAttributes2 attrs()
Return the per-instance, reusableFluentAttributes2
instance, without clearing it first, so the attributes from its last use can be reused or modified.
-
cleared
protected SyntheticXMLReader.FluentAttributes2 cleared()
Return the per-instance, reusableFluentAttributes2
instance, clearing it first.
-
characters
protected void characters(String s) throws SAXException
Write aString
value as character content.- Throws:
SAXException
-
cdataCharacters
protected void cdataCharacters(String s) throws SAXException
Write aString
value as aCDATA
segment.- Throws:
SAXException
-
startElement
protected void startElement(String localName) throws SAXException
Start an element with only a local name and no attributes.- Throws:
SAXException
-
startElement
protected void startElement(String localName, Attributes atts) throws SAXException
Start an element with only a local name, and attributes.- Throws:
SAXException
-
endElement
protected void endElement(String localName) throws SAXException
End an element with only a local name.- Throws:
SAXException
-
toSAX
public abstract void toSAX() throws IOException, SAXException, SQLException
- Throws:
IOException
SAXException
SQLException
-
-