|
JAXB v0.21 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--javax.xml.bind.ValidatableObject
|
+--javax.xml.bind.MarshallableObject
Abstract base class for objects that can be marshalled and unmarshalled.
The methods in this class, in conjunction with those in the Marshaller, Dispatcher, and Unmarshaller classes, define
the processes of marshalling content trees into XML documents and
vice-versa.
This class does not implement the Element interface because some
schema-derived classes will be marshallable but will not be element classes.
Both marshalling and unmarshalling are optional operations because in
some applications only one or the other operation is of interest. If a
particular operation is not supported then an UnsupportedOperationException is
thrown when the corresponding method is invoked.
Dispatcher,
Marshaller,
Unmarshaller,
Validator| Constructor Summary | |
protected |
MarshallableObject()
Initializes a new marshallable object. |
| Method Summary | |
void |
marshal(Marshaller m)
Marshals the content of this object, and its children, using the given marshaller (optional operation). |
abstract void |
unmarshal(Unmarshaller u)
Unmarshals an element or some character data into this object, converting data as necessary, checking type constraints and local structural constraints, and recording the information required to check global structural constraints. |
| Methods inherited from class javax.xml.bind.ValidatableObject |
invalidate, validate, validate, validateThis |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected MarshallableObject()
| Method Detail |
public void marshal(Marshaller m)
throws IOException
This method must use the given marshaller's XMLWriter to write the content of this
object, and it must invoke the given marshaller's marshal(MarshallableObject)
method to marshal any children.
As defined in this class, this method throws an UnsupportedOperationException; it should be overridden only by
schema-derived classes. This method should only be invoked by the
marshalling process; its behavior when invoked in any other manner is
unspecified.
m - The marshaller to be usedIOException - If an I/O error occursUnsupportedOperationException - If this object does not support marshalling
public abstract void unmarshal(Unmarshaller u)
throws UnmarshalException
This method must use the given unmarshaller's XMLScanner to parse the elements and
attributes represented by this object. It must recursively invoke the
given unmarshaller's unmarshal() and
unmarshal(Class) methods to
unmarshal any subelements. Finally, it must invoke the reference(String,
Validator.Patcher) method of the marshaller's validator in order to
arrange for the target of each identifier reference to be installed once
the reference is resolved.
As defined in this class, this method throws an UnsupportedOperationException; it should be overridden only by
schema-derived classes. This method should only be invoked by the
unmarshalling process; its behavior when invoked in any other manner is
unspecified.
u - The unmarshaller to be usedScanIOException - If an I/O error occursScanException - If the source document is not well-formedInvalidContentException - If the unmarshaller's scanner is not initially positioned at an
appropriate start tag or at some character data, according to
whether this object is to represent an element or character
data, respectively; or if this object is to represent an
element and the element's content specification as described in
the source schema is violatedValidationException - If a type or structural constraint is violated by the input
document
|
JAXB v0.21 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Copyright © 2001 by Sun Microsystems, Inc., 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.