View Javadoc

1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.3-b18-fcs 
3   // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4   // Any modifications to this file will be lost upon recompilation of the source schema. 
5   // Generated on: 2004.12.16 at 07:09:44 EST 
6   //
7   
8   package net.sf.jour.rt.view.config.impl.runtime;
9   
10  import org.xml.sax.Attributes;
11  import org.xml.sax.SAXException;
12  
13  /***
14   * UnmarshallingEventHandler implementation that discards the whole sub-tree.
15   * 
16   * @author
17   *     Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
18   */
19  class Discarder implements UnmarshallingEventHandler {
20      
21      private final UnmarshallingContext context;
22  
23      // nest level of elements.
24      private int depth = 0;
25      
26      
27      public Discarder(UnmarshallingContext _ctxt) {
28          this.context = _ctxt;
29      }
30  
31      public void enterAttribute(String uri, String local, String qname) throws SAXException {
32      }
33  
34      public void enterElement(String uri, String local, String qname, Attributes atts) throws SAXException {
35          depth++;
36      }
37  
38      public void leaveAttribute(String uri, String local, String qname) throws SAXException {
39      }
40  
41      public void leaveElement(String uri, String local, String qname) throws SAXException {
42          depth--;
43          if(depth==0)
44              context.popContentHandler();
45      }
46  
47      public Object owner() {
48          return null;
49      }
50  
51      public void text(String s) throws SAXException {
52      }
53  
54      public void leaveChild(int nextState) throws SAXException {
55      }
56  
57  }