org.xerial.util.xml.pullparser
Class ParseContext

java.lang.Object
  extended by org.xerial.util.xml.pullparser.ParseContext
All Implemented Interfaces:
org.xmlpull.v1.XmlPullParser

public class ParseContext
extends Object
implements org.xmlpull.v1.XmlPullParser

XmlPullParser のうち、parsingの状態を変えるメソッド呼び出しを禁じたクラス。 next()等を呼び出すと、ForbiddenOperationExceptionを発生させる。

Author:
leo

Field Summary
 
Fields inherited from interface org.xmlpull.v1.XmlPullParser
CDSECT, COMMENT, DOCDECL, END_DOCUMENT, END_TAG, ENTITY_REF, FEATURE_PROCESS_DOCDECL, FEATURE_PROCESS_NAMESPACES, FEATURE_REPORT_NAMESPACE_ATTRIBUTES, FEATURE_VALIDATION, IGNORABLE_WHITESPACE, NO_NAMESPACE, PROCESSING_INSTRUCTION, START_DOCUMENT, START_TAG, TEXT, TYPES
 
Constructor Summary
ParseContext(org.xmlpull.v1.XmlPullParser pullParser)
           
 
Method Summary
 void defineEntityReplacementText(String arg0, String arg1)
           
 int getAttributeCount()
           
 String getAttributeName(int arg0)
           
 String getAttributeNamespace(int arg0)
           
 String getAttributePrefix(int arg0)
           
 String getAttributeType(int arg0)
           
 String getAttributeValue(int arg0)
           
 String getAttributeValue(String arg0, String arg1)
           
 int getColumnNumber()
           
 int getDepth()
           
 int getEventType()
           
 boolean getFeature(String arg0)
           
 String getInputEncoding()
           
 int getLineNumber()
           
 String getName()
           
 String getNamespace()
           
 String getNamespace(String arg0)
           
 int getNamespaceCount(int arg0)
           
 String getNamespacePrefix(int arg0)
           
 String getNamespaceUri(int arg0)
           
 String getPositionDescription()
           
 String getPrefix()
           
 Object getProperty(String arg0)
           
 String getText()
           
 char[] getTextCharacters(int[] arg0)
           
 boolean isAttributeDefault(int arg0)
           
 boolean isEmptyElementTag()
           
 boolean isWhitespace()
           
 int next()
           
 int nextTag()
           
 String nextText()
           
 int nextToken()
           
 void require(int arg0, String arg1, String arg2)
           
 void setFeature(String arg0, boolean arg1)
           
 void setInput(InputStream arg0, String arg1)
           
 void setInput(Reader arg0)
           
 void setProperty(String arg0, Object arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseContext

public ParseContext(org.xmlpull.v1.XmlPullParser pullParser)
Method Detail

setFeature

public void setFeature(String arg0,
                       boolean arg1)
                throws org.xmlpull.v1.XmlPullParserException
Specified by:
setFeature in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getFeature

public boolean getFeature(String arg0)
Specified by:
getFeature in interface org.xmlpull.v1.XmlPullParser

setProperty

public void setProperty(String arg0,
                        Object arg1)
                 throws org.xmlpull.v1.XmlPullParserException
Specified by:
setProperty in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getProperty

public Object getProperty(String arg0)
Specified by:
getProperty in interface org.xmlpull.v1.XmlPullParser

setInput

public void setInput(Reader arg0)
              throws org.xmlpull.v1.XmlPullParserException
Specified by:
setInput in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

setInput

public void setInput(InputStream arg0,
                     String arg1)
              throws org.xmlpull.v1.XmlPullParserException
Specified by:
setInput in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getInputEncoding

public String getInputEncoding()
Specified by:
getInputEncoding in interface org.xmlpull.v1.XmlPullParser

defineEntityReplacementText

public void defineEntityReplacementText(String arg0,
                                        String arg1)
                                 throws org.xmlpull.v1.XmlPullParserException
Specified by:
defineEntityReplacementText in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getNamespaceCount

public int getNamespaceCount(int arg0)
                      throws org.xmlpull.v1.XmlPullParserException
Specified by:
getNamespaceCount in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getNamespacePrefix

public String getNamespacePrefix(int arg0)
                          throws org.xmlpull.v1.XmlPullParserException
Specified by:
getNamespacePrefix in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getNamespaceUri

public String getNamespaceUri(int arg0)
                       throws org.xmlpull.v1.XmlPullParserException
Specified by:
getNamespaceUri in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getNamespace

public String getNamespace(String arg0)
Specified by:
getNamespace in interface org.xmlpull.v1.XmlPullParser

getDepth

public int getDepth()
Specified by:
getDepth in interface org.xmlpull.v1.XmlPullParser

getPositionDescription

public String getPositionDescription()
Specified by:
getPositionDescription in interface org.xmlpull.v1.XmlPullParser

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface org.xmlpull.v1.XmlPullParser

getColumnNumber

public int getColumnNumber()
Specified by:
getColumnNumber in interface org.xmlpull.v1.XmlPullParser

isWhitespace

public boolean isWhitespace()
                     throws org.xmlpull.v1.XmlPullParserException
Specified by:
isWhitespace in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getText

public String getText()
Specified by:
getText in interface org.xmlpull.v1.XmlPullParser

getTextCharacters

public char[] getTextCharacters(int[] arg0)
Specified by:
getTextCharacters in interface org.xmlpull.v1.XmlPullParser

getNamespace

public String getNamespace()
Specified by:
getNamespace in interface org.xmlpull.v1.XmlPullParser

getName

public String getName()
Specified by:
getName in interface org.xmlpull.v1.XmlPullParser

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface org.xmlpull.v1.XmlPullParser

isEmptyElementTag

public boolean isEmptyElementTag()
                          throws org.xmlpull.v1.XmlPullParserException
Specified by:
isEmptyElementTag in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

getAttributeCount

public int getAttributeCount()
Specified by:
getAttributeCount in interface org.xmlpull.v1.XmlPullParser

getAttributeNamespace

public String getAttributeNamespace(int arg0)
Specified by:
getAttributeNamespace in interface org.xmlpull.v1.XmlPullParser

getAttributeName

public String getAttributeName(int arg0)
Specified by:
getAttributeName in interface org.xmlpull.v1.XmlPullParser

getAttributePrefix

public String getAttributePrefix(int arg0)
Specified by:
getAttributePrefix in interface org.xmlpull.v1.XmlPullParser

getAttributeType

public String getAttributeType(int arg0)
Specified by:
getAttributeType in interface org.xmlpull.v1.XmlPullParser

isAttributeDefault

public boolean isAttributeDefault(int arg0)
Specified by:
isAttributeDefault in interface org.xmlpull.v1.XmlPullParser

getAttributeValue

public String getAttributeValue(int arg0)
Specified by:
getAttributeValue in interface org.xmlpull.v1.XmlPullParser

getAttributeValue

public String getAttributeValue(String arg0,
                                String arg1)
Specified by:
getAttributeValue in interface org.xmlpull.v1.XmlPullParser

getEventType

public int getEventType()
                 throws org.xmlpull.v1.XmlPullParserException
Specified by:
getEventType in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException

next

public int next()
         throws org.xmlpull.v1.XmlPullParserException,
                IOException
Specified by:
next in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
IOException

nextToken

public int nextToken()
              throws org.xmlpull.v1.XmlPullParserException,
                     IOException
Specified by:
nextToken in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
IOException

require

public void require(int arg0,
                    String arg1,
                    String arg2)
             throws org.xmlpull.v1.XmlPullParserException,
                    IOException
Specified by:
require in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
IOException

nextText

public String nextText()
                throws org.xmlpull.v1.XmlPullParserException,
                       IOException
Specified by:
nextText in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
IOException

nextTag

public int nextTag()
            throws org.xmlpull.v1.XmlPullParserException,
                   IOException
Specified by:
nextTag in interface org.xmlpull.v1.XmlPullParser
Throws:
org.xmlpull.v1.XmlPullParserException
IOException


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.