public class MetaXMLStreamReader extends AbstractMetaXMLReader implements javax.xml.stream.XMLStreamReader
LiteralMetadataContentEvent
s using an XMLStreamReader
.
Instances of this class should not (and cannot) be created directly in application code, but
JPhyloIOXMLEventReader.createMetaXMLStreamReader()
should be used instead.
Since it is registered which events are read from the event stream, it is possible to read only a part of the
custom XML tree with this reader, while the rest is read using the original JPhyloIOEventReader
.
Note that all methods intended to obtain information about the document start refer to the start of the whole document, not only the custom XML tree.
Methods of this reader referring to element text as a character array , e.g. getTextCharacters()
, all work
on a string representation obtained from a characters event. The usual performance benefits in using these character
array based methods do not apply for this implementation, since it works on an underlying instance of
JPhyloIOEventReader
.
Constructor and Description |
---|
MetaXMLStreamReader(XMLReaderStreamDataProvider<?> streamDataProvider)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
getAttributeCount() |
java.lang.String |
getAttributeLocalName(int index) |
javax.xml.namespace.QName |
getAttributeName(int index) |
java.lang.String |
getAttributeNamespace(int index) |
java.lang.String |
getAttributePrefix(int index) |
java.lang.String |
getAttributeType(int index) |
java.lang.String |
getAttributeValue(int index) |
java.lang.String |
getAttributeValue(java.lang.String namespaceURI,
java.lang.String localName) |
java.lang.String |
getCharacterEncodingScheme() |
java.lang.String |
getElementText() |
java.lang.String |
getEncoding() |
int |
getEventType() |
java.lang.String |
getLocalName() |
javax.xml.stream.Location |
getLocation() |
javax.xml.namespace.QName |
getName() |
javax.xml.namespace.NamespaceContext |
getNamespaceContext() |
int |
getNamespaceCount() |
java.lang.String |
getNamespacePrefix(int index) |
java.lang.String |
getNamespaceURI() |
java.lang.String |
getNamespaceURI(int index) |
java.lang.String |
getNamespaceURI(java.lang.String prefix) |
java.lang.String |
getPIData() |
java.lang.String |
getPITarget() |
java.lang.String |
getPrefix() |
java.lang.String |
getText() |
char[] |
getTextCharacters() |
int |
getTextCharacters(int sourceStart,
char[] target,
int targetStart,
int length) |
int |
getTextLength() |
int |
getTextStart() |
java.lang.String |
getVersion() |
boolean |
hasName() |
boolean |
hasText() |
boolean |
isAttributeSpecified(int index) |
boolean |
isCharacters() |
boolean |
isEndElement() |
boolean |
isStandalone() |
boolean |
isStartElement() |
boolean |
isWhiteSpace() |
int |
next() |
int |
nextTag() |
void |
require(int type,
java.lang.String namespaceURI,
java.lang.String localName) |
boolean |
standaloneSet() |
close, getEventFactory, getJPhyloIOEventReader, getProperty, getStreamDataProvider, hasNext, isEndDocumentFired, isEndReached, isStartDocumentFired, obtainXMLContentEvent, setEndDocumentFired, setEndReached, setStartDocumentFired
public MetaXMLStreamReader(XMLReaderStreamDataProvider<?> streamDataProvider)
JPhyloIOXMLEventReader.createMetaXMLStreamReader()
instead.streamDataProvider
- the stream data provider of the underlying JPhyloIOEventReader
public int getAttributeCount()
getAttributeCount
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getAttributeLocalName(int index)
getAttributeLocalName
in interface javax.xml.stream.XMLStreamReader
public javax.xml.namespace.QName getAttributeName(int index)
getAttributeName
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getAttributeNamespace(int index)
getAttributeNamespace
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getAttributePrefix(int index)
getAttributePrefix
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getAttributeType(int index)
getAttributeType
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getAttributeValue(int index)
getAttributeValue
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getAttributeValue(java.lang.String namespaceURI, java.lang.String localName)
getAttributeValue
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getCharacterEncodingScheme()
getCharacterEncodingScheme
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getElementText() throws javax.xml.stream.XMLStreamException
getElementText
in interface javax.xml.stream.XMLStreamReader
javax.xml.stream.XMLStreamException
public java.lang.String getEncoding()
getEncoding
in interface javax.xml.stream.XMLStreamReader
public int getEventType()
getEventType
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getLocalName()
getLocalName
in interface javax.xml.stream.XMLStreamReader
public javax.xml.stream.Location getLocation()
getLocation
in interface javax.xml.stream.XMLStreamReader
public javax.xml.namespace.QName getName()
getName
in interface javax.xml.stream.XMLStreamReader
public javax.xml.namespace.NamespaceContext getNamespaceContext()
getNamespaceContext
in interface javax.xml.stream.XMLStreamReader
public int getNamespaceCount()
getNamespaceCount
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getNamespacePrefix(int index)
getNamespacePrefix
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getNamespaceURI()
getNamespaceURI
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getNamespaceURI(int index)
getNamespaceURI
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getPIData()
getPIData
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getPITarget()
getPITarget
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getPrefix()
getPrefix
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getText()
getText
in interface javax.xml.stream.XMLStreamReader
public char[] getTextCharacters()
getTextCharacters
in interface javax.xml.stream.XMLStreamReader
public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws javax.xml.stream.XMLStreamException
getTextCharacters
in interface javax.xml.stream.XMLStreamReader
javax.xml.stream.XMLStreamException
public int getTextLength()
getTextLength
in interface javax.xml.stream.XMLStreamReader
public int getTextStart()
getTextStart
in interface javax.xml.stream.XMLStreamReader
public java.lang.String getVersion()
getVersion
in interface javax.xml.stream.XMLStreamReader
public boolean hasName()
hasName
in interface javax.xml.stream.XMLStreamReader
public boolean hasText()
hasText
in interface javax.xml.stream.XMLStreamReader
public boolean isAttributeSpecified(int index)
isAttributeSpecified
in interface javax.xml.stream.XMLStreamReader
public boolean isCharacters()
isCharacters
in interface javax.xml.stream.XMLStreamReader
public boolean isEndElement()
isEndElement
in interface javax.xml.stream.XMLStreamReader
public boolean isStandalone()
isStandalone
in interface javax.xml.stream.XMLStreamReader
public boolean isStartElement()
isStartElement
in interface javax.xml.stream.XMLStreamReader
public boolean isWhiteSpace()
isWhiteSpace
in interface javax.xml.stream.XMLStreamReader
public int next() throws javax.xml.stream.XMLStreamException
next
in interface javax.xml.stream.XMLStreamReader
javax.xml.stream.XMLStreamException
public int nextTag() throws javax.xml.stream.XMLStreamException
nextTag
in interface javax.xml.stream.XMLStreamReader
javax.xml.stream.XMLStreamException
public void require(int type, java.lang.String namespaceURI, java.lang.String localName) throws javax.xml.stream.XMLStreamException
require
in interface javax.xml.stream.XMLStreamReader
javax.xml.stream.XMLStreamException
public boolean standaloneSet()
standaloneSet
in interface javax.xml.stream.XMLStreamReader