Package org.apache.xmlbeans.impl.values
Class XmlUnionImpl
java.lang.Object
org.apache.xmlbeans.impl.values.XmlObjectBase
org.apache.xmlbeans.impl.values.XmlUnionImpl
- All Implemented Interfaces:
Serializable,TypeStoreUser,SimpleValue,XmlAnySimpleType,XmlObject,XmlTokenSource
public class XmlUnionImpl extends XmlObjectBase implements XmlAnySimpleType
This class implements simple union types.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class org.apache.xmlbeans.impl.values.XmlObjectBase
_voorVc, KIND_SETTERHELPER_ARRAYITEM, KIND_SETTERHELPER_SINGLETON, MAJOR_VERSION_NUMBER, MINOR_VERSION_NUMBER -
Constructor Summary
Constructors Constructor Description XmlUnionImpl(SchemaType type, boolean complex) -
Method Summary
Modifier and Type Method Description protected Stringcompute_text(NamespaceManager nsm)This should return the canonical string value of the primitive.protected booleanequal_to(XmlObject xmlobj)protected intget_wscanon_rule()Returns the whitespace rule that will be applied before building a string to pass to get_text().BigDecimalgetBigDecimalValue()Returns the value as aBigDecimal.BigIntegergetBigIntegerValue()Returns the value as aBigInteger.booleangetBooleanValue()Returns the value as a boolean.byte[]getByteArrayValue()Returns the value as a byte array.bytegetByteValue()Returns the value as a byte.CalendargetCalendarValue()Returns the value as aCalendar.DategetDateValue()Returns the value as aDate.doublegetDoubleValue()Returns the value as a double.StringEnumAbstractBasegetEnumValue()Returns the value as aStringEnumAbstractBase.floatgetFloatValue()Returns the value as a float.GDategetGDateValue()Returns the value as aGDate.GDurationgetGDurationValue()Returns the value as aGDuration.intgetIntValue()Returns the value as an int.List<?>getListValue()Returns the value as aListof friendly Java objects (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration).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.SchemaTypeinstanceType()The same as getSchemaType unless this is a union instance or nil value.protected booleanis_defaultable_ws(String v)Types should return false if they don't treat the given whitespace as a default value.SchemaTypeschemaType()protected voidset_b64(byte[] b)protected voidset_BigDecimal(BigDecimal v)protected voidset_BigInteger(BigInteger v)protected voidset_boolean(boolean v)protected voidset_byte(byte v)protected voidset_ByteArray(byte[] b)protected voidset_Calendar(Calendar c)protected voidset_Date(Date d)protected voidset_double(double v)protected voidset_enum(StringEnumAbstractBase e)protected voidset_float(float v)protected voidset_GDate(GDateSpecification d)protected voidset_GDuration(GDurationSpecification d)protected voidset_hex(byte[] b)protected voidset_int(int v)protected voidset_list(List<?> v)protected voidset_long(long v)protected voidset_nil()This should clear the value, and set it to whatever is supposed to be returned when the value is nilled.protected voidset_QName(QName v)protected voidset_short(short v)protected voidset_text(String s)This should set the value of the type from text, or throw an XmlValueOutOfRangeException if it can't.protected voidset_xmldate(XmlObject v)protected voidset_xmldatetime(XmlObject v)protected voidset_xmldecimal(XmlObject v)protected voidset_xmldouble(XmlObject v)protected voidset_xmlduration(XmlObject v)protected voidset_xmlfloat(XmlObject v)protected voidset_xmlgday(XmlObject v)protected voidset_xmlgmonth(XmlObject v)protected voidset_xmlgmonthday(XmlObject v)protected voidset_xmlgyear(XmlObject v)protected voidset_xmlgyearmonth(XmlObject v)protected voidset_xmltime(XmlObject v)protected voidvalidate_simpleval(String lexical, ValidationContext ctx)protected intvalue_hash_code()List<? extends XmlAnySimpleType>xgetListValue()Returns the value as aListof XmlAnySimpleType objects.Methods inherited from class org.apache.xmlbeans.impl.values.XmlObjectBase
_copy, _copy, _isComplexContent, _isComplexType, _set, _validateOnSet, attach_store, build_nil, build_text, changeType, check_dated, check_orphaned, compare_to, compareTo, compareValue, copy, copy, create_attribute_user, create_element_user, disconnect_store, documentProperties, dump, elementFlags, equals, execQuery, execQuery, generatedSetterHelperImpl, get_attribute_field, get_attribute_type, get_attributeflags, get_default_attribute_text, get_default_attribute_value, get_default_element_text, get_element_ending_delimiters, get_element_type, get_elementflags, get_schema_type, get_store, get_wscanon_text, getBooleanArray, getBooleanArray, getByteArray, getByteArray, getDomNode, getDoubleArray, getDoubleArray, getEnumArray, getEnumArray, getFloatArray, getFloatArray, getIntArray, getIntArray, getLongArray, getLongArray, getObjectArray, getObjectArray, getObjectValue, getShortArray, getShortArray, getXmlLocale, getXmlObjectArray, getXmlObjectArray, has_store, hashCode, init_flags, initComplexType, invalidate_element_order, invalidate_nilvalue, invalidate_value, is_child_element_order_sensitive, is_orphaned, isDefault, isDefaultable, isFixed, isImmutable, isInstanceOf, isNil, isNillable, java_value, monitor, new_visitor, newCursor, newCursorForce, newDomNode, newDomNode, newInputStream, newInputStream, newReader, newReader, newXMLStreamReader, newXMLStreamReader, save, save, save, save, save, save, save, save, selectAttribute, selectAttribute, selectAttributes, selectChildren, selectChildren, selectChildren, selectPath, selectPath, set, set_char, set_ComplexXml, set_newValue, set_notation, set_String, set_xmlanysimple, setBigDecimalValue, setBigIntegerValue, setBooleanValue, setByteArrayValue, setByteValue, setCalendarValue, setDateValue, setDoubleValue, setEnumValue, setFloatValue, setGDateValue, setGDateValue, setGDurationValue, setGDurationValue, setImmutable, setIntValue, setListValue, setLongValue, setNil, setObjectValue, setQNameValue, setShortValue, setStringValue, setValidateOnSet, substitute, toString, update_from_complex_content, uses_invalidate_value, validate, validate, validate_now, valueEquals, valueHashCode, writeReplace, xgetArray, xgetArray, xmlText, xmlTextMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.xmlbeans.XmlObject
changeType, compareTo, compareValue, copy, copy, execQuery, execQuery, isImmutable, isNil, selectAttribute, selectAttribute, selectAttributes, selectChildren, selectChildren, selectChildren, selectPath, selectPath, set, setNil, substitute, toString, validate, validate, valueEquals, valueHashCodeMethods inherited from interface org.apache.xmlbeans.XmlTokenSource
documentProperties, dump, getDomNode, monitor, newCursor, newDomNode, newDomNode, newInputStream, newInputStream, newReader, newReader, newXMLStreamReader, newXMLStreamReader, save, save, save, save, save, save, save, save, xmlText, xmlText
-
Constructor Details
-
Method Details
-
schemaType
- Specified by:
schemaTypein interfaceXmlObject- Specified by:
schemaTypein classXmlObjectBase- Returns:
- The schema type for this instance. This is a permanent, unchanging property of the instance.
-
instanceType
Description copied from interface:SimpleValueThe same as getSchemaType unless this is a union instance or nil value.For unions, this returns the non-union consituent type of this instance. This type may change if setters are called that cause the instance to change to another constituent type of the union.
For nil values, this returns null.
- Specified by:
instanceTypein interfaceSimpleValue- Overrides:
instanceTypein classXmlObjectBase
-
compute_text
Description copied from class:XmlObjectBaseThis should return the canonical string value of the primitive. Only called when non-nil.- Specified by:
compute_textin classXmlObjectBase
-
is_defaultable_ws
Description copied from class:XmlObjectBaseTypes should return false if they don't treat the given whitespace as a default value.- Overrides:
is_defaultable_wsin classXmlObjectBase
-
set_text
Description copied from class:XmlObjectBaseThis should set the value of the type from text, or throw an XmlValueOutOfRangeException if it can't.- Specified by:
set_textin classXmlObjectBase
-
set_nil
protected void set_nil()Description copied from class:XmlObjectBaseThis should clear the value, and set it to whatever is supposed to be returned when the value is nilled.- Specified by:
set_nilin classXmlObjectBase
-
get_wscanon_rule
protected int get_wscanon_rule()Description copied from class:XmlObjectBaseReturns the whitespace rule that will be applied before building a string to pass to get_text().Overridden by subclasses that don't need their text for set_text canonicalized; perhaps they already implement scanners that can deal with whitespace, and they know they have no regex pattern restrictions.
- Overrides:
get_wscanon_rulein classXmlObjectBase
-
getFloatValue
public float getFloatValue()Description copied from interface:SimpleValueReturns the value as a float.- Specified by:
getFloatValuein interfaceSimpleValue- Overrides:
getFloatValuein classXmlObjectBase
-
getDoubleValue
public double getDoubleValue()Description copied from interface:SimpleValueReturns the value as a double.- Specified by:
getDoubleValuein interfaceSimpleValue- Overrides:
getDoubleValuein classXmlObjectBase
-
getBigDecimalValue
Description copied from interface:SimpleValueReturns the value as aBigDecimal.- Specified by:
getBigDecimalValuein interfaceSimpleValue- Overrides:
getBigDecimalValuein classXmlObjectBase
-
getBigIntegerValue
Description copied from interface:SimpleValueReturns the value as aBigInteger.- Specified by:
getBigIntegerValuein interfaceSimpleValue- Overrides:
getBigIntegerValuein classXmlObjectBase
-
getByteValue
public byte getByteValue()Description copied from interface:SimpleValueReturns the value as a byte.- Specified by:
getByteValuein interfaceSimpleValue- Overrides:
getByteValuein classXmlObjectBase
-
getShortValue
public short getShortValue()Description copied from interface:SimpleValueReturns the value as a short.- Specified by:
getShortValuein interfaceSimpleValue- Overrides:
getShortValuein classXmlObjectBase
-
getIntValue
public int getIntValue()Description copied from interface:SimpleValueReturns the value as an int.- Specified by:
getIntValuein interfaceSimpleValue- Overrides:
getIntValuein classXmlObjectBase
-
getLongValue
public long getLongValue()Description copied from interface:SimpleValueReturns the value as a long.- Specified by:
getLongValuein interfaceSimpleValue- Overrides:
getLongValuein classXmlObjectBase
-
getByteArrayValue
public byte[] getByteArrayValue()Description copied from interface:SimpleValueReturns the value as a byte array.- Specified by:
getByteArrayValuein interfaceSimpleValue- Overrides:
getByteArrayValuein classXmlObjectBase
-
getBooleanValue
public boolean getBooleanValue()Description copied from interface:SimpleValueReturns the value as a boolean.- Specified by:
getBooleanValuein interfaceSimpleValue- Overrides:
getBooleanValuein classXmlObjectBase
-
getCalendarValue
Description copied from interface:SimpleValueReturns the value as aCalendar.- Specified by:
getCalendarValuein interfaceSimpleValue- Overrides:
getCalendarValuein classXmlObjectBase
-
getDateValue
Description copied from interface:SimpleValueReturns the value as aDate.- Specified by:
getDateValuein interfaceSimpleValue- Overrides:
getDateValuein classXmlObjectBase
-
getGDateValue
Description copied from interface:SimpleValueReturns the value as aGDate.- Specified by:
getGDateValuein interfaceSimpleValue- Overrides:
getGDateValuein classXmlObjectBase
-
getGDurationValue
Description copied from interface:SimpleValueReturns the value as aGDuration.- Specified by:
getGDurationValuein interfaceSimpleValue- Overrides:
getGDurationValuein classXmlObjectBase
-
getQNameValue
Description copied from interface:SimpleValueReturns the value as aQName.- Specified by:
getQNameValuein interfaceSimpleValue- Overrides:
getQNameValuein classXmlObjectBase
-
getListValue
Description copied from interface:SimpleValueReturns the value as aListof friendly Java objects (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration).- Specified by:
getListValuein interfaceSimpleValue- Overrides:
getListValuein classXmlObjectBase
-
xgetListValue
Description copied from interface:SimpleValueReturns the value as aListof XmlAnySimpleType objects.- Specified by:
xgetListValuein interfaceSimpleValue- Overrides:
xgetListValuein classXmlObjectBase
-
getEnumValue
Description copied from interface:SimpleValueReturns the value as aStringEnumAbstractBase.- Specified by:
getEnumValuein interfaceSimpleValue- Overrides:
getEnumValuein classXmlObjectBase
-
getStringValue
Description copied from interface:SimpleValueReturns the value as aString.- Specified by:
getStringValuein interfaceSimpleValue- Specified by:
getStringValuein interfaceXmlAnySimpleType- Overrides:
getStringValuein classXmlObjectBase
-
set_boolean
protected void set_boolean(boolean v)- Overrides:
set_booleanin classXmlObjectBase
-
set_byte
protected void set_byte(byte v)- Overrides:
set_bytein classXmlObjectBase
-
set_short
protected void set_short(short v)- Overrides:
set_shortin classXmlObjectBase
-
set_int
protected void set_int(int v)- Overrides:
set_intin classXmlObjectBase
-
set_long
protected void set_long(long v)- Overrides:
set_longin classXmlObjectBase
-
set_float
protected void set_float(float v)- Overrides:
set_floatin classXmlObjectBase
-
set_double
protected void set_double(double v)- Overrides:
set_doublein classXmlObjectBase
-
set_ByteArray
protected void set_ByteArray(byte[] b)- Overrides:
set_ByteArrayin classXmlObjectBase
-
set_hex
protected void set_hex(byte[] b)- Overrides:
set_hexin classXmlObjectBase
-
set_b64
protected void set_b64(byte[] b)- Overrides:
set_b64in classXmlObjectBase
-
set_BigInteger
- Overrides:
set_BigIntegerin classXmlObjectBase
-
set_BigDecimal
- Overrides:
set_BigDecimalin classXmlObjectBase
-
set_QName
- Overrides:
set_QNamein classXmlObjectBase
-
set_Calendar
- Overrides:
set_Calendarin classXmlObjectBase
-
set_Date
- Overrides:
set_Datein classXmlObjectBase
-
set_GDate
- Overrides:
set_GDatein classXmlObjectBase
-
set_GDuration
- Overrides:
set_GDurationin classXmlObjectBase
-
set_enum
- Overrides:
set_enumin classXmlObjectBase
-
set_list
- Overrides:
set_listin classXmlObjectBase
-
set_xmlfloat
-
set_xmldouble
-
set_xmldecimal
-
set_xmlduration
-
set_xmldatetime
-
set_xmltime
-
set_xmldate
-
set_xmlgyearmonth
-
set_xmlgyear
-
set_xmlgmonthday
-
set_xmlgday
-
set_xmlgmonth
-
equal_to
- Specified by:
equal_toin classXmlObjectBase
-
value_hash_code
protected int value_hash_code()- Specified by:
value_hash_codein classXmlObjectBase
-
validate_simpleval
- Overrides:
validate_simplevalin classXmlObjectBase
-