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

/**
 * Must be implemented by the root peer object.
 */
public interface OCMrootPeer extends OCMpeer
{

	/**
	 * Convert one QDoc into another.
	 * @return The new document.
	 */
	public QDoc convert()
		throws SAXException, IOException;

	/**
	 * Convert one QDoc into another.
	 * @param url The name of the output document.
	 * @return The new (unique) document.
	 */
	public QDoc convert(String url)
		throws SAXException, IOException;
	/**
	 * Generate an XML document (or other text).
    	 * @param doc The QDoc object holding the object tree to be expressed in XML.
	 * @param expressDefaults Turns on the expression of default values.
    	 * @return The XML representation
	 */
	public String express(boolean expressDefaults)
		throws SAXException, IOException;

	/**
	 * Generate an XML document (or other text).
     	 * @param doc The QDoc object holding the object tree to be expressed in XML.
     	 * @param PW PrintWriter where the XML document is to be written.
	 * @param expressDefaults Turns on the expression of default values.
	 */
	public void express(PrintWriter pw, boolean expressDefaults)
		throws SAXException, IOException;
}
