Package jadex.xml.stax
Class StaxReaderWrapper
- java.lang.Object
- 
- jadex.xml.stax.StaxReaderWrapper
 
- 
- All Implemented Interfaces:
- IXMLReader
 
 public class StaxReaderWrapper extends java.lang.Object implements IXMLReader Wrapper for the Java stax interface.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.io.BufferedInputStreambisThe stream.protected XmlTagclosedtagThe last tag that was closed.protected javax.xml.stream.XMLStreamReaderreaderThe wrapped reader.protected java.util.LinkedList<XmlTag>tagstackThe current tag.
 - 
Constructor SummaryConstructors Constructor Description StaxReaderWrapper(java.io.InputStream in)StaxReaderWrapper(javax.xml.stream.XMLStreamReader reader)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the reader.intgetAttributeCount()java.lang.StringgetAttributeLocalName(int i)java.lang.StringgetAttributeNamespace(int i)java.lang.StringgetAttributePrefix(int i)java.util.Map<java.lang.String,java.lang.String>getAttributes()Returns the attributes.java.lang.StringgetAttributeValue(int i)XmlTaggetClosedTag()Get the XML tag struct of the last closed tag.intgetEventType()Gets the XML event type.java.lang.StringgetLocalName()ILocationgetLocation()Returns the current parser location.QNamegetName()java.lang.StringgetText()Get the text for the element.XmlTaggetXmlTag()Get the XML tag struct.java.util.LinkedList<XmlTag>getXmlTagStack()Get the XML tag stack.booleanhasNext()Returns if the reader has more events.intnext()Selects the next event.
 
- 
- 
- 
Method Detail- 
getEventTypepublic int getEventType() Gets the XML event type.- Specified by:
- getEventTypein interface- IXMLReader
- Returns:
- Event type.
 
 - 
hasNextpublic boolean hasNext() Returns if the reader has more events.- Specified by:
- hasNextin interface- IXMLReader
- Returns:
- True, if there are more events.
 
 - 
nextpublic int next() Selects the next event.- Specified by:
- nextin interface- IXMLReader
 
 - 
getXmlTagpublic XmlTag getXmlTag() Get the XML tag struct.- Specified by:
- getXmlTagin interface- IXMLReader
- Returns:
- Struct defining the tag.
 
 - 
getClosedTagpublic XmlTag getClosedTag() Get the XML tag struct of the last closed tag.- Specified by:
- getClosedTagin interface- IXMLReader
- Returns:
- Struct defining the tag.
 
 - 
getXmlTagStackpublic java.util.LinkedList<XmlTag> getXmlTagStack() Get the XML tag stack.- Specified by:
- getXmlTagStackin interface- IXMLReader
- Returns:
- Stack defining the tags.
 
 - 
getAttributespublic java.util.Map<java.lang.String,java.lang.String> getAttributes() Returns the attributes.- Specified by:
- getAttributesin interface- IXMLReader
- Returns:
- The attributes.
 
 - 
getTextpublic java.lang.String getText() Get the text for the element.- Specified by:
- getTextin interface- IXMLReader
- Returns:
- The text.
 
 - 
closepublic void close() Closes the reader.- Specified by:
- closein interface- IXMLReader
 
 - 
getLocationpublic ILocation getLocation() Returns the current parser location.- Specified by:
- getLocationin interface- IXMLReader
- Returns:
- Location
 
 - 
getLocalNamepublic java.lang.String getLocalName() - Specified by:
- getLocalNamein interface- IXMLReader
 
 - 
getAttributeCountpublic int getAttributeCount() - Specified by:
- getAttributeCountin interface- IXMLReader
 
 - 
getAttributeLocalNamepublic java.lang.String getAttributeLocalName(int i) - Specified by:
- getAttributeLocalNamein interface- IXMLReader
 
 - 
getAttributeValuepublic java.lang.String getAttributeValue(int i) - Specified by:
- getAttributeValuein interface- IXMLReader
 
 - 
getNamepublic QName getName() - Specified by:
- getNamein interface- IXMLReader
 
 - 
getAttributePrefixpublic java.lang.String getAttributePrefix(int i) - Specified by:
- getAttributePrefixin interface- IXMLReader
 
 - 
getAttributeNamespacepublic java.lang.String getAttributeNamespace(int i) - Specified by:
- getAttributeNamespacein interface- IXMLReader
 
 
- 
 
-