1. /*
  2. * @(#)XmlWriter.java 1.3 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.sql.rowset.spi;
  8. import java.sql.SQLException;
  9. import java.io.Writer;
  10. import javax.sql.RowSetWriter;
  11. import javax.sql.rowset.*;
  12. /**
  13. * A specialized interface that facilitates an extension of the
  14. * <code>SyncProvider</code> abstract class for XML orientated
  15. * synchronization providers.
  16. * <p>
  17. * <code>SyncProvider</code> implementations that supply XML data writer
  18. * capabilities such as output XML stream capabilities can implement this
  19. * interface to provider standard <code>XmlWriter</code> objects to
  20. * <code>WebRowSet</code> implementations.
  21. * <P>
  22. * Writing a <code>WebRowSet</code> object includes printing the
  23. * rowset's data, metadata, and properties, all with the
  24. * appropriate XML tags.
  25. */
  26. public interface XmlWriter extends RowSetWriter {
  27. /**
  28. * Writes the given <code>WebRowSet</code> object to the specified
  29. * <code>java.io.Writer</code> output stream as an XML document.
  30. * This document includes the rowset's data, metadata, and properties
  31. * plus the appropriate XML tags.
  32. * <P>
  33. * The <code>caller</code> parameter must be a <code>WebRowSet</code>
  34. * object whose <code>XmlWriter</code> field contains a reference to
  35. * this <code>XmlWriter</code> object.
  36. *
  37. * @param caller the <code>WebRowSet</code> instance to be written,
  38. * for which this <code>XmlWriter</code> object is the writer
  39. * @param writer the <code>java.io.Writer</code> object that serves
  40. * as the output stream for writing <code>caller</code> as
  41. * an XML document
  42. * @throws SQLException if a database access error occurs or
  43. * this <code>XmlWriter</code> object is not the writer
  44. * for the given <code>WebRowSet</code> object
  45. */
  46. public void writeXML(WebRowSet caller, java.io.Writer writer)
  47. throws SQLException;
  48. }