001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Scott Ferguson
028: */
029:
030: package javax.xml.stream;
031:
032: import javax.xml.namespace.NamespaceContext;
033: import javax.xml.namespace.QName;
034:
035: public interface XMLStreamReader extends XMLStreamConstants {
036:
037: public void close() throws XMLStreamException;
038:
039: public int getAttributeCount();
040:
041: public String getAttributeLocalName(int index);
042:
043: public QName getAttributeName(int index);
044:
045: public String getAttributeNamespace(int index);
046:
047: public String getAttributePrefix(int index);
048:
049: public String getAttributeType(int index);
050:
051: public String getAttributeValue(int index);
052:
053: public String getAttributeValue(String namespaceURI,
054: String localName);
055:
056: public String getCharacterEncodingScheme();
057:
058: public String getElementText() throws XMLStreamException;
059:
060: public String getEncoding();
061:
062: public int getEventType();
063:
064: public String getLocalName();
065:
066: public Location getLocation();
067:
068: public QName getName();
069:
070: public NamespaceContext getNamespaceContext();
071:
072: public int getNamespaceCount();
073:
074: public String getNamespacePrefix(int index);
075:
076: public String getNamespaceURI();
077:
078: public String getNamespaceURI(int index);
079:
080: public String getNamespaceURI(String prefix);
081:
082: public String getPIData();
083:
084: public String getPITarget();
085:
086: public String getPrefix();
087:
088: public Object getProperty(String name)
089: throws IllegalArgumentException;
090:
091: public String getText();
092:
093: public char[] getTextCharacters();
094:
095: public int getTextCharacters(int sourceStart, char[] target,
096: int targetStart, int length) throws XMLStreamException;
097:
098: public int getTextLength();
099:
100: public int getTextStart();
101:
102: public String getVersion();
103:
104: public boolean hasName();
105:
106: public boolean hasNext() throws XMLStreamException;
107:
108: public boolean hasText();
109:
110: public boolean isAttributeSpecified(int index);
111:
112: public boolean isCharacters();
113:
114: public boolean isEndElement();
115:
116: public boolean isStandalone();
117:
118: public boolean isStartElement();
119:
120: public boolean isWhiteSpace();
121:
122: public int next() throws XMLStreamException;
123:
124: public int nextTag() throws XMLStreamException;
125:
126: public void require(int type, String namespaceURI, String localName)
127: throws XMLStreamException;
128:
129: public boolean standaloneSet();
130:
131: }
|