org.apache.manifoldcf.agents.common
Class XMLFileContext

java.lang.Object
  extended by org.apache.manifoldcf.agents.common.XMLContext
      extended by org.apache.manifoldcf.agents.common.XMLWriterContext
          extended by org.apache.manifoldcf.agents.common.XMLOutputStreamContext
              extended by 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
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
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
 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, tagContents
 
Methods inherited from class org.apache.manifoldcf.agents.common.XMLContext
characters, cleanup, endDocument, endElement, getAttribute, getLocalname, getNamespaceURI, getQname, startDocument, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputFile

protected java.io.File outputFile
The output file

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 ManifoldCFException,
                      java.io.UnsupportedEncodingException,
                      java.io.FileNotFoundException
Full constructor. Used for individual tags.

Throws:
ManifoldCFException
java.io.UnsupportedEncodingException
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 class XMLContext
Throws:
ManifoldCFException