Package jadex.bpmn.model.io
Class StaxReaderWrapper
java.lang.Object
jadex.bpmn.model.io.StaxReaderWrapper
- All Implemented Interfaces:
IXMLReader
Wrapper for the Java stax interface.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BufferedInputStream
The stream.protected XmlTag
The last tag that was closed.protected XMLStreamReader
The wrapped reader.protected LinkedList
<XmlTag> The current tag. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the reader.int
getAttributeLocalName
(int i) getAttributeNamespace
(int i) getAttributePrefix
(int i) Returns the attributes.getAttributeValue
(int i) Get the XML tag struct of the last closed tag.int
Gets the XML event type.Returns the current parser location.getName()
getText()
Get the text for the element.Get the XML tag struct.Get the XML tag stack.boolean
hasNext()
Returns if the reader has more events.int
next()
Selects the next event.
-
Field Details
-
bis
The stream. -
reader
The wrapped reader. -
tagstack
The current tag. -
closedtag
The last tag that was closed.
-
-
Constructor Details
-
StaxReaderWrapper
-
StaxReaderWrapper
-
-
Method Details
-
getEventType
public int getEventType()Gets the XML event type.- Specified by:
getEventType
in interfaceIXMLReader
- Returns:
- Event type.
-
hasNext
public boolean hasNext()Returns if the reader has more events.- Specified by:
hasNext
in interfaceIXMLReader
- Returns:
- True, if there are more events.
-
next
public int next()Selects the next event.- Specified by:
next
in interfaceIXMLReader
-
getXmlTag
Get the XML tag struct.- Specified by:
getXmlTag
in interfaceIXMLReader
- Returns:
- Struct defining the tag.
-
getClosedTag
Get the XML tag struct of the last closed tag.- Specified by:
getClosedTag
in interfaceIXMLReader
- Returns:
- Struct defining the tag.
-
getXmlTagStack
Get the XML tag stack.- Specified by:
getXmlTagStack
in interfaceIXMLReader
- Returns:
- Stack defining the tags.
-
getAttributes
Returns the attributes.- Specified by:
getAttributes
in interfaceIXMLReader
- Returns:
- The attributes.
-
getText
Get the text for the element.- Specified by:
getText
in interfaceIXMLReader
- Returns:
- The text.
-
close
public void close()Closes the reader.- Specified by:
close
in interfaceIXMLReader
-
getLocation
Returns the current parser location.- Specified by:
getLocation
in interfaceIXMLReader
- Returns:
- Location
-
getLocalName
- Specified by:
getLocalName
in interfaceIXMLReader
-
getAttributeCount
public int getAttributeCount()- Specified by:
getAttributeCount
in interfaceIXMLReader
-
getAttributeLocalName
- Specified by:
getAttributeLocalName
in interfaceIXMLReader
-
getAttributeValue
- Specified by:
getAttributeValue
in interfaceIXMLReader
-
getName
- Specified by:
getName
in interfaceIXMLReader
-
getAttributePrefix
- Specified by:
getAttributePrefix
in interfaceIXMLReader
-
getAttributeNamespace
- Specified by:
getAttributeNamespace
in interfaceIXMLReader
-