You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@locus.apache.org on 2000/09/25 16:47:49 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon/xml XMLConsumerBridge.java

stefano     00/09/25 07:47:47

  Modified:    src/org/apache/cocoon/xml Tag: xml-cocoon2
                        XMLConsumerBridge.java
  Log:
  now implements XMLProducer as well (like all good bridges, they have two sides)
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +14 -6     xml-cocoon/src/org/apache/cocoon/xml/Attic/XMLConsumerBridge.java
  
  Index: XMLConsumerBridge.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/xml/Attic/XMLConsumerBridge.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XMLConsumerBridge.java	2000/09/05 17:25:30	1.1.2.1
  +++ XMLConsumerBridge.java	2000/09/25 14:47:45	1.1.2.2
  @@ -21,19 +21,27 @@
    * handlers and lexical handlers.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/09/05 17:25:30 $
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/09/25 14:47:45 $
    */
  -public class XMLConsumerBridge extends AbstractXMLConsumer {
  +public class XMLConsumerBridge extends AbstractXMLConsumer implements XMLProducer {
   
  -    private ContentHandler ch = null;
  -    private LexicalHandler lh = null;
  +    private XMLConsumer consumer;
  +    private ContentHandler ch;
  +    private LexicalHandler lh;
  +
  +    /**
  +     * Set the <code>XMLConsumer</code> that will receive XML data.
  +     */
  +    public void setConsumer(XMLConsumer consumer) {
  +        this.consumer = consumer;
  +    }
       
       /**
        * Indicate the content handler this class bridges.
        *
        * @param handler The bridged content handler.
        */
  -    public void setBridgedContentHandler(ContentHandler handler) {
  +    public void setContentHandler(ContentHandler handler) {
           this.ch = handler;
       }
   
  @@ -42,7 +50,7 @@
        *
        * @param handler The bridged lexical handler.
        */
  -    public void setBridgedLexicalHandler(LexicalHandler handler) {
  +    public void setLexicalHandler(LexicalHandler handler) {
           this.lh = handler;
       }