Home » xml-commons-external-1.4.01-src » javax » xml » stream » util » [javadoc | source]

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    * 
    9    *      http://www.apache.org/licenses/LICENSE-2.0
   10    * 
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   
   18   // $Id: StreamReaderDelegate.java 670273 2008-06-21 23:31:31Z mrglavas $
   19   
   20   package javax.xml.stream.util;
   21   
   22   import javax.xml.namespace.NamespaceContext;
   23   import javax.xml.namespace.QName;
   24   import javax.xml.stream.Location;
   25   import javax.xml.stream.XMLStreamException;
   26   import javax.xml.stream.XMLStreamReader;
   27   
   28   public class StreamReaderDelegate implements XMLStreamReader {
   29       
   30       private XMLStreamReader reader;
   31   
   32       public StreamReaderDelegate() {}
   33   
   34       public StreamReaderDelegate(XMLStreamReader reader) {
   35           this.reader = reader;
   36       }
   37   
   38       public void setParent(XMLStreamReader reader) {
   39           this.reader = reader;
   40       }
   41   
   42       public XMLStreamReader getParent() {
   43           return reader;
   44       }
   45       
   46       /*
   47        * XMLStreamReader methods
   48        */
   49   
   50       public int next() throws XMLStreamException {
   51           return reader.next();
   52       }
   53   
   54       public int nextTag() throws XMLStreamException {
   55           return reader.nextTag();
   56       }
   57   
   58       public String getElementText() throws XMLStreamException {
   59           return reader.getElementText();
   60       }
   61   
   62       public void require(int type, String namespaceURI, String localName)
   63       throws XMLStreamException {
   64           reader.require(type, namespaceURI, localName);
   65       }
   66   
   67       public boolean hasNext() throws XMLStreamException {
   68           return reader.hasNext();
   69       }
   70   
   71       public void close() throws XMLStreamException {
   72           reader.close();
   73       }
   74   
   75       public String getNamespaceURI(String prefix) {
   76           return reader.getNamespaceURI(prefix);
   77       }
   78   
   79       public NamespaceContext getNamespaceContext() {
   80           return reader.getNamespaceContext();
   81       }
   82   
   83       public boolean isStartElement() {
   84           return reader.isStartElement();
   85       }
   86   
   87       public boolean isEndElement() {
   88           return reader.isEndElement();
   89       }
   90   
   91       public boolean isCharacters() {
   92           return reader.isCharacters();
   93       }
   94   
   95       public boolean isWhiteSpace() {
   96           return reader.isWhiteSpace();
   97       }
   98   
   99       public String getAttributeValue(String namespaceURI, String localName) {
  100           return reader.getAttributeValue(namespaceURI, localName);
  101       }
  102   
  103       public int getAttributeCount() {
  104           return reader.getAttributeCount();
  105       }
  106   
  107       public QName getAttributeName(int index) {
  108           return reader.getAttributeName(index);
  109       }
  110   
  111       public String getAttributePrefix(int index) {
  112           return reader.getAttributePrefix(index);
  113       }
  114   
  115       public String getAttributeNamespace(int index) {
  116           return reader.getAttributeNamespace(index);
  117       }
  118   
  119       public String getAttributeLocalName(int index) {
  120           return reader.getAttributeLocalName(index);
  121       }
  122   
  123       public String getAttributeType(int index) {
  124           return reader.getAttributeType(index);
  125       }
  126   
  127       public String getAttributeValue(int index) {
  128           return reader.getAttributeValue(index);
  129       }
  130   
  131       public boolean isAttributeSpecified(int index) {
  132           return reader.isAttributeSpecified(index);
  133       }
  134   
  135       public int getNamespaceCount() {
  136           return reader.getNamespaceCount();
  137       }
  138   
  139       public String getNamespacePrefix(int index) {
  140           return reader.getNamespacePrefix(index);
  141       }
  142   
  143       public String getNamespaceURI(int index) {
  144           return reader.getNamespaceURI(index);
  145       }
  146   
  147       public int getEventType() {
  148           return reader.getEventType();
  149       }
  150   
  151       public String getText() {
  152           return reader.getText();
  153       }
  154   
  155       public int getTextCharacters(int sourceStart, char[] target,
  156               int targetStart, int length) throws XMLStreamException {
  157           return reader.getTextCharacters(sourceStart, target, targetStart,
  158                   length);
  159       }
  160   
  161       public char[] getTextCharacters() {
  162           return reader.getTextCharacters();
  163       }
  164   
  165       public int getTextStart() {
  166           return reader.getTextStart();
  167       }
  168   
  169       public int getTextLength() {
  170           return reader.getTextLength();
  171       }
  172   
  173       public String getEncoding() {
  174           return reader.getEncoding();
  175       }
  176   
  177       public boolean hasText() {
  178           return reader.hasText();
  179       }
  180   
  181       public Location getLocation() {
  182           return reader.getLocation();
  183       }
  184   
  185       public QName getName() {
  186           return reader.getName();
  187       }
  188   
  189       public String getLocalName() {
  190           return reader.getLocalName();
  191       }
  192   
  193       public boolean hasName() {
  194           return reader.hasName();
  195       }
  196   
  197       public String getNamespaceURI() {
  198           return reader.getNamespaceURI();
  199       }
  200   
  201       public String getPrefix() {
  202           return reader.getPrefix();
  203       }
  204   
  205       public String getVersion() {
  206           return reader.getVersion();
  207       }
  208   
  209       public boolean isStandalone() {
  210           return reader.isStandalone();
  211       }
  212   
  213       public boolean standaloneSet() {
  214           return reader.standaloneSet();
  215       }
  216   
  217       public String getCharacterEncodingScheme() {
  218           return reader.getCharacterEncodingScheme();
  219       }
  220   
  221       public String getPITarget() {
  222           return reader.getPITarget();
  223       }
  224   
  225       public String getPIData() {
  226           return reader.getPIData();
  227       }
  228   
  229       public Object getProperty(String name) throws IllegalArgumentException {
  230           return reader.getProperty(name);
  231       }
  232   }

Home » xml-commons-external-1.4.01-src » javax » xml » stream » util » [javadoc | source]