View Javadoc

1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v@@BUILD_VERSION@@ 
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: 2005.06.30 um 05:21:08 CEST 
6   //
7   
8   package de.nierbeck.timeTrack.model.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 Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
17   */
18  class Discarder implements UnmarshallingEventHandler {
19  
20  	private final UnmarshallingContext context;
21  
22  	// nest level of elements.
23  	private int depth = 0;
24  
25  	public Discarder(UnmarshallingContext _ctxt) {
26  		this.context = _ctxt;
27  	}
28  
29  	public void enterAttribute(String uri, String local, String qname)
30  			throws SAXException {
31  	}
32  
33  	public void enterElement(String uri, String local, String qname,
34  			Attributes atts) throws SAXException {
35  		depth++;
36  	}
37  
38  	public void leaveAttribute(String uri, String local, String qname)
39  			throws SAXException {
40  	}
41  
42  	public void leaveElement(String uri, String local, String qname)
43  			throws SAXException {
44  		depth--;
45  		if (depth == 0)
46  			context.popContentHandler();
47  	}
48  
49  	public Object owner() {
50  		return null;
51  	}
52  
53  	public void text(String s) throws SAXException {
54  	}
55  
56  	public void leaveChild(int nextState) throws SAXException {
57  	}
58  
59  }