public abstract class FilterXmlObject extends java.lang.Object implements XmlObject, SimpleValue, DelegateXmlObject
Note: it is important that FilterXmlObject has no storage (i.e., no non-transient fields), because subclasses may be serializable and adding storage would break the serialization format.
XmlObject.Factory| Constructor and Description |
|---|
FilterXmlObject() |
| Modifier and Type | Method and Description |
|---|---|
java.math.BigDecimal |
bigDecimalValue()
Deprecated.
replaced with
getBigDecimalValue() |
java.math.BigInteger |
bigIntegerValue()
Deprecated.
replaced with
getBigIntegerValue() |
boolean |
booleanValue()
Deprecated.
replaced with
getBooleanValue() |
byte[] |
byteArrayValue()
Deprecated.
replaced with
getByteArrayValue() |
byte |
byteValue()
Deprecated.
replaced with
getByteValue() |
java.util.Calendar |
calendarValue()
Deprecated.
replaced with
getCalendarValue() |
XmlObject |
changeType(SchemaType newType)
Changes the schema type associated with this data and
returns a new XmlObject instance whose schemaType is the
new type.
|
int |
compareTo(java.lang.Object obj)
Impelements the Comparable interface by comparing two simple
xml values based on their standard XML schema ordering.
|
int |
compareValue(XmlObject obj)
This comparison method is similar to compareTo, but rather
than throwing a ClassCastException when two values are incomparable,
it returns the number 2.
|
XmlObject |
copy()
Returns a deep copy of this XmlObject.
|
XmlObject |
copy(XmlOptions options)
Returns a deep copy of this XmlObject.
|
java.util.Date |
dateValue()
Deprecated.
replaced with
getDateValue() |
XmlDocumentProperties |
documentProperties()
Returns the XmlDocumentProperties object for the document this token
source is associated with.
|
double |
doubleValue()
Deprecated.
replaced with
getDoubleValue() |
StringEnumAbstractBase |
enumValue()
Deprecated.
replaced with
getEnumValue() |
XmlObject[] |
execQuery(java.lang.String query)
Executes a query.
|
XmlObject[] |
execQuery(java.lang.String query,
XmlOptions options)
Executes a query with options.
|
float |
floatValue()
Deprecated.
replaced with
getFloatValue() |
GDate |
gDateValue()
Deprecated.
replaced with
getGDateValue() |
GDuration |
gDurationValue()
Deprecated.
replaced with
getGDurationValue() |
java.math.BigDecimal |
getBigDecimalValue()
Returns the value as a
BigDecimal. |
java.math.BigInteger |
getBigIntegerValue()
Returns the value as a
BigInteger. |
boolean |
getBooleanValue()
Returns the value as a boolean.
|
byte[] |
getByteArrayValue()
Returns the value as a byte array.
|
byte |
getByteValue()
Returns the value as a byte.
|
java.util.Calendar |
getCalendarValue()
Returns the value as a
Calendar. |
java.util.Date |
getDateValue()
Returns the value as a
Date. |
Node |
getDomNode()
Returns a W3C DOM Node containing the XML represented by this source.
|
double |
getDoubleValue()
Returns the value as a double.
|
StringEnumAbstractBase |
getEnumValue()
Returns the value as a
StringEnumAbstractBase. |
float |
getFloatValue()
Returns the value as a float.
|
GDate |
getGDateValue()
Returns the value as a
GDate. |
GDuration |
getGDurationValue()
Returns the value as a
GDuration. |
int |
getIntValue()
Returns the value as an int.
|
java.util.List |
getListValue()
Returns the value as a
List of friendly Java objects (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration). |
long |
getLongValue()
Returns the value as a long.
|
java.lang.Object |
getObjectValue()
Returns a union value as a its natural friendly Java object (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration).
|
javax.xml.namespace.QName |
getQNameValue()
Returns the value as a
QName. |
short |
getShortValue()
Returns the value as a short.
|
java.lang.String |
getStringValue()
Returns the value as a
String. |
SchemaType |
instanceType()
The same as getSchemaType unless this is a union instance
or nil value.
|
int |
intValue()
Deprecated.
replaced with
getIntValue() |
boolean |
isImmutable()
Immutable values do not have a position in a tree; rather, they are
stand-alone simple type values.
|
boolean |
isNil()
Note that in order to be nil,
the value must be in an element, and the element containing
the value must be marked as nillable in the schema.
|
java.util.List |
listValue()
Deprecated.
replaced with
getListValue() |
long |
longValue()
Deprecated.
replaced with
getLongValue() |
java.lang.Object |
monitor()
Returns the synchronization object for the document.
|
XmlCursor |
newCursor()
Returns a new XML cursor.
|
Node |
newDomNode()
Returns a W3C DOM Node containing the XML
represented by this source.
|
Node |
newDomNode(XmlOptions options)
Just like newDomNode() but with options.
|
java.io.InputStream |
newInputStream()
Returns a new stream containing standard XML text, encoded
according to the given encoding.
|
java.io.InputStream |
newInputStream(XmlOptions options)
Just like newInputStream(String encoding) but with options.
|
java.io.Reader |
newReader()
Returns a new character reader containing XML text.
|
java.io.Reader |
newReader(XmlOptions options)
Just like newReader() but with options.
|
org.apache.xmlbeans.xml.stream.XMLInputStream |
newXMLInputStream()
Deprecated.
Deprecated by XMLStreamReader from STaX - jsr173 API.
|
org.apache.xmlbeans.xml.stream.XMLInputStream |
newXMLInputStream(XmlOptions options)
Deprecated.
Deprecated by XMLStreamReader from STaX - jsr173 API.
|
javax.xml.stream.XMLStreamReader |
newXMLStreamReader()
Returns a new XMLStreamReader.
|
javax.xml.stream.XMLStreamReader |
newXMLStreamReader(XmlOptions options)
Just like newXMLInputStream() but with options.
|
void |
objectSet(java.lang.Object obj)
Deprecated.
replaced with
setObjectValue(java.lang.Object) |
java.lang.Object |
objectValue()
Deprecated.
replaced with
getObjectValue() |
javax.xml.namespace.QName |
qNameValue()
Deprecated.
replaced with
getQNameValue() |
void |
save(ContentHandler ch,
LexicalHandler lh)
Writes the XML represented by this source to the given SAX content and
lexical handlers.
|
void |
save(ContentHandler ch,
LexicalHandler lh,
XmlOptions options)
Writes the XML represented by this source to the given SAX content and
lexical handlers.
|
void |
save(java.io.File file)
Writes the XML represented by this source to the given File.
|
void |
save(java.io.File file,
XmlOptions options)
Writes the XML represented by this source to the given File.
|
void |
save(java.io.OutputStream os)
Writes the XML represented by this source to the given output stream.
|
void |
save(java.io.OutputStream os,
XmlOptions options)
Writes the XML represented by this source to the given output stream.
|
void |
save(java.io.Writer w)
Writes the XML represented by this source to the given output.
|
void |
save(java.io.Writer w,
XmlOptions options)
Writes the XML represented by this source to the given output.
|
SchemaType |
schemaType() |
XmlObject |
selectAttribute(javax.xml.namespace.QName attributeName)
Selects the content of the attribute with the given name.
|
XmlObject |
selectAttribute(java.lang.String attributeUri,
java.lang.String attributeLocalName)
Selects the content of the attribute with the given name.
|
XmlObject[] |
selectAttributes(QNameSet attributeNameSet)
Selects the contents of the attributes that are contained in the elementNameSet.
|
XmlObject[] |
selectChildren(javax.xml.namespace.QName elementName)
Selects the contents of the children elements with the given name.
|
XmlObject[] |
selectChildren(QNameSet elementNameSet)
Selects the contents of the children elements that are contained in the elementNameSet.
|
XmlObject[] |
selectChildren(java.lang.String elementUri,
java.lang.String elementLocalName)
Selects the contents of the children elements with the given name.
|
XmlObject[] |
selectPath(java.lang.String path)
Selects a path.
|
XmlObject[] |
selectPath(java.lang.String path,
XmlOptions options)
Selects a path, applying options.
|
void |
set(java.math.BigDecimal obj)
Deprecated.
replaced with
setBigDecimalValue(java.math.BigDecimal) |
void |
set(java.math.BigInteger obj)
Deprecated.
replaced with
setBigIntegerValue(java.math.BigInteger) |
void |
set(boolean v)
Deprecated.
replaced with
setBooleanValue(boolean) |
void |
set(byte v)
Deprecated.
replaced with
setByteValue(byte) |
void |
set(byte[] obj)
Deprecated.
replaced with
setByteArrayValue(byte[]) |
void |
set(java.util.Calendar obj)
Deprecated.
replaced with
setCalendarValue(java.util.Calendar) |
void |
set(java.util.Date obj)
Deprecated.
replaced with
setDateValue(java.util.Date) |
void |
set(double v)
Deprecated.
replaced with
setDoubleValue(double) |
void |
set(float v)
Deprecated.
replaced with
setFloatValue(float) |
void |
set(GDateSpecification obj)
Deprecated.
replaced with
setGDateValue(org.apache.xmlbeans.GDate) |
void |
set(GDurationSpecification obj)
Deprecated.
replaced with
setGDurationValue(org.apache.xmlbeans.GDuration) |
void |
set(int v)
Deprecated.
replaced with
setIntValue(int) |
void |
set(java.util.List obj)
Deprecated.
replaced with
setListValue(java.util.List) |
void |
set(long v)
Deprecated.
replaced with
setLongValue(long) |
void |
set(javax.xml.namespace.QName obj)
Deprecated.
replaced with
setQNameValue(javax.xml.namespace.QName) |
void |
set(short v)
Deprecated.
replaced with
setShortValue(short) |
void |
set(java.lang.String obj)
Deprecated.
replaced with
setStringValue(java.lang.String) |
void |
set(StringEnumAbstractBase obj)
Deprecated.
replaced with
setEnumValue(org.apache.xmlbeans.StringEnumAbstractBase) |
XmlObject |
set(XmlObject srcObj)
Set the value/type of this XmlObject to be a copy of the source
XmlObject.
|
void |
setBigDecimalValue(java.math.BigDecimal obj)
Sets the value as a
BigDecimal. |
void |
setBigIntegerValue(java.math.BigInteger obj)
Sets the value as a
BigInteger. |
void |
setBooleanValue(boolean v)
Sets the value as a boolean.
|
void |
setByteArrayValue(byte[] obj)
Sets the value as a byte array.
|
void |
setByteValue(byte v)
Sets the value as a byte.
|
void |
setCalendarValue(java.util.Calendar obj)
Sets the value as a
Calendar. |
void |
setDateValue(java.util.Date obj)
Sets the value as a
Date. |
void |
setDoubleValue(double v)
Sets the value as a double.
|
void |
setEnumValue(StringEnumAbstractBase obj)
Sets the value as a
StringEnumAbstractBase. |
void |
setFloatValue(float v)
Sets the value as a float.
|
void |
setGDateValue(GDate obj)
Sets the value as a
GDate. |
void |
setGDurationValue(GDuration obj)
Sets the value as a
GDuration. |
void |
setIntValue(int v)
Sets the value as an int.
|
void |
setListValue(java.util.List obj)
Sets the value as a
List. |
void |
setLongValue(long v)
Sets the value as a long.
|
void |
setNil()
Sets the value to nil.
|
void |
setObjectValue(java.lang.Object obj)
Sets the value as an arbitrary
Object. |
void |
setQNameValue(javax.xml.namespace.QName obj)
Sets the value as a
QName. |
void |
setShortValue(short v)
Sets the value as a short.
|
void |
setStringValue(java.lang.String obj)
Sets the value as a
String. |
short |
shortValue()
Deprecated.
replaced with
getShortValue() |
java.lang.String |
stringValue()
Deprecated.
replaced with
getStringValue() |
boolean |
validate()
Does a deep validation of the entire subtree under the
object, but does not validate the parents or siblings
of the object if the object is in the interior of an xml
tree.
|
boolean |
validate(XmlOptions options)
Just like validate(), but with options.
|
boolean |
valueEquals(XmlObject obj)
True if the xml values are equal.
|
int |
valueHashCode() |
java.util.List |
xgetListValue()
Returns the value as a
List of XmlAnySimpleType objects. |
java.util.List |
xlistValue()
Deprecated.
replaced with
getListValue() |
java.lang.String |
xmlText()
Returns standard XML text.
|
java.lang.String |
xmlText(XmlOptions options)
Just like xmlText() but with options.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsubstitute, toStringdumpunderlyingXmlObjectpublic SchemaType schemaType()
schemaType in interface XmlObjectpublic boolean validate()
XmlObjectpublic boolean validate(XmlOptions options)
XmlObjectJust like validate(), but with options.
If you wish to collect error messages and locations while validating,
use the XmlOptions.setErrorListener(java.util.Collection) method. With that method,
you can specify an object in which to store messages related to validation.
The following is a simple example.
// Create an XmlOptions instance and set the error listener.
XmlOptions validateOptions = new XmlOptions();
ArrayList errorList = new ArrayList();
validateOptions.setErrorListener(errorList);
// Validate the XML.
boolean isValid = newEmp.validate(validateOptions);
// If the XML isn't valid, loop through the listener's contents,
// printing contained messages.
if (!isValid)
{
for (int i = 0; i < errorList.size(); i++)
{
XmlError error = (XmlError)errorList.get(i);
System.out.println("\n");
System.out.println("Message: " + error.getMessage() + "\n");
System.out.println("Location of invalid XML: " +
error.getCursorLocation().xmlText() + "\n");
}
}
public XmlObject[] selectPath(java.lang.String path)
XmlObjectThe path must be a relative path, where "." represents the element or attribute containg this XmlObject, and it must select only other elements or attributes. If a non-element or non-attribute is selected, an unchecked exception is thrown.
The array that is returned contains all the selected XmlObjects, within the same document, listed in document order. The actual array type of the result is inferred from the closest common base type of selected results.
Here is an example of usage. Suppose we have a global element definition for "owner" whose type is "person":
<schema targetNamespace="http://openuri.org/sample">
<element name="owner" type="person"/>
<complexType name="person">
[...]
</complexType>
</schema>
and suppose "owner" tags can be scattered throughout the
document. Then we can write the following code to find
them all:
import org.openuri.sample.Person;
import org.apache.xmlbeans.*;
[...]
XmlObject xobj = XmlObject.Factory.parse(myFile);
Person[] results;
results = (Person[])xobj.selectPath(
"declare namespace s='http://www.openuri.org/sample' " +
".//s:owner");
Notice the way in which namespace declarations are done in XPath 2.0.
Since XPath can only navigate within an XML document - it cannot
construct new XML - the resulting XmlObjects all reside in
the same XML document as this XmlObject itself.selectPath in interface XmlObjectpath - the xpathpublic XmlObject[] selectPath(java.lang.String path, XmlOptions options)
XmlObjectselectPath in interface XmlObjectpath - the xpathoptions - the options used to execute the xpathXmlObject.selectPath(String)public XmlObject[] execQuery(java.lang.String query)
XmlObjectAn XQuery is very similar to an XPath, except that it also permits construction of new XML. As a result, the XmlObjects that are returned from execQuery are in newly created documents, separate from the XmlObject on which the query is executed.
Syntax and usage is otherwise similar to selectPath.
execQuery in interface XmlObjectquery - The XQuery expressionXmlObject.selectPath(String)public XmlObject[] execQuery(java.lang.String query, XmlOptions options)
XmlObject| To specify this | Use this method |
|---|---|
| The document type for the root element. | XmlOptions.setDocumentType(org.apache.xmlbeans.SchemaType) |
| To replace the document element with the specified QName when constructing the resulting document. | XmlOptions.setLoadReplaceDocumentElement(javax.xml.namespace.QName) |
| To strip all insignificant whitespace when constructing a document. | XmlOptions.setLoadStripWhitespace() |
| To strip all comments when constructing a document. | XmlOptions.setLoadStripComments() |
| To strip all processing instructions when constructing a document. | XmlOptions.setLoadStripProcinsts() |
| A map of namespace URI substitutions to use when constructing a document. | XmlOptions.setLoadSubstituteNamespaces(java.util.Map) |
| Additional namespace mappings to be added when constructing a document. | XmlOptions.setLoadAdditionalNamespaces(java.util.Map) |
| To trim the underlying XML text buffer immediately after constructing a document, resulting in a smaller memory footprint. | XmlOptions.setLoadTrimTextBuffer() |
| Whether value facets should be checked as they are set. | XmlOptions.setValidateOnSet() |
execQuery in interface XmlObjectquery - The XQuery expression.options - Options as described.XmlObject.execQuery(String)public XmlObject changeType(SchemaType newType)
XmlObjectReturns the new XmlObject if the type change was successful, the old XmlObject if no changes could be made.
Certain type changes may be prohibited in the interior of an xml tree due to schema type system constraints (that is, due to a parent container within which the newly specified type is not permissible), but there are no constraints at the roottype changes are never prohibited at the root of an xml tree.If the type change is allowed, then the new XmlObject should be used rather than the old one. The old XmlObject instance and any other XmlObject instances in the subtree are permanently invalidated and should not be used. (They will return XmlValueDisconnectedException if you try to use them.) If a type change is done on the interior of an Xml tree, then xsi:type attributes are updated as needed.
changeType in interface XmlObjectpublic boolean isNil()
XmlObjectpublic void setNil()
XmlObjectpublic boolean isImmutable()
XmlObjectisImmutable in interface XmlObjectpublic XmlObject set(XmlObject srcObj)
XmlObjectpublic XmlObject copy()
XmlObjectcopy in interface XmlObjectXmlObject.copy(XmlOptions),
XmlOptions.setCopyUseNewSynchronizationDomain(boolean)public XmlObject copy(XmlOptions options)
XmlObjectcopy in interface XmlObjectXmlOptions.setCopyUseNewSynchronizationDomain(boolean)public boolean valueEquals(XmlObject obj)
XmlObjectUsually this method can be treated as an ordinary equvalence relation, but actually it is not is not transitive. Here is a precise specification:
There are two categories of XML object: objects with a known instance type, and objects whose only known type is one of the ur-types (either AnyType or AnySimpleType). The first category is compared in terms of logical value spaces, and the second category is compared lexically.
Within each of these two categories, valueEquals is a well-behaved equivalence relation. However, when comparing an object of known type with an object with ur-type, the comparison is done by attempting to convert the lexical form of the ur-typed object into the other type, and then comparing the results. Ur-typed objects are therefore treated as lexical wildcards and may be equal to objects in different value spaces, even though the objects in different value spaces are not equal to each other.
For example, the anySimpleType value "1" will compare as an equalValue to the string "1", the float value "1.0", the double value "1.0", the decimal "1", and the GYear "1", even though all these objects will compare unequal to each other since they lie in different value spaces. Note: as of XMLBeans 2.2.1 only implemented for simple type values.
valueEquals in interface XmlObjectpublic int valueHashCode()
valueHashCode in interface XmlObjectpublic int compareTo(java.lang.Object obj)
XmlObjectpublic int compareValue(XmlObject obj)
XmlObjectcompareValue in interface XmlObjectpublic java.lang.Object monitor()
XmlTokenSourcemonitor in interface XmlTokenSourcepublic XmlDocumentProperties documentProperties()
XmlTokenSourcedocumentProperties in interface XmlTokenSourcepublic XmlCursor newCursor()
XmlTokenSourcenewCursor in interface XmlTokenSourcepublic org.apache.xmlbeans.xml.stream.XMLInputStream newXMLInputStream()
XmlTokenSourcenewXMLInputStream in interface XmlTokenSourcepublic javax.xml.stream.XMLStreamReader newXMLStreamReader()
XmlTokenSourcenewXMLStreamReader in interface XmlTokenSourcepublic java.lang.String xmlText()
XmlTokenSourceThe text returned represents the document contents starting at the current begin-tag or begin-document and ending at the matching end-tag or end-document. This is same content as newReader, but it is returned as a single string.
Throws an IllegalStateException if the XmlTokenSource is not positioned at begin-tag or begin-document (e.g., if it is at an attribute).
Note that this method does not produce XML with the XML declaration,
including the encoding information. To save the XML declaration with
the XML, see XmlTokenSource.save(OutputStream) or XmlTokenSource.save(OutputStream, XmlOptions).
xmlText in interface XmlTokenSourcepublic java.io.InputStream newInputStream()
XmlTokenSourcenewInputStream in interface XmlTokenSourcepublic java.io.Reader newReader()
XmlTokenSourcenewReader in interface XmlTokenSourcepublic Node newDomNode()
XmlTokenSourcenewDomNode in interface XmlTokenSourcepublic Node getDomNode()
XmlTokenSourcegetDomNode in interface XmlTokenSourcepublic void save(ContentHandler ch, LexicalHandler lh) throws SAXException
XmlTokenSourceXmlTokenSource.save(OutputStream),
XmlTokenSource.save(OutputStream, XmlOptions), XmlTokenSource.save(File) or XmlTokenSource.save(File, XmlOptions).save in interface XmlTokenSourceSAXExceptionpublic void save(java.io.File file)
throws java.io.IOException
XmlTokenSourcesave in interface XmlTokenSourcejava.io.IOExceptionpublic void save(java.io.OutputStream os)
throws java.io.IOException
XmlTokenSourcesave in interface XmlTokenSourcejava.io.IOExceptionpublic void save(java.io.Writer w)
throws java.io.IOException
XmlTokenSourceXmlTokenSource.save(OutputStream),
XmlTokenSource.save(OutputStream, XmlOptions), XmlTokenSource.save(File) or XmlTokenSource.save(File, XmlOptions).save in interface XmlTokenSourcejava.io.IOExceptionpublic org.apache.xmlbeans.xml.stream.XMLInputStream newXMLInputStream(XmlOptions options)
XmlTokenSourceJust like newXMLInputStream() but with any of a number of options. Use the options parameter to specify the following:
| To specify this | Use this method |
|---|---|
| The character encoding to use when converting the character data in the XML to bytess. | XmlOptions.setCharacterEncoding(java.lang.String) |
| Prefix-to-namespace mappings that should be assumed when saving this XML. This is useful when the resulting XML will be part of a larger XML document, ensuring that this inner document will take advantage of namespaces defined in the outer document. | XmlOptions.setSaveImplicitNamespaces(java.util.Map) |
| Suggested namespace prefixes to use when saving. Used only when a namespace attribute needs to be synthesized. | XmlOptions.setSaveSuggestedPrefixes(java.util.Map) |
| That namespace attributes should occur first in elements when the XML is saved. By default, they occur last. | XmlOptions.setSaveNamespacesFirst() |
| The XML should be pretty printed when saved. Note that this should only be used for debugging. | XmlOptions.setSavePrettyPrint() |
| The number of spaces to use when indenting for pretty printing. The default is 2. | XmlOptions.setSavePrettyPrintIndent(int) |
| The additional number of spaces indented from the left for pretty printed XML. | XmlOptions.setSavePrettyPrintOffset(int) |
| To minimize the number of namespace attributes generated for the saved XML. Note that this can reduce performance significantly. | XmlOptions.setSaveAggresiveNamespaces() |
| To reduce the size of the saved document by allowing the use of the default namespace. Note that this can potentially change the semantic meaning of the XML if unprefixed QNames are present as the value of an attribute or element. | XmlOptions.setUseDefaultNamespace() |
| To filter out processing instructions with the specified target name. | XmlOptions.setSaveFilterProcinst(java.lang.String) |
| Change the QName of the synthesized root element when saving. This replaces "xml-fragment" with "fragment" in the namespace http://www.openuri.org/fragment | XmlOptions.setSaveUseOpenFrag() |
| Saving should begin on the element's contents. | XmlOptions.setSaveInner() |
| Saving should begin on the element, rather than its contents. | XmlOptions.setSaveOuter() |
| To rename the document element, or to specify the document element for this XML. | XmlOptions.setSaveSyntheticDocumentElement(javax.xml.namespace.QName) |
newXMLInputStream in interface XmlTokenSourceoptions - Any of the described options.XmlOptionspublic javax.xml.stream.XMLStreamReader newXMLStreamReader(XmlOptions options)
XmlTokenSourcenewXMLStreamReader in interface XmlTokenSourceXmlOptionspublic java.lang.String xmlText(XmlOptions options)
XmlTokenSource
Note that this method does not produce XML with the XML declaration,
including the encoding information. To save the XML declaration with
the XML, see XmlTokenSource.save(OutputStream) or XmlTokenSource.save(OutputStream, XmlOptions).
xmlText in interface XmlTokenSourceXmlOptionspublic java.io.InputStream newInputStream(XmlOptions options)
XmlTokenSourcenewInputStream in interface XmlTokenSourceXmlOptionspublic java.io.Reader newReader(XmlOptions options)
XmlTokenSourcenewReader in interface XmlTokenSourceXmlOptionspublic Node newDomNode(XmlOptions options)
XmlTokenSourcenewDomNode in interface XmlTokenSourceXmlOptionspublic void save(ContentHandler ch, LexicalHandler lh, XmlOptions options) throws SAXException
XmlTokenSourceXmlTokenSource.save(OutputStream),
XmlTokenSource.save(OutputStream, XmlOptions), XmlTokenSource.save(File) or XmlTokenSource.save(File, XmlOptions).save in interface XmlTokenSourceSAXExceptionpublic void save(java.io.File file,
XmlOptions options)
throws java.io.IOException
XmlTokenSourcesave in interface XmlTokenSourcejava.io.IOExceptionpublic void save(java.io.OutputStream os,
XmlOptions options)
throws java.io.IOException
XmlTokenSourcesave in interface XmlTokenSourcejava.io.IOExceptionpublic void save(java.io.Writer w,
XmlOptions options)
throws java.io.IOException
XmlTokenSourceXmlTokenSource.save(OutputStream),
XmlTokenSource.save(OutputStream, XmlOptions), XmlTokenSource.save(File) or XmlTokenSource.save(File, XmlOptions).save in interface XmlTokenSourcejava.io.IOExceptionpublic SchemaType instanceType()
SimpleValueFor 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.
instanceType in interface SimpleValuepublic java.lang.String stringValue()
getStringValue()SimpleValueString. *stringValue in interface SimpleValuepublic boolean booleanValue()
getBooleanValue()SimpleValuebooleanValue in interface SimpleValuepublic byte byteValue()
getByteValue()SimpleValuebyteValue in interface SimpleValuepublic short shortValue()
getShortValue()SimpleValueshortValue in interface SimpleValuepublic int intValue()
getIntValue()SimpleValueintValue in interface SimpleValuepublic long longValue()
getLongValue()SimpleValuelongValue in interface SimpleValuepublic java.math.BigInteger bigIntegerValue()
getBigIntegerValue()SimpleValueBigInteger. *bigIntegerValue in interface SimpleValuepublic java.math.BigDecimal bigDecimalValue()
getBigDecimalValue()SimpleValueBigDecimal. *bigDecimalValue in interface SimpleValuepublic float floatValue()
getFloatValue()SimpleValuefloatValue in interface SimpleValuepublic double doubleValue()
getDoubleValue()SimpleValuedoubleValue in interface SimpleValuepublic byte[] byteArrayValue()
getByteArrayValue()SimpleValuebyteArrayValue in interface SimpleValuepublic StringEnumAbstractBase enumValue()
getEnumValue()SimpleValueStringEnumAbstractBase. *enumValue in interface SimpleValuepublic java.util.Calendar calendarValue()
getCalendarValue()SimpleValueCalendar. *calendarValue in interface SimpleValuepublic java.util.Date dateValue()
getDateValue()SimpleValueDate. *dateValue in interface SimpleValuepublic GDate gDateValue()
getGDateValue()SimpleValueGDate. *gDateValue in interface SimpleValuepublic GDuration gDurationValue()
getGDurationValue()SimpleValueGDuration. *gDurationValue in interface SimpleValuepublic javax.xml.namespace.QName qNameValue()
getQNameValue()SimpleValueQName. *qNameValue in interface SimpleValuepublic java.util.List listValue()
getListValue()SimpleValueList of friendly Java objects (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration). *listValue in interface SimpleValuepublic java.util.List xlistValue()
getListValue()SimpleValueList of XmlAnySimpleType objects. *xlistValue in interface SimpleValuepublic java.lang.Object objectValue()
getObjectValue()SimpleValueobjectValue in interface SimpleValuepublic void set(java.lang.String obj)
setStringValue(java.lang.String)SimpleValueString. *set in interface SimpleValuepublic void set(boolean v)
setBooleanValue(boolean)SimpleValueset in interface SimpleValuepublic void set(byte v)
setByteValue(byte)SimpleValueset in interface SimpleValuepublic void set(short v)
setShortValue(short)SimpleValueset in interface SimpleValuepublic void set(int v)
setIntValue(int)SimpleValueset in interface SimpleValuepublic void set(long v)
setLongValue(long)SimpleValueset in interface SimpleValuepublic void set(java.math.BigInteger obj)
setBigIntegerValue(java.math.BigInteger)SimpleValueBigInteger.set in interface SimpleValuepublic void set(java.math.BigDecimal obj)
setBigDecimalValue(java.math.BigDecimal)SimpleValueBigDecimalset in interface SimpleValuepublic void set(float v)
setFloatValue(float)SimpleValueset in interface SimpleValuepublic void set(double v)
setDoubleValue(double)SimpleValueset in interface SimpleValuepublic void set(byte[] obj)
setByteArrayValue(byte[])SimpleValueset in interface SimpleValuepublic void set(StringEnumAbstractBase obj)
setEnumValue(org.apache.xmlbeans.StringEnumAbstractBase)SimpleValueStringEnumAbstractBase.set in interface SimpleValuepublic void set(java.util.Calendar obj)
setCalendarValue(java.util.Calendar)SimpleValueCalendar.set in interface SimpleValuepublic void set(java.util.Date obj)
setDateValue(java.util.Date)SimpleValueDate.set in interface SimpleValuepublic void set(GDateSpecification obj)
setGDateValue(org.apache.xmlbeans.GDate)SimpleValueGDate.set in interface SimpleValuepublic void set(GDurationSpecification obj)
setGDurationValue(org.apache.xmlbeans.GDuration)SimpleValueGDuration.set in interface SimpleValuepublic void set(javax.xml.namespace.QName obj)
setQNameValue(javax.xml.namespace.QName)SimpleValueQName.set in interface SimpleValuepublic void set(java.util.List obj)
setListValue(java.util.List)SimpleValueList.set in interface SimpleValuepublic java.lang.String getStringValue()
SimpleValueString.getStringValue in interface SimpleValuepublic boolean getBooleanValue()
SimpleValuegetBooleanValue in interface SimpleValuepublic byte getByteValue()
SimpleValuegetByteValue in interface SimpleValuepublic short getShortValue()
SimpleValuegetShortValue in interface SimpleValuepublic int getIntValue()
SimpleValuegetIntValue in interface SimpleValuepublic long getLongValue()
SimpleValuegetLongValue in interface SimpleValuepublic java.math.BigInteger getBigIntegerValue()
SimpleValueBigInteger.getBigIntegerValue in interface SimpleValuepublic java.math.BigDecimal getBigDecimalValue()
SimpleValueBigDecimal.getBigDecimalValue in interface SimpleValuepublic float getFloatValue()
SimpleValuegetFloatValue in interface SimpleValuepublic double getDoubleValue()
SimpleValuegetDoubleValue in interface SimpleValuepublic byte[] getByteArrayValue()
SimpleValuegetByteArrayValue in interface SimpleValuepublic StringEnumAbstractBase getEnumValue()
SimpleValueStringEnumAbstractBase.getEnumValue in interface SimpleValuepublic java.util.Calendar getCalendarValue()
SimpleValueCalendar.getCalendarValue in interface SimpleValuepublic java.util.Date getDateValue()
SimpleValueDate.getDateValue in interface SimpleValuepublic GDate getGDateValue()
SimpleValueGDate.getGDateValue in interface SimpleValuepublic GDuration getGDurationValue()
SimpleValueGDuration.getGDurationValue in interface SimpleValuepublic javax.xml.namespace.QName getQNameValue()
SimpleValueQName.getQNameValue in interface SimpleValuepublic java.util.List getListValue()
SimpleValueList of friendly Java objects (String, Integer, Byte, Short, Long, BigInteger, Decimal, Float, Double, byte[], Calendar, GDuration).getListValue in interface SimpleValuepublic java.util.List xgetListValue()
SimpleValueList of XmlAnySimpleType objects.xgetListValue in interface SimpleValuepublic java.lang.Object getObjectValue()
SimpleValuegetObjectValue in interface SimpleValuepublic void setStringValue(java.lang.String obj)
SimpleValueString.setStringValue in interface SimpleValuepublic void setBooleanValue(boolean v)
SimpleValuesetBooleanValue in interface SimpleValuepublic void setByteValue(byte v)
SimpleValuesetByteValue in interface SimpleValuepublic void setShortValue(short v)
SimpleValuesetShortValue in interface SimpleValuepublic void setIntValue(int v)
SimpleValuesetIntValue in interface SimpleValuepublic void setLongValue(long v)
SimpleValuesetLongValue in interface SimpleValuepublic void setBigIntegerValue(java.math.BigInteger obj)
SimpleValueBigInteger.setBigIntegerValue in interface SimpleValuepublic void setBigDecimalValue(java.math.BigDecimal obj)
SimpleValueBigDecimal.setBigDecimalValue in interface SimpleValuepublic void setFloatValue(float v)
SimpleValuesetFloatValue in interface SimpleValuepublic void setDoubleValue(double v)
SimpleValuesetDoubleValue in interface SimpleValuepublic void setByteArrayValue(byte[] obj)
SimpleValuesetByteArrayValue in interface SimpleValuepublic void setEnumValue(StringEnumAbstractBase obj)
SimpleValueStringEnumAbstractBase.setEnumValue in interface SimpleValuepublic void setCalendarValue(java.util.Calendar obj)
SimpleValueCalendar.setCalendarValue in interface SimpleValuepublic void setDateValue(java.util.Date obj)
SimpleValueDate.setDateValue in interface SimpleValuepublic void setGDateValue(GDate obj)
SimpleValueGDate.setGDateValue in interface SimpleValuepublic void setGDurationValue(GDuration obj)
SimpleValueGDuration.setGDurationValue in interface SimpleValuepublic void setQNameValue(javax.xml.namespace.QName obj)
SimpleValueQName.setQNameValue in interface SimpleValuepublic void setListValue(java.util.List obj)
SimpleValueList.setListValue in interface SimpleValuepublic void setObjectValue(java.lang.Object obj)
SimpleValueObject.setObjectValue in interface SimpleValuepublic void objectSet(java.lang.Object obj)
setObjectValue(java.lang.Object)SimpleValueObject.objectSet in interface SimpleValuepublic XmlObject[] selectChildren(javax.xml.namespace.QName elementName)
XmlObjectselectChildren in interface XmlObjectelementName - The name of the elements to be selected.public XmlObject[] selectChildren(java.lang.String elementUri, java.lang.String elementLocalName)
XmlObjectselectChildren in interface XmlObjectelementUri - The URI of the elements to be selected.elementLocalName - The local name of the elements to be selected.public XmlObject[] selectChildren(QNameSet elementNameSet)
XmlObjectselectChildren in interface XmlObjectelementNameSet - Set of element names to be selected.SchemaType.qnameSetForWildcardElements(),
for creating sets of qnamespublic XmlObject selectAttribute(javax.xml.namespace.QName attributeName)
XmlObjectselectAttribute in interface XmlObjectattributeName - The name of the attribute to be selected.public XmlObject selectAttribute(java.lang.String attributeUri, java.lang.String attributeLocalName)
XmlObjectselectAttribute in interface XmlObjectattributeUri - The URI of the attribute to be selected.attributeLocalName - The local name of the attribute to be selected.public XmlObject[] selectAttributes(QNameSet attributeNameSet)
XmlObjectselectAttributes in interface XmlObjectattributeNameSet - Set of attribute names to be selected.SchemaType.qnameSetForWildcardAttributes(),
for creating sets of qnames