|
API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface XItemView
Represents an item in the data model. Various properties of an item can be examined using this interface such as:
isAtomic method).getValueType and getValueTypeName methods).get*Value methods).getValueType method should be called to determine
which of the get*Value methods can be called for
this particular item, unless the type is already known.
XItemView extends XNodeView so that
items that are nodes can also be examined as nodes. The isAtomic
method should be called before using any of the XNodeView methods
as they are not valid for atomic items, unless it is known that the item
is not atomic. The XNodeView methods
will throw an exception if they are invoked for an atomic item.
Items can also be serialized using one of the exportItem
methods.
The XSequenceCursor
interface represents a sequence of items. It implements XItemView
so that as the sequence is traversed the individual items can be examined.
XNodeView,
XSequenceCursor| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.ibm.xml.xapi.XNodeView |
|---|
XNodeView.Kind |
| Method Summary | |
|---|---|
void |
exportItem(Result result)
Export to a Result using the default output parameter settings. |
void |
exportItem(Result result,
XOutputParameters parameters)
Export to a Result according to the specified output parameters. |
String |
getAnyURIValue()
Get the value as a Java String. |
byte[] |
getBase64BinaryValue()
Get the value as a Java byte array. |
boolean |
getBooleanValue()
Get the value as a Java boolean. |
byte |
getByteValue()
Get the value as a Java byte. |
XMLGregorianCalendar |
getDateTimeValue()
Get the value as a Java XMLGregorianCalendar. |
XMLGregorianCalendar |
getDateValue()
Get the value as a Java XMLGregorianCalendar. |
Duration |
getDayTimeDurationValue()
Get the value as a Java Duration. |
BigDecimal |
getDecimalValue()
Get the value as a Java BigDecimal. |
double |
getDoubleValue()
Get the value as a Java double. |
Duration |
getDurationValue()
Get the value as a Java Duration. |
float |
getFloatValue()
Get the value as a Java float. |
XMLGregorianCalendar |
getGDayValue()
Get the value as a Java XMLGregorianCalendar. |
XMLGregorianCalendar |
getGMonthDayValue()
Get the value as a Java XMLGregorianCalendar. |
XMLGregorianCalendar |
getGMonthValue()
Get the value as a Java XMLGregorianCalendar. |
XMLGregorianCalendar |
getGYearMonthValue()
Get the value as a Java XMLGregorianCalendar. |
XMLGregorianCalendar |
getGYearValue()
Get the value as a Java XMLGregorianCalendar. |
byte[] |
getHexBinaryValue()
Get the value as a Java byte array. |
BigInteger |
getIntegerValue()
Get the value as a Java BigInteger. |
int |
getIntValue()
Get the value as a Java int. |
XSequenceCursor |
getListValue()
Get the list of values as an XSequenceCursor. |
long |
getLongValue()
Get the value as a Java long. |
QName |
getNotationValue()
Get the value as a Java QName. |
Object |
getObjectValue(XTypeConstants.Type type)
Get the value as the specified type where the type is one of the enumerated values of XTypeConstants.Type. |
QName |
getQNameValue()
Get the value as a Java QName. |
short |
getShortValue()
Get the value as a Java short. |
String |
getStringValue()
Can be used for any type to return a string representation of that value. |
XMLGregorianCalendar |
getTimeValue()
Get the value as a Java XMLGregorianCalendar. |
XItemView |
getUnionValue()
Get the value inside the union as an XItemView. |
XTypeConstants.Type |
getValueType()
Get the enumerated type of the value. |
QName |
getValueTypeName()
Get the qualified schema type name of the value. |
Duration |
getYearMonthDurationValue()
Get the value as a Java Duration. |
boolean |
isAtomic()
Returns whether the item is atomic or not. |
| Methods inherited from interface com.ibm.xml.xapi.XNodeView |
|---|
getDOMNode, getKind, getNodeQName, getTreeCursor, isSameDocument, relativePosition |
| Method Detail |
|---|
boolean isAtomic()
XTypeConstants.Type getValueType()
Get the enumerated type of the value. If the
value is not atomic then XTypeConstants.Type.COMPLEX
is returned. For a union type, XTypeConstants.Type.UNION
will be returned. The getUnionValue method
can then be called to get an XItemView for
the value inside the union. For a list type,
XTypeConstants.Type.LIST will be returned.
The getListValue method can then be called
to get the actual list of values as an XSequenceCursor.
The getValueTypeName
method can be used to get the qualified schema type name.
XTypeConstants.Type,
getValueTypeName()QName getValueTypeName()
QName.byte getByteValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()short getShortValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()int getIntValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()long getLongValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()float getFloatValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()double getDoubleValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()boolean getBooleanValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()BigDecimal getDecimalValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()BigInteger getIntegerValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()byte[] getHexBinaryValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()byte[] getBase64BinaryValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()String getAnyURIValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()QName getQNameValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()QName getNotationValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XMLGregorianCalendar getDateValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XMLGregorianCalendar getDateTimeValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XMLGregorianCalendar getTimeValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XMLGregorianCalendar getGDayValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XMLGregorianCalendar getGMonthValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XMLGregorianCalendar getGMonthDayValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XMLGregorianCalendar getGYearValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XMLGregorianCalendar getGYearMonthValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()Duration getDurationValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()Duration getDayTimeDurationValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()Duration getYearMonthDurationValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XItemView getUnionValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()XSequenceCursor getListValue()
getValueType method first and
use the correct get*Value method based on the returned type.
XViewException - if the value cannot be converted.getValueType()Object getObjectValue(XTypeConstants.Type type)
XTypeConstants.Type.
If the type is UNTYPEDATOMIC a String object
will be returned. If the type is COMPLEX a DOM Node
will be returned. For other types the closest Java object will be
returned (Float for FLOAT,
XMLGregorianCalendar for DATE, etc.).
Throws an exception if the item cannot be converted to the given type.
To avoid exceptions call the getValueType method first and
use the correct get*Value method based on the returned type.
Object.
XViewException - if the value cannot be converted.
XViewException - if the value cannot be converted.XTypeConstants.Type,
getValueType()String getStringValue()
void exportItem(Result result,
XOutputParameters parameters)
Export to a Result according to the specified output parameters.
Note that standalone attribute and namespace nodes cannot be serialized.
See Sequence Normalization
for more details.
Supported Result types are:
result - The Result to export to.parameters - The output parameter settings. See
XOutputParameters.XOutputParametersvoid exportItem(Result result)
Export to a Result using the default output parameter settings.
Note that standalone attribute and namespace nodes cannot be serialized.
See Sequence Normalization
for more details.
Supported Result types are:
result - The Result to export to.
|
IBM Copyright 2004-2008 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||