package com.jxml.quick.ocm; // Open Conversion Model
import org.xml.sax.*;
import java.io.*;
import com.jxml.quick.*;

/**
 * Processes documents.
 */
public interface OCMsink extends OCMbase
{
	/**
	 * Sets the validator use by the sink.
	 */
	public void setValidator(OCMvalidator validator)
		throws SAXException, IOException;

	/**
	 * Sets the input source used by the sink.
	 */
	public void setSource(OCMsource source)
		throws SAXException, IOException;

	/**
	 * A processing object spawned from an OCMsource object.
	 */
	public interface SubSink extends OCMbase.SubBase
	{
		/**
		 * Returns the input source used by the sink.
		 */
		public OCMsource.SubSource getSubSource()
			throws SAXException, IOException;

		/**
		 * Gets the input schema doc.
		 */
		public QDoc getInputSchemaDoc()
			throws SAXException, IOException;

		/**
		 * Sets the input doc name.
		 */
		public void setInputDocName(Object inputName)
			throws SAXException, IOException;

		/**
		 * Sets the doc name.
		 */
		public void setDocName(String inputName)
			throws SAXException, IOException;

		/**
		 * Generate an XML document (or other text).
	    	 * @return The XML representation
		 */
		public String express()
			throws SAXException, IOException;

	        /**
	         * Express an object tree as an XML document using the default encoding.
	         * @param filename File name of the new XML document.
	         */
	        public void expressFile()
	            throws SAXException,IOException;

		/**
		 * Generate an XML document (or other text).
	     	 * @param PW PrintWriter where the XML document is to be written.
		 */
		public void express(PrintWriter pw)
			throws SAXException, IOException;
	}
}
