001    /*
002     **
003     ** Licensed to the Apache Software Foundation (ASF) under one
004     ** or more contributor license agreements.  See the NOTICE file
005     ** distributed with this work for additional information
006     ** regarding copyright ownership.  The ASF licenses this file
007     ** to you under the Apache License, Version 2.0 (the
008     ** "License"); you may not use this file except in compliance
009     ** with the License.  You may obtain a copy of the License at
010     **
011     **  http://www.apache.org/licenses/LICENSE-2.0
012     **
013     ** Unless required by applicable law or agreed to in writing,
014     ** software distributed under the License is distributed on an
015     ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016     ** KIND, either express or implied.  See the License for the
017     ** specific language governing permissions and limitations
018     ** under the License.
019     */
020    package javax.xml.stream;
021    
022    import javax.xml.namespace.NamespaceContext;
023    import javax.xml.namespace.QName;
024    
025    public interface XMLStreamReader extends XMLStreamConstants {
026            public void close() throws XMLStreamException;
027    
028            public int getAttributeCount();
029    
030            public String getAttributeLocalName(int index);
031    
032            public QName getAttributeName(int index);
033    
034            public String getAttributeNamespace(int index);
035    
036            public String getAttributePrefix(int index);
037    
038            public String getAttributeType(int index);
039    
040            public String getAttributeValue(int index);
041    
042            public String getAttributeValue(String namespaceURI,
043                            String localName);
044    
045            public String getCharacterEncodingScheme();
046    
047            public String getElementText() throws XMLStreamException;
048    
049            public String getEncoding();
050    
051            public int getEventType();
052    
053            public String getLocalName();
054    
055            public Location getLocation();
056    
057            public QName getName();
058    
059            public NamespaceContext getNamespaceContext();
060    
061            public int getNamespaceCount();
062    
063            public String getNamespacePrefix(int index);
064    
065            public String getNamespaceURI();
066    
067            public String getNamespaceURI(int index);
068    
069            public String getNamespaceURI(String prefix);
070    
071            public String getPIData();
072    
073            public String getPITarget();
074    
075            public String getPrefix();
076    
077            public java.lang.Object getProperty(String name) throws IllegalArgumentException;
078    
079            public String getText();
080    
081            public char[] getTextCharacters();
082    
083            public int getTextCharacters(int sourceStart, char[] target, int targetStart,
084                            int length) throws XMLStreamException;
085    
086            public int getTextLength();
087    
088            public int getTextStart();
089    
090            public String getVersion();
091    
092            public boolean hasName();
093    
094            public boolean hasNext() throws XMLStreamException;
095    
096            public boolean hasText();
097    
098            public boolean isAttributeSpecified(int index);
099    
100            public boolean isCharacters();
101    
102            public boolean isEndElement();
103    
104            public boolean isStandalone();
105    
106            public boolean isStartElement();
107    
108            public boolean isWhiteSpace();
109    
110            public int next() throws XMLStreamException;
111    
112            public int nextTag() throws XMLStreamException ;
113    
114            public void require(int type, String namespaceURI,
115                            String localName) throws XMLStreamException ;
116    
117            public boolean standaloneSet();
118    }