01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2004-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.xml.handlers.xsi;
17:
18: import org.geotools.xml.XSIElementHandler;
19: import org.xml.sax.Attributes;
20:
21: /**
22: * <p>
23: * Used to represent elements which are not important to our parse, basically
24: * place holders.
25: * </p>
26: *
27: * @author dzwiers, Refractions Research, Inc. http://www.refractions.net
28: * @author $Author:$ (last modification)
29: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/xml/src/main/java/org/geotools/xml/handlers/xsi/IgnoreHandler.java $
30: * @version $Id: IgnoreHandler.java 20703 2006-07-24 16:57:44Z jgarnett $
31: */
32: public class IgnoreHandler extends XSIElementHandler {
33: /** "" */
34: public final static String LOCALNAME = "";
35:
36: /**
37: * @see org.geotools.xml.XSIElementHandler#characters(java.lang.String)
38: */
39: public void characters(String text) {
40: // do nothing
41: }
42:
43: /**
44: * @see java.lang.Object#hashCode()
45: */
46: public int hashCode() {
47: return 0;
48: }
49:
50: /**
51: * @see org.geotools.xml.XSIElementHandler#getHandler(java.lang.String,
52: * java.lang.String)
53: */
54: public XSIElementHandler getHandler(String namespaceURI,
55: String localName) {
56: return this ;
57: }
58:
59: /**
60: * @see org.geotools.xml.XSIElementHandler#getLocalName()
61: */
62: public String getLocalName() {
63: return LOCALNAME;
64: }
65:
66: /**
67: * @see org.geotools.xml.XSIElementHandler#getHandlerType()
68: */
69: public int getHandlerType() {
70: return DEFAULT;
71: }
72:
73: /**
74: * @see org.geotools.xml.XSIElementHandler#endElement(java.lang.String,
75: * java.lang.String)
76: */
77: public void endElement(String namespaceURI, String localName) {
78: // do nothing
79: }
80:
81: /**
82: * @see org.geotools.xml.XSIElementHandler#startElement(java.lang.String,
83: * java.lang.String, org.xml.sax.Attributes)
84: */
85: public void startElement(String namespaceURI, String localName,
86: Attributes attr) {
87: // do nothing
88: }
89: }
|