1 38 39 package com.sun.xml.fastinfoset.stax; 40 import javax.xml.namespace.QName ; 41 import javax.xml.namespace.NamespaceContext ; 42 43 import javax.xml.stream.events.XMLEvent; 44 import javax.xml.stream.XMLStreamReader; 45 import javax.xml.stream.Location; 46 import javax.xml.stream.XMLStreamException; 47 import java.util.List ; 48 import java.io.InputStream ; 49 50 51 public class StAXParserWrapper implements XMLStreamReader{ 52 private XMLStreamReader _reader; 53 54 55 public StAXParserWrapper() { 56 } 57 58 public StAXParserWrapper(XMLStreamReader reader) { 59 _reader = reader; 60 } 61 public void setReader(XMLStreamReader reader) { 62 _reader = reader; 63 } 64 public XMLStreamReader getReader() { 65 return _reader; 66 } 67 68 public int next() throws XMLStreamException 69 { 70 return _reader.next(); 71 } 72 73 public int nextTag() throws XMLStreamException 74 { 75 return _reader.nextTag(); 76 } 77 78 public String getElementText() throws XMLStreamException 79 { 80 return _reader.getElementText(); 81 } 82 83 public void require(int type, String namespaceURI, String localName) throws XMLStreamException 84 { 85 _reader.require(type,namespaceURI,localName); 86 } 87 88 public boolean hasNext() throws XMLStreamException 89 { 90 return _reader.hasNext(); 91 } 92 93 public void close() throws XMLStreamException 94 { 95 _reader.close(); 96 } 97 98 public String getNamespaceURI(String prefix) 99 { 100 return _reader.getNamespaceURI(prefix); 101 } 102 103 public NamespaceContext getNamespaceContext() { 104 return _reader.getNamespaceContext(); 105 } 106 107 public boolean isStartElement() { 108 return _reader.isStartElement(); 109 } 110 111 public boolean isEndElement() { 112 return _reader.isEndElement(); 113 } 114 115 public boolean isCharacters() { 116 return _reader.isCharacters(); 117 } 118 119 public boolean isWhiteSpace() { 120 return _reader.isWhiteSpace(); 121 } 122 123 public QName getAttributeName(int index) { 124 return _reader.getAttributeName(index); 125 } 126 127 public int getTextCharacters(int sourceStart, char[] target, int targetStart, 128 int length) throws XMLStreamException 129 { 130 return _reader.getTextCharacters(sourceStart, target, targetStart, length); 131 } 132 133 public String getAttributeValue(String namespaceUri, 134 String localName) 135 { 136 return _reader.getAttributeValue(namespaceUri,localName); 137 } 138 public int getAttributeCount() { 139 return _reader.getAttributeCount(); 140 } 141 public String getAttributePrefix(int index) { 142 return _reader.getAttributePrefix(index); 143 } 144 public String getAttributeNamespace(int index) { 145 return _reader.getAttributeNamespace(index); 146 } 147 public String getAttributeLocalName(int index) { 148 return _reader.getAttributeLocalName(index); 149 } 150 public String getAttributeType(int index) { 151 return _reader.getAttributeType(index); 152 } 153 public String getAttributeValue(int index) { 154 return _reader.getAttributeValue(index); 155 } 156 public boolean isAttributeSpecified(int index) { 157 return _reader.isAttributeSpecified(index); 158 } 159 160 public int getNamespaceCount() { 161 return _reader.getNamespaceCount(); 162 } 163 public String getNamespacePrefix(int index) { 164 return _reader.getNamespacePrefix(index); 165 } 166 public String getNamespaceURI(int index) { 167 return _reader.getNamespaceURI(index); 168 } 169 170 public int getEventType() { 171 return _reader.getEventType(); 172 } 173 174 public String getText() { 175 return _reader.getText(); 176 } 177 178 public char[] getTextCharacters() { 179 return _reader.getTextCharacters(); 180 } 181 182 public int getTextStart() { 183 return _reader.getTextStart(); 184 } 185 186 public int getTextLength() { 187 return _reader.getTextLength(); 188 } 189 190 public String getEncoding() { 191 return _reader.getEncoding(); 192 } 193 194 public boolean hasText() { 195 return _reader.hasText(); 196 } 197 198 public Location getLocation() { 199 return _reader.getLocation(); 200 } 201 202 public QName getName() { 203 return _reader.getName(); 204 } 205 206 public String getLocalName() { 207 return _reader.getLocalName(); 208 } 209 210 public boolean hasName() { 211 return _reader.hasName(); 212 } 213 214 public String getNamespaceURI() { 215 return _reader.getNamespaceURI(); 216 } 217 218 public String getPrefix() { 219 return _reader.getPrefix(); 220 } 221 222 public String getVersion() { 223 return _reader.getVersion(); 224 } 225 226 public boolean isStandalone() { 227 return _reader.isStandalone(); 228 } 229 230 public boolean standaloneSet() { 231 return _reader.standaloneSet(); 232 } 233 234 public String getCharacterEncodingScheme() { 235 return _reader.getCharacterEncodingScheme(); 236 } 237 238 public String getPITarget() { 239 return _reader.getPITarget(); 240 } 241 242 public String getPIData() { 243 return _reader.getPIData(); 244 } 245 246 public Object getProperty(String name) { 247 return _reader.getProperty(name); 248 } 249 } 250 | Popular Tags |