Source Code Cross Referenced for DepthXMLStreamReader.java in  » Web-Services-apache-cxf-2.0.1 » common » org » apache » cxf » staxutils » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Services apache cxf 2.0.1 » common » org.apache.cxf.staxutils 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements. See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership. The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License. You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied. See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         */package org.apache.cxf.staxutils;
019:
020:        import javax.xml.namespace.NamespaceContext;
021:        import javax.xml.namespace.QName;
022:        import javax.xml.stream.Location;
023:        import javax.xml.stream.XMLStreamConstants;
024:        import javax.xml.stream.XMLStreamException;
025:        import javax.xml.stream.XMLStreamReader;
026:
027:        public class DepthXMLStreamReader implements  XMLStreamReader {
028:
029:            protected XMLStreamReader reader;
030:            private int depth;
031:
032:            public DepthXMLStreamReader(XMLStreamReader r) {
033:                this .reader = r;
034:            }
035:
036:            public XMLStreamReader getReader() {
037:                return this .reader;
038:            }
039:
040:            public int getDepth() {
041:                return depth;
042:            }
043:
044:            public void close() throws XMLStreamException {
045:                reader.close();
046:            }
047:
048:            public int getAttributeCount() {
049:                return reader.getAttributeCount();
050:            }
051:
052:            public String getAttributeLocalName(int arg0) {
053:                return reader.getAttributeLocalName(arg0);
054:            }
055:
056:            public QName getAttributeName(int arg0) {
057:                return reader.getAttributeName(arg0);
058:            }
059:
060:            public String getAttributeNamespace(int arg0) {
061:                return reader.getAttributeNamespace(arg0);
062:            }
063:
064:            public String getAttributePrefix(int arg0) {
065:                return reader.getAttributePrefix(arg0);
066:            }
067:
068:            public String getAttributeType(int arg0) {
069:                return reader.getAttributeType(arg0);
070:            }
071:
072:            public String getAttributeValue(int arg0) {
073:                return reader.getAttributeValue(arg0);
074:            }
075:
076:            public String getAttributeValue(String arg0, String arg1) {
077:                return reader.getAttributeValue(arg0, arg1);
078:            }
079:
080:            public String getCharacterEncodingScheme() {
081:                return reader.getCharacterEncodingScheme();
082:            }
083:
084:            public String getElementText() throws XMLStreamException {
085:                String ret = reader.getElementText();
086:                depth--;
087:                return ret;
088:            }
089:
090:            public String getEncoding() {
091:                return reader.getEncoding();
092:            }
093:
094:            public int getEventType() {
095:                return reader.getEventType();
096:            }
097:
098:            public String getLocalName() {
099:                return reader.getLocalName();
100:            }
101:
102:            public Location getLocation() {
103:                return reader.getLocation();
104:            }
105:
106:            public QName getName() {
107:                return reader.getName();
108:            }
109:
110:            public NamespaceContext getNamespaceContext() {
111:                return reader.getNamespaceContext();
112:            }
113:
114:            public int getNamespaceCount() {
115:                return reader.getNamespaceCount();
116:            }
117:
118:            public String getNamespacePrefix(int arg0) {
119:                return reader.getNamespacePrefix(arg0);
120:            }
121:
122:            public String getNamespaceURI() {
123:                return reader.getNamespaceURI();
124:            }
125:
126:            public String getNamespaceURI(int arg0) {
127:
128:                return reader.getNamespaceURI(arg0);
129:            }
130:
131:            public String getNamespaceURI(String arg0) {
132:                return reader.getNamespaceURI(arg0);
133:            }
134:
135:            public String getPIData() {
136:                return reader.getPIData();
137:            }
138:
139:            public String getPITarget() {
140:                return reader.getPITarget();
141:            }
142:
143:            public String getPrefix() {
144:                return reader.getPrefix();
145:            }
146:
147:            public Object getProperty(String arg0)
148:                    throws IllegalArgumentException {
149:
150:                return reader.getProperty(arg0);
151:            }
152:
153:            public String getText() {
154:                return reader.getText();
155:            }
156:
157:            public char[] getTextCharacters() {
158:                return reader.getTextCharacters();
159:            }
160:
161:            public int getTextCharacters(int arg0, char[] arg1, int arg2,
162:                    int arg3) throws XMLStreamException {
163:                return reader.getTextCharacters(arg0, arg1, arg2, arg3);
164:            }
165:
166:            public int getTextLength() {
167:                return reader.getTextLength();
168:            }
169:
170:            public int getTextStart() {
171:                return reader.getTextStart();
172:            }
173:
174:            public String getVersion() {
175:                return reader.getVersion();
176:            }
177:
178:            public boolean hasName() {
179:                return reader.hasName();
180:            }
181:
182:            public boolean hasNext() throws XMLStreamException {
183:                return reader.hasNext();
184:            }
185:
186:            public boolean hasText() {
187:                return reader.hasText();
188:            }
189:
190:            public boolean isAttributeSpecified(int arg0) {
191:                return reader.isAttributeSpecified(arg0);
192:            }
193:
194:            public boolean isCharacters() {
195:                return reader.isCharacters();
196:            }
197:
198:            public boolean isEndElement() {
199:                return reader.isEndElement();
200:            }
201:
202:            public boolean isStandalone() {
203:                return reader.isStandalone();
204:            }
205:
206:            public boolean isStartElement() {
207:                return reader.isStartElement();
208:            }
209:
210:            public boolean isWhiteSpace() {
211:                return reader.isWhiteSpace();
212:            }
213:
214:            public int next() throws XMLStreamException {
215:                int next = reader.next();
216:
217:                if (next == START_ELEMENT) {
218:                    depth++;
219:                } else if (next == END_ELEMENT) {
220:                    depth--;
221:                }
222:
223:                return next;
224:            }
225:
226:            public int nextTag() throws XMLStreamException {
227:                int eventType = next();
228:                while ((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace())
229:                        || (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
230:                        // skip whitespace
231:                        || eventType == XMLStreamConstants.SPACE
232:                        || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
233:                        || eventType == XMLStreamConstants.COMMENT) {
234:                    eventType = next();
235:                }
236:                if (eventType != XMLStreamConstants.START_ELEMENT
237:                        && eventType != XMLStreamConstants.END_ELEMENT) {
238:                    throw new XMLStreamException("expected start or end tag",
239:                            getLocation());
240:                }
241:                return eventType;
242:            }
243:
244:            public void require(int arg0, String arg1, String arg2)
245:                    throws XMLStreamException {
246:                reader.require(arg0, arg1, arg2);
247:            }
248:
249:            public boolean standaloneSet() {
250:                return reader.standaloneSet();
251:            }
252:
253:            public int hashCode() {
254:                return reader.hashCode();
255:            }
256:
257:            public boolean equals(Object arg0) {
258:                return reader.equals(arg0);
259:            }
260:
261:            public String toString() {
262:                return reader.toString();
263:            }
264:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.