Interface XMLStreamReaderExt
-
- All Superinterfaces:
XMLStreamConstants,XMLStreamReader
- All Known Implementing Classes:
XMLStreamReaderExtImpl
public interface XMLStreamReaderExt extends XMLStreamReader
This interface extends the simple XMLStreamReader interface adding methods to get java objects asociated with schemas simple types like: ints, long, BigIntegers, Dates etc Note: Given the fact that an implemetation of this interface will not run validation in the stream, we will not include support for lists, enumeration and unions. They might be possible to introduce but the user has to push the corect schema type. Because usualy the backends are not list/union aware, there would be not performance win from this. If interest rises for this, support should be added. Author: Cezar Andrei (cezar.andrei at bea.com) Date: Nov 14, 2003
-
-
Field Summary
Fields Modifier and Type Field Description static intWS_COLLAPSEstatic intWS_PRESERVEstatic intWS_REPLACE-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamgetAttributeBase64Value(int index)Returns the decoded base64 value as anInputStream.InputStreamgetAttributeBase64Value(String uri, String local)Returns the decoded base64 value as anInputStream.BigDecimalgetAttributeBigDecimalValue(int index)Returns the value as aBigDecimal.BigDecimalgetAttributeBigDecimalValue(String uri, String local)Returns the value as aBigDecimal.BigIntegergetAttributeBigIntegerValue(int index)Returns the value as aBigInteger.BigIntegergetAttributeBigIntegerValue(String uri, String local)Returns the value as aBigInteger.booleangetAttributeBooleanValue(int index)Returns the value as a boolean.booleangetAttributeBooleanValue(String uri, String local)Returns the value as a boolean.bytegetAttributeByteValue(int index)Returns the value as a byte.bytegetAttributeByteValue(String uri, String local)Returns the value as a byte.XmlCalendargetAttributeCalendarValue(int index)Returns the value as an XmlCalendar which extendsCalendar.XmlCalendargetAttributeCalendarValue(String uri, String local)Returns the value as an XmlCalendar which extendsCalendar.DategetAttributeDateValue(int index)Returns the value as aDate.DategetAttributeDateValue(String uri, String local)Returns the value as aDate.doublegetAttributeDoubleValue(int index)Returns the value as a double.doublegetAttributeDoubleValue(String uri, String local)Returns the value as a double.floatgetAttributeFloatValue(int index)Returns the value as a float.floatgetAttributeFloatValue(String uri, String local)Returns the value as a float.GDategetAttributeGDateValue(int index)Returns the value as aGDate.GDategetAttributeGDateValue(String uri, String local)Returns the value as aGDate.GDurationgetAttributeGDurationValue(int index)Returns the value as aGDuration.GDurationgetAttributeGDurationValue(String uri, String local)Returns the value as aGDuration.InputStreamgetAttributeHexBinaryValue(int index)Returns the decoded hexbinary value as an InputStream.InputStreamgetAttributeHexBinaryValue(String uri, String local)Returns the decoded hexbinary value as an InputStream.intgetAttributeIntValue(int index)Returns the value as an int.intgetAttributeIntValue(String uri, String local)Returns the value as an int.longgetAttributeLongValue(int index)Returns the value as a long.longgetAttributeLongValue(String uri, String local)Returns the value as a long.QNamegetAttributeQNameValue(int index)Returns the value as aQName.QNamegetAttributeQNameValue(String uri, String local)Returns the value as aQName.shortgetAttributeShortValue(int index)Returns the value as a short.shortgetAttributeShortValue(String uri, String local)Returns the value as a short.StringgetAttributeStringValue(int index)Returns the value as aString.StringgetAttributeStringValue(int index, int wsStyle)Returns the value as aString, with wsStyle applied.StringgetAttributeStringValue(String uri, String local)Returns the value as aString.StringgetAttributeStringValue(String uri, String local, int wsStyle)Returns the value as aString, with wsStyle applied.InputStreamgetBase64Value()Returns the decoded base64 value as anInputStream.BigDecimalgetBigDecimalValue()Returns the value as aBigDecimal.BigIntegergetBigIntegerValue()Returns the value as aBigInteger.booleangetBooleanValue()Returns the value as a boolean.bytegetByteValue()Returns the value as a byte.XmlCalendargetCalendarValue()Returns the value as an XmlCalendar which extendsCalendar.DategetDateValue()Returns the value as aDate.doublegetDoubleValue()Returns the value as a double.floatgetFloatValue()Returns the value as a float.GDategetGDateValue()Returns the value as aGDate.GDurationgetGDurationValue()Returns the value as aGDuration.InputStreamgetHexBinaryValue()Returns the decoded hexbinary value as an InputStream.intgetIntValue()Returns the value as an int.longgetLongValue()Returns the value as a long.QNamegetQNameValue()Returns the value as aQName.shortgetShortValue()Returns the value as a short.StringgetStringValue()Returns the value as aString.StringgetStringValue(int wsStyle)Returns the value as aString, with wsStyle applied.voidsetDefaultValue(String defaultValue)Sets the default value for the next getXXXValue() call.-
Methods inherited from interface javax.xml.stream.XMLStreamReader
close, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getElementText, getEncoding, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getPIData, getPITarget, getPrefix, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasName, hasNext, hasText, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartElement, isWhiteSpace, next, nextTag, require, standaloneSet
-
-
-
-
Field Detail
-
WS_PRESERVE
static final int WS_PRESERVE
- See Also:
- Constant Field Values
-
WS_REPLACE
static final int WS_REPLACE
- See Also:
- Constant Field Values
-
WS_COLLAPSE
static final int WS_COLLAPSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStringValue
String getStringValue() throws XMLStreamException
Returns the value as aString.- Throws:
XMLStreamException
-
getStringValue
String getStringValue(int wsStyle) throws XMLStreamException
Returns the value as aString, with wsStyle applied.- Throws:
XMLStreamException
-
getBooleanValue
boolean getBooleanValue() throws XMLStreamExceptionReturns the value as a boolean.- Throws:
XMLStreamException
-
getByteValue
byte getByteValue() throws XMLStreamExceptionReturns the value as a byte.- Throws:
XMLStreamException
-
getShortValue
short getShortValue() throws XMLStreamExceptionReturns the value as a short.- Throws:
XMLStreamException
-
getIntValue
int getIntValue() throws XMLStreamExceptionReturns the value as an int.- Throws:
XMLStreamException
-
getLongValue
long getLongValue() throws XMLStreamExceptionReturns the value as a long.- Throws:
XMLStreamException
-
getBigIntegerValue
BigInteger getBigIntegerValue() throws XMLStreamException
Returns the value as aBigInteger.- Throws:
XMLStreamException
-
getBigDecimalValue
BigDecimal getBigDecimalValue() throws XMLStreamException
Returns the value as aBigDecimal.- Throws:
XMLStreamException
-
getFloatValue
float getFloatValue() throws XMLStreamExceptionReturns the value as a float.- Throws:
XMLStreamException
-
getDoubleValue
double getDoubleValue() throws XMLStreamExceptionReturns the value as a double.- Throws:
XMLStreamException
-
getHexBinaryValue
InputStream getHexBinaryValue() throws XMLStreamException
Returns the decoded hexbinary value as an InputStream.- Throws:
XMLStreamException
-
getBase64Value
InputStream getBase64Value() throws XMLStreamException
Returns the decoded base64 value as anInputStream.- Throws:
XMLStreamException
-
getCalendarValue
XmlCalendar getCalendarValue() throws XMLStreamException
Returns the value as an XmlCalendar which extendsCalendar.- Throws:
XMLStreamException
-
getDateValue
Date getDateValue() throws XMLStreamException
Returns the value as aDate.- Throws:
XMLStreamException
-
getGDateValue
GDate getGDateValue() throws XMLStreamException
Returns the value as aGDate.- Throws:
XMLStreamException
-
getGDurationValue
GDuration getGDurationValue() throws XMLStreamException
Returns the value as aGDuration.- Throws:
XMLStreamException
-
getQNameValue
QName getQNameValue() throws XMLStreamException
Returns the value as aQName.- Throws:
XMLStreamException
-
getAttributeStringValue
String getAttributeStringValue(int index) throws XMLStreamException
Returns the value as aString.- Throws:
XMLStreamException
-
getAttributeStringValue
String getAttributeStringValue(int index, int wsStyle) throws XMLStreamException
Returns the value as aString, with wsStyle applied.- Throws:
XMLStreamException
-
getAttributeBooleanValue
boolean getAttributeBooleanValue(int index) throws XMLStreamExceptionReturns the value as a boolean.- Throws:
XMLStreamException
-
getAttributeByteValue
byte getAttributeByteValue(int index) throws XMLStreamExceptionReturns the value as a byte.- Throws:
XMLStreamException
-
getAttributeShortValue
short getAttributeShortValue(int index) throws XMLStreamExceptionReturns the value as a short.- Throws:
XMLStreamException
-
getAttributeIntValue
int getAttributeIntValue(int index) throws XMLStreamExceptionReturns the value as an int.- Throws:
XMLStreamException
-
getAttributeLongValue
long getAttributeLongValue(int index) throws XMLStreamExceptionReturns the value as a long.- Throws:
XMLStreamException
-
getAttributeBigIntegerValue
BigInteger getAttributeBigIntegerValue(int index) throws XMLStreamException
Returns the value as aBigInteger.- Throws:
XMLStreamException
-
getAttributeBigDecimalValue
BigDecimal getAttributeBigDecimalValue(int index) throws XMLStreamException
Returns the value as aBigDecimal.- Throws:
XMLStreamException
-
getAttributeFloatValue
float getAttributeFloatValue(int index) throws XMLStreamExceptionReturns the value as a float.- Throws:
XMLStreamException
-
getAttributeDoubleValue
double getAttributeDoubleValue(int index) throws XMLStreamExceptionReturns the value as a double.- Throws:
XMLStreamException
-
getAttributeHexBinaryValue
InputStream getAttributeHexBinaryValue(int index) throws XMLStreamException
Returns the decoded hexbinary value as an InputStream.- Throws:
XMLStreamException
-
getAttributeBase64Value
InputStream getAttributeBase64Value(int index) throws XMLStreamException
Returns the decoded base64 value as anInputStream.- Throws:
XMLStreamException
-
getAttributeCalendarValue
XmlCalendar getAttributeCalendarValue(int index) throws XMLStreamException
Returns the value as an XmlCalendar which extendsCalendar.- Throws:
XMLStreamException
-
getAttributeDateValue
Date getAttributeDateValue(int index) throws XMLStreamException
Returns the value as aDate.- Throws:
XMLStreamException
-
getAttributeGDateValue
GDate getAttributeGDateValue(int index) throws XMLStreamException
Returns the value as aGDate.- Throws:
XMLStreamException
-
getAttributeGDurationValue
GDuration getAttributeGDurationValue(int index) throws XMLStreamException
Returns the value as aGDuration.- Throws:
XMLStreamException
-
getAttributeQNameValue
QName getAttributeQNameValue(int index) throws XMLStreamException
Returns the value as aQName.- Throws:
XMLStreamException
-
getAttributeStringValue
String getAttributeStringValue(String uri, String local) throws XMLStreamException
Returns the value as aString.- Throws:
XMLStreamException
-
getAttributeStringValue
String getAttributeStringValue(String uri, String local, int wsStyle) throws XMLStreamException
Returns the value as aString, with wsStyle applied.- Throws:
XMLStreamException
-
getAttributeBooleanValue
boolean getAttributeBooleanValue(String uri, String local) throws XMLStreamException
Returns the value as a boolean.- Throws:
XMLStreamException
-
getAttributeByteValue
byte getAttributeByteValue(String uri, String local) throws XMLStreamException
Returns the value as a byte.- Throws:
XMLStreamException
-
getAttributeShortValue
short getAttributeShortValue(String uri, String local) throws XMLStreamException
Returns the value as a short.- Throws:
XMLStreamException
-
getAttributeIntValue
int getAttributeIntValue(String uri, String local) throws XMLStreamException
Returns the value as an int.- Throws:
XMLStreamException
-
getAttributeLongValue
long getAttributeLongValue(String uri, String local) throws XMLStreamException
Returns the value as a long.- Throws:
XMLStreamException
-
getAttributeBigIntegerValue
BigInteger getAttributeBigIntegerValue(String uri, String local) throws XMLStreamException
Returns the value as aBigInteger.- Throws:
XMLStreamException
-
getAttributeBigDecimalValue
BigDecimal getAttributeBigDecimalValue(String uri, String local) throws XMLStreamException
Returns the value as aBigDecimal.- Throws:
XMLStreamException
-
getAttributeFloatValue
float getAttributeFloatValue(String uri, String local) throws XMLStreamException
Returns the value as a float.- Throws:
XMLStreamException
-
getAttributeDoubleValue
double getAttributeDoubleValue(String uri, String local) throws XMLStreamException
Returns the value as a double.- Throws:
XMLStreamException
-
getAttributeHexBinaryValue
InputStream getAttributeHexBinaryValue(String uri, String local) throws XMLStreamException
Returns the decoded hexbinary value as an InputStream.- Throws:
XMLStreamException
-
getAttributeBase64Value
InputStream getAttributeBase64Value(String uri, String local) throws XMLStreamException
Returns the decoded base64 value as anInputStream.- Throws:
XMLStreamException
-
getAttributeCalendarValue
XmlCalendar getAttributeCalendarValue(String uri, String local) throws XMLStreamException
Returns the value as an XmlCalendar which extendsCalendar.- Throws:
XMLStreamException
-
getAttributeDateValue
Date getAttributeDateValue(String uri, String local) throws XMLStreamException
Returns the value as aDate.- Throws:
XMLStreamException
-
getAttributeGDateValue
GDate getAttributeGDateValue(String uri, String local) throws XMLStreamException
Returns the value as aGDate.- Throws:
XMLStreamException
-
getAttributeGDurationValue
GDuration getAttributeGDurationValue(String uri, String local) throws XMLStreamException
Returns the value as aGDuration.- Throws:
XMLStreamException
-
getAttributeQNameValue
QName getAttributeQNameValue(String uri, String local) throws XMLStreamException
Returns the value as aQName.- Throws:
XMLStreamException
-
setDefaultValue
void setDefaultValue(String defaultValue) throws XMLStreamException
Sets the default value for the next getXXXValue() call. For example: setDefaultValue("7"); //the xml looks like: int i = getIntValue(); // returns 7 // from now on the default value will not apply anymore Note: Works for getAttributeXXXValue(...) too.- Throws:
XMLStreamException
-
-