Class XMLFileContext
- java.lang.Object
-
- org.apache.manifoldcf.agents.common.XMLContext
-
- org.apache.manifoldcf.agents.common.XMLWriterContext
-
- org.apache.manifoldcf.agents.common.XMLOutputStreamContext
-
- org.apache.manifoldcf.agents.common.XMLFileContext
-
public class XMLFileContext extends XMLOutputStreamContext
An instance of this class represents a parsing context within a node. Data is written to the supplied file in utf-8 format.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.File
outputFile
The output file-
Fields inherited from class org.apache.manifoldcf.agents.common.XMLOutputStreamContext
outputStream
-
Fields inherited from class org.apache.manifoldcf.agents.common.XMLWriterContext
theWriter
-
Fields inherited from class org.apache.manifoldcf.agents.common.XMLContext
localname, namespaceURI, previousContext, qname, theseAttributes, theStream
-
-
Constructor Summary
Constructors Constructor Description XMLFileContext(XMLStream theStream, java.lang.String namespaceURI, java.lang.String localname, java.lang.String qname, org.xml.sax.Attributes theseAttributes, java.io.File f)
Full constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getCompletedFile()
Get file object, flushing it, closing it, and clearing it.void
tagCleanup()
Cleanup whatever is left over-
Methods inherited from class org.apache.manifoldcf.agents.common.XMLOutputStreamContext
close, flush
-
Methods inherited from class org.apache.manifoldcf.agents.common.XMLWriterContext
beginTag, endTag, escapeAttribute, escapeCharData, tagContents
-
Methods inherited from class org.apache.manifoldcf.agents.common.XMLContext
characters, cleanup, endDocument, endElement, getAttribute, getLocalname, getNamespaceURI, getQname, startDocument, startElement
-
-
-
-
Constructor Detail
-
XMLFileContext
public XMLFileContext(XMLStream theStream, java.lang.String namespaceURI, java.lang.String localname, java.lang.String qname, org.xml.sax.Attributes theseAttributes, java.io.File f) throws java.io.FileNotFoundException
Full constructor. Used for individual tags.- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
getCompletedFile
public java.io.File getCompletedFile() throws ManifoldCFException
Get file object, flushing it, closing it, and clearing it. (This prevents the file from being deleted during cleanup of this context.)- Throws:
ManifoldCFException
-
tagCleanup
public void tagCleanup() throws ManifoldCFException
Cleanup whatever is left over- Overrides:
tagCleanup
in classXMLContext
- Throws:
ManifoldCFException
-
-