Interface XMLStreamReaderExt
-
- All Superinterfaces:
javax.xml.stream.XMLStreamConstants,javax.xml.stream.XMLStreamReader
- All Known Implementing Classes:
XMLStreamReaderExtImpl
public interface XMLStreamReaderExt extends javax.xml.stream.XMLStreamReaderThis 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
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamgetAttributeBase64Value(int index)Returns the decoded base64 value as anInputStream.java.io.InputStreamgetAttributeBase64Value(java.lang.String uri, java.lang.String local)Returns the decoded base64 value as anInputStream.java.math.BigDecimalgetAttributeBigDecimalValue(int index)Returns the value as aBigDecimal.java.math.BigDecimalgetAttributeBigDecimalValue(java.lang.String uri, java.lang.String local)Returns the value as aBigDecimal.java.math.BigIntegergetAttributeBigIntegerValue(int index)Returns the value as aBigInteger.java.math.BigIntegergetAttributeBigIntegerValue(java.lang.String uri, java.lang.String local)Returns the value as aBigInteger.booleangetAttributeBooleanValue(int index)Returns the value as a boolean.booleangetAttributeBooleanValue(java.lang.String uri, java.lang.String local)Returns the value as a boolean.bytegetAttributeByteValue(int index)Returns the value as a byte.bytegetAttributeByteValue(java.lang.String uri, java.lang.String local)Returns the value as a byte.XmlCalendargetAttributeCalendarValue(int index)Returns the value as an XmlCalendar which extendsCalendar.XmlCalendargetAttributeCalendarValue(java.lang.String uri, java.lang.String local)Returns the value as an XmlCalendar which extendsCalendar.java.util.DategetAttributeDateValue(int index)Returns the value as aDate.java.util.DategetAttributeDateValue(java.lang.String uri, java.lang.String local)Returns the value as aDate.doublegetAttributeDoubleValue(int index)Returns the value as a double.doublegetAttributeDoubleValue(java.lang.String uri, java.lang.String local)Returns the value as a double.floatgetAttributeFloatValue(int index)Returns the value as a float.floatgetAttributeFloatValue(java.lang.String uri, java.lang.String local)Returns the value as a float.GDategetAttributeGDateValue(int index)Returns the value as aGDate.GDategetAttributeGDateValue(java.lang.String uri, java.lang.String local)Returns the value as aGDate.GDurationgetAttributeGDurationValue(int index)Returns the value as aGDuration.GDurationgetAttributeGDurationValue(java.lang.String uri, java.lang.String local)Returns the value as aGDuration.java.io.InputStreamgetAttributeHexBinaryValue(int index)Returns the decoded hexbinary value as an InputStream.java.io.InputStreamgetAttributeHexBinaryValue(java.lang.String uri, java.lang.String local)Returns the decoded hexbinary value as an InputStream.intgetAttributeIntValue(int index)Returns the value as an int.intgetAttributeIntValue(java.lang.String uri, java.lang.String local)Returns the value as an int.longgetAttributeLongValue(int index)Returns the value as a long.longgetAttributeLongValue(java.lang.String uri, java.lang.String local)Returns the value as a long.javax.xml.namespace.QNamegetAttributeQNameValue(int index)Returns the value as aQName.javax.xml.namespace.QNamegetAttributeQNameValue(java.lang.String uri, java.lang.String local)Returns the value as aQName.shortgetAttributeShortValue(int index)Returns the value as a short.shortgetAttributeShortValue(java.lang.String uri, java.lang.String local)Returns the value as a short.java.lang.StringgetAttributeStringValue(int index)Returns the value as aString.java.lang.StringgetAttributeStringValue(int index, int wsStyle)Returns the value as aString, with wsStyle applied.java.lang.StringgetAttributeStringValue(java.lang.String uri, java.lang.String local)Returns the value as aString.java.lang.StringgetAttributeStringValue(java.lang.String uri, java.lang.String local, int wsStyle)Returns the value as aString, with wsStyle applied.java.io.InputStreamgetBase64Value()Returns the decoded base64 value as anInputStream.java.math.BigDecimalgetBigDecimalValue()Returns the value as aBigDecimal.java.math.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.java.util.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.java.io.InputStreamgetHexBinaryValue()Returns the decoded hexbinary value as an InputStream.intgetIntValue()Returns the value as an int.longgetLongValue()Returns the value as a long.javax.xml.namespace.QNamegetQNameValue()Returns the value as aQName.shortgetShortValue()Returns the value as a short.java.lang.StringgetStringValue()Returns the value as aString.java.lang.StringgetStringValue(int wsStyle)Returns the value as aString, with wsStyle applied.voidsetDefaultValue(java.lang.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
java.lang.String getStringValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as aString.- Throws:
javax.xml.stream.XMLStreamException
-
getStringValue
java.lang.String getStringValue(int wsStyle) throws javax.xml.stream.XMLStreamExceptionReturns the value as aString, with wsStyle applied.- Throws:
javax.xml.stream.XMLStreamException
-
getBooleanValue
boolean getBooleanValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as a boolean.- Throws:
javax.xml.stream.XMLStreamException
-
getByteValue
byte getByteValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as a byte.- Throws:
javax.xml.stream.XMLStreamException
-
getShortValue
short getShortValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as a short.- Throws:
javax.xml.stream.XMLStreamException
-
getIntValue
int getIntValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as an int.- Throws:
javax.xml.stream.XMLStreamException
-
getLongValue
long getLongValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as a long.- Throws:
javax.xml.stream.XMLStreamException
-
getBigIntegerValue
java.math.BigInteger getBigIntegerValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as aBigInteger.- Throws:
javax.xml.stream.XMLStreamException
-
getBigDecimalValue
java.math.BigDecimal getBigDecimalValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as aBigDecimal.- Throws:
javax.xml.stream.XMLStreamException
-
getFloatValue
float getFloatValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as a float.- Throws:
javax.xml.stream.XMLStreamException
-
getDoubleValue
double getDoubleValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as a double.- Throws:
javax.xml.stream.XMLStreamException
-
getHexBinaryValue
java.io.InputStream getHexBinaryValue() throws javax.xml.stream.XMLStreamExceptionReturns the decoded hexbinary value as an InputStream.- Throws:
javax.xml.stream.XMLStreamException
-
getBase64Value
java.io.InputStream getBase64Value() throws javax.xml.stream.XMLStreamExceptionReturns the decoded base64 value as anInputStream.- Throws:
javax.xml.stream.XMLStreamException
-
getCalendarValue
XmlCalendar getCalendarValue() throws javax.xml.stream.XMLStreamException
Returns the value as an XmlCalendar which extendsCalendar.- Throws:
javax.xml.stream.XMLStreamException
-
getDateValue
java.util.Date getDateValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as aDate.- Throws:
javax.xml.stream.XMLStreamException
-
getGDateValue
GDate getGDateValue() throws javax.xml.stream.XMLStreamException
Returns the value as aGDate.- Throws:
javax.xml.stream.XMLStreamException
-
getGDurationValue
GDuration getGDurationValue() throws javax.xml.stream.XMLStreamException
Returns the value as aGDuration.- Throws:
javax.xml.stream.XMLStreamException
-
getQNameValue
javax.xml.namespace.QName getQNameValue() throws javax.xml.stream.XMLStreamExceptionReturns the value as aQName.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeStringValue
java.lang.String getAttributeStringValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as aString.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeStringValue
java.lang.String getAttributeStringValue(int index, int wsStyle) throws javax.xml.stream.XMLStreamExceptionReturns the value as aString, with wsStyle applied.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeBooleanValue
boolean getAttributeBooleanValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as a boolean.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeByteValue
byte getAttributeByteValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as a byte.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeShortValue
short getAttributeShortValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as a short.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeIntValue
int getAttributeIntValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as an int.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeLongValue
long getAttributeLongValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as a long.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeBigIntegerValue
java.math.BigInteger getAttributeBigIntegerValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as aBigInteger.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeBigDecimalValue
java.math.BigDecimal getAttributeBigDecimalValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as aBigDecimal.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeFloatValue
float getAttributeFloatValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as a float.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeDoubleValue
double getAttributeDoubleValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as a double.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeHexBinaryValue
java.io.InputStream getAttributeHexBinaryValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the decoded hexbinary value as an InputStream.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeBase64Value
java.io.InputStream getAttributeBase64Value(int index) throws javax.xml.stream.XMLStreamExceptionReturns the decoded base64 value as anInputStream.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeCalendarValue
XmlCalendar getAttributeCalendarValue(int index) throws javax.xml.stream.XMLStreamException
Returns the value as an XmlCalendar which extendsCalendar.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeDateValue
java.util.Date getAttributeDateValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as aDate.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeGDateValue
GDate getAttributeGDateValue(int index) throws javax.xml.stream.XMLStreamException
Returns the value as aGDate.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeGDurationValue
GDuration getAttributeGDurationValue(int index) throws javax.xml.stream.XMLStreamException
Returns the value as aGDuration.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeQNameValue
javax.xml.namespace.QName getAttributeQNameValue(int index) throws javax.xml.stream.XMLStreamExceptionReturns the value as aQName.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeStringValue
java.lang.String getAttributeStringValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as aString.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeStringValue
java.lang.String getAttributeStringValue(java.lang.String uri, java.lang.String local, int wsStyle) throws javax.xml.stream.XMLStreamExceptionReturns the value as aString, with wsStyle applied.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeBooleanValue
boolean getAttributeBooleanValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as a boolean.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeByteValue
byte getAttributeByteValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as a byte.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeShortValue
short getAttributeShortValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as a short.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeIntValue
int getAttributeIntValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as an int.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeLongValue
long getAttributeLongValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as a long.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeBigIntegerValue
java.math.BigInteger getAttributeBigIntegerValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as aBigInteger.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeBigDecimalValue
java.math.BigDecimal getAttributeBigDecimalValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as aBigDecimal.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeFloatValue
float getAttributeFloatValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as a float.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeDoubleValue
double getAttributeDoubleValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as a double.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeHexBinaryValue
java.io.InputStream getAttributeHexBinaryValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the decoded hexbinary value as an InputStream.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeBase64Value
java.io.InputStream getAttributeBase64Value(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the decoded base64 value as anInputStream.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeCalendarValue
XmlCalendar getAttributeCalendarValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamException
Returns the value as an XmlCalendar which extendsCalendar.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeDateValue
java.util.Date getAttributeDateValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as aDate.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeGDateValue
GDate getAttributeGDateValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamException
Returns the value as aGDate.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeGDurationValue
GDuration getAttributeGDurationValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamException
Returns the value as aGDuration.- Throws:
javax.xml.stream.XMLStreamException
-
getAttributeQNameValue
javax.xml.namespace.QName getAttributeQNameValue(java.lang.String uri, java.lang.String local) throws javax.xml.stream.XMLStreamExceptionReturns the value as aQName.- Throws:
javax.xml.stream.XMLStreamException
-
setDefaultValue
void setDefaultValue(java.lang.String defaultValue) throws javax.xml.stream.XMLStreamExceptionSets 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:
javax.xml.stream.XMLStreamException
-
-