Class XMLWriterContext
- java.lang.Object
-
- org.apache.manifoldcf.agents.common.XMLContext
-
- org.apache.manifoldcf.agents.common.XMLWriterContext
-
- Direct Known Subclasses:
XMLOutputStreamContext
public class XMLWriterContext extends XMLContext
An instance of this class represents a parsing context within a node. Data is written to the supplied writer.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.Writer
theWriter
The writer-
Fields inherited from class org.apache.manifoldcf.agents.common.XMLContext
localname, namespaceURI, previousContext, qname, theseAttributes, theStream
-
-
Constructor Summary
Constructors Constructor Description XMLWriterContext(XMLStream theStream, java.lang.String namespaceURI, java.lang.String localname, java.lang.String qname, org.xml.sax.Attributes theseAttributes, java.io.Writer writer)
Full constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XMLContext
beginTag(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
Start a child tag.protected void
endTag()
End a child tag.protected static java.lang.String
escapeAttribute(java.lang.String value)
Convert a string to a value that's safe to include inside an attribute valueprotected static void
escapeCharData(char[] chars, int start, int length, java.io.Writer out)
Escapes sequence of characters to output writervoid
flush()
Flush the data to the underlying output streamprotected void
tagContents(char[] ch, int start, int length)
This method is meant to be extended by classes that extend this class-
Methods inherited from class org.apache.manifoldcf.agents.common.XMLContext
characters, cleanup, endDocument, endElement, getAttribute, getLocalname, getNamespaceURI, getQname, startDocument, startElement, tagCleanup
-
-
-
-
Constructor Detail
-
XMLWriterContext
public XMLWriterContext(XMLStream theStream, java.lang.String namespaceURI, java.lang.String localname, java.lang.String qname, org.xml.sax.Attributes theseAttributes, java.io.Writer writer)
Full constructor. Used for individual tags.
-
-
Method Detail
-
flush
public void flush() throws ManifoldCFException
Flush the data to the underlying output stream- Throws:
ManifoldCFException
-
tagContents
protected void tagContents(char[] ch, int start, int length) throws ManifoldCFException
This method is meant to be extended by classes that extend this class- Overrides:
tagContents
in classXMLContext
- Throws:
ManifoldCFException
-
beginTag
protected XMLContext beginTag(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws ManifoldCFException, ServiceInterruption
Start a child tag. The XMLWriterContext accepts all subtags in their text form.- Overrides:
beginTag
in classXMLContext
- Throws:
ManifoldCFException
ServiceInterruption
-
endTag
protected void endTag() throws ManifoldCFException, ServiceInterruption
End a child tag. The XMLWriterContext accepts all subtags in their text form.- Overrides:
endTag
in classXMLContext
- Throws:
ManifoldCFException
ServiceInterruption
-
escapeAttribute
protected static java.lang.String escapeAttribute(java.lang.String value)
Convert a string to a value that's safe to include inside an attribute value
-
escapeCharData
protected static void escapeCharData(char[] chars, int start, int length, java.io.Writer out) throws java.io.IOException
Escapes sequence of characters to output writer- Throws:
java.io.IOException
-
-