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