org.apache.tuscany.sdo.util.resource
Class RecordedEventXMLStreamReader
java.lang.Object
org.apache.tuscany.sdo.util.resource.RecordedEventXMLStreamReader
- All Implemented Interfaces:
- javax.xml.stream.XMLStreamConstants, javax.xml.stream.XMLStreamReader
public abstract class RecordedEventXMLStreamReader
- extends Object
- implements javax.xml.stream.XMLStreamReader
This special purpose XMLStreamReader is used to produce a StAX event stream corresponding to a list of events
recorded earlier. The recorded events are generated by the inner class RecordedEventXMLStreamReader.Tag,
which records the events in either of 2 ways:
1) in conjunction with class SDOXMLLoadImpl, it records events corresponding to the SAX events being
handled by the SDOXMLLoadImpl when loading XML using SDOXMLResourceImpl.
2) when Tag.record() is called (see class ChangeSummaryStreamDeserializer), it walks through and records
the StAX events produced by another XMLStreamReader.
This class is used by the SDO StAX-based ChangeSummaryType-property loader, class
ChangeSummaryStreamDeserializer, which is inoked by and uses (for loading deleted object XML fragments)
the SAX-based loader class XMLResourceImpl.
Fields inherited from interface javax.xml.stream.XMLStreamConstants |
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.xml.stream.XMLStreamReader |
close, getCharacterEncodingScheme, getEncoding, getProperty, getVersion, isStandalone, standaloneSet |
buffer
protected StringBuffer buffer
next
protected int next
RecordedEventXMLStreamReader
protected RecordedEventXMLStreamReader(RecordedEventXMLStreamReader.Tag tag)
prefix
protected static String prefix(String qName,
String nameSpace)
getAttributeCount
public int getAttributeCount()
- Specified by:
getAttributeCount
in interface javax.xml.stream.XMLStreamReader
attributes
protected final org.apache.tuscany.sdo.util.resource.RecordedEventXMLStreamReader.AttributeList attributes()
getAttributeLocalName
public String getAttributeLocalName(int index)
- Specified by:
getAttributeLocalName
in interface javax.xml.stream.XMLStreamReader
getAttributeName
public javax.xml.namespace.QName getAttributeName(int index)
- Specified by:
getAttributeName
in interface javax.xml.stream.XMLStreamReader
getAttributeNamespace
public String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespace
in interface javax.xml.stream.XMLStreamReader
getAttributePrefix
public String getAttributePrefix(int index)
- Specified by:
getAttributePrefix
in interface javax.xml.stream.XMLStreamReader
getAttributeType
public String getAttributeType(int index)
- Specified by:
getAttributeType
in interface javax.xml.stream.XMLStreamReader
getAttributeValue
public String getAttributeValue(int index)
- Specified by:
getAttributeValue
in interface javax.xml.stream.XMLStreamReader
isAttributeSpecified
public boolean isAttributeSpecified(int index)
- Specified by:
isAttributeSpecified
in interface javax.xml.stream.XMLStreamReader
getAttributeValue
public String getAttributeValue(String nameSpace,
String name)
- Specified by:
getAttributeValue
in interface javax.xml.stream.XMLStreamReader
getElementText
public String getElementText()
- Specified by:
getElementText
in interface javax.xml.stream.XMLStreamReader
getEventType
public final int getEventType()
- Specified by:
getEventType
in interface javax.xml.stream.XMLStreamReader
getLocalName
public String getLocalName()
- Specified by:
getLocalName
in interface javax.xml.stream.XMLStreamReader
getLocation
public final javax.xml.stream.Location getLocation()
- Specified by:
getLocation
in interface javax.xml.stream.XMLStreamReader
getName
public javax.xml.namespace.QName getName()
- Specified by:
getName
in interface javax.xml.stream.XMLStreamReader
getNamespaceContext
public final javax.xml.namespace.NamespaceContext getNamespaceContext()
- Specified by:
getNamespaceContext
in interface javax.xml.stream.XMLStreamReader
getNamespaceCount
public int getNamespaceCount()
- Specified by:
getNamespaceCount
in interface javax.xml.stream.XMLStreamReader
getNameSpace
protected final org.apache.tuscany.sdo.util.resource.RecordedEventXMLStreamReader.NameSpace getNameSpace(int index)
getNamespacePrefix
public String getNamespacePrefix(int index)
- Specified by:
getNamespacePrefix
in interface javax.xml.stream.XMLStreamReader
getNamespaceURI
public final String getNamespaceURI()
- Specified by:
getNamespaceURI
in interface javax.xml.stream.XMLStreamReader
getNamespaceURI
public String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURI
in interface javax.xml.stream.XMLStreamReader
getNamespaceURI
public String getNamespaceURI(int index)
- Specified by:
getNamespaceURI
in interface javax.xml.stream.XMLStreamReader
getPIData
public String getPIData()
- Specified by:
getPIData
in interface javax.xml.stream.XMLStreamReader
getPITarget
public String getPITarget()
- Specified by:
getPITarget
in interface javax.xml.stream.XMLStreamReader
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interface javax.xml.stream.XMLStreamReader
getText
public final String getText()
- Specified by:
getText
in interface javax.xml.stream.XMLStreamReader
getTextCharacters
public final char[] getTextCharacters()
- Specified by:
getTextCharacters
in interface javax.xml.stream.XMLStreamReader
getTextCharacters
public int getTextCharacters(int sourceStart,
char[] target,
int targetStart,
int length)
- Specified by:
getTextCharacters
in interface javax.xml.stream.XMLStreamReader
getTextLength
public int getTextLength()
- Specified by:
getTextLength
in interface javax.xml.stream.XMLStreamReader
getTextStart
public int getTextStart()
- Specified by:
getTextStart
in interface javax.xml.stream.XMLStreamReader
hasName
public final boolean hasName()
- Specified by:
hasName
in interface javax.xml.stream.XMLStreamReader
hasNext
public final boolean hasNext()
- Specified by:
hasNext
in interface javax.xml.stream.XMLStreamReader
hasText
public final boolean hasText()
- Specified by:
hasText
in interface javax.xml.stream.XMLStreamReader
isCharacters
public boolean isCharacters()
- Specified by:
isCharacters
in interface javax.xml.stream.XMLStreamReader
isEndElement
public boolean isEndElement()
- Specified by:
isEndElement
in interface javax.xml.stream.XMLStreamReader
isStartElement
public boolean isStartElement()
- Specified by:
isStartElement
in interface javax.xml.stream.XMLStreamReader
areWhiteSpace
protected final boolean areWhiteSpace()
isWhiteSpace
public boolean isWhiteSpace()
- Specified by:
isWhiteSpace
in interface javax.xml.stream.XMLStreamReader
next
public final int next()
- Specified by:
next
in interface javax.xml.stream.XMLStreamReader
throwXMLStreamException
protected final void throwXMLStreamException(String message)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
nextTag
public int nextTag()
throws javax.xml.stream.XMLStreamException
- Specified by:
nextTag
in interface javax.xml.stream.XMLStreamReader
- Throws:
javax.xml.stream.XMLStreamException
require
public void require(int type,
String nameSpace,
String name)
throws javax.xml.stream.XMLStreamException
- Specified by:
require
in interface javax.xml.stream.XMLStreamReader
- Throws:
javax.xml.stream.XMLStreamException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.