org.openxml.x3p
Interface Publisher


public abstract interface Publisher

Interface for a document publisher. Publishers are obtained from PublisherFactory. They are created with a specific output target and format and can only be used with that combination.

When called with a document, publish(Document) will publish the entire document contents including document type information. When called with a node, publish(Node) will publish the node contents and its childs, and can be used to publish portions of a larger document.

Version:
$Revision: 1.2 $ $Date: 1999/04/12 06:12:43 $
Author:
Assaf Arkin
See Also:
PublisherFactory

Method Summary
 void close()
          Called to close the output target.
 void publish(Document doc)
          Called to publish the entire document including the document declaration and DTD.
 void publish(Node node)
          Called to publish the node and its children.
 

Method Detail

publish

public void publish(Document doc)
             throws java.io.IOException
Called to publish the entire document including the document declaration and DTD.
Parameters:
doc - The document to publish
Throws:
java.io.IOException - An exception occured while publishing the document

publish

public void publish(Node node)
             throws java.io.IOException
Called to publish the node and its children. When called with a document, this method will not print the document declaration or DTD.
Parameters:
node - The node to publish
Throws:
java.io.IOException - An exception occured while publishing the node

close

public void close()
Called to close the output target. It is recommended to call this method after publishing concludes, so as not to consume open resources held by the target. This method has no affect on garbage collection of publisher objects.