JAXB
v0.21

Package javax.xml.bind

The binding framework: The interfaces and abstract classes that are implemented and extended by classes derived from a source schema, together with classes that govern the unmarshalling, validation, and marshalling processes.

See:
          Description

Interface Summary
Element Interface implemented by all element classes, that is, classes derived directly from element-type declarations.
IdentifiableElement Interface implemented by element classes derived from element types containing an ID attribute.
PredicatedLists.Predicate A predicate for a predicated list.
RootElement Interface implemented by all root element classes.
 

Class Summary
Dispatcher A dispatcher is used to map element names to class names, and to initiate the unmarshalling process.
MarshallableObject Abstract base class for objects that can be marshalled and unmarshalled.
MarshallableRootElement Abstract base class for root element objects that can be marshalled and unmarshalled.
Marshaller A marshaller governs the process of marshalling a valid content tree into an XML document.
PCData Marshallable-object class for parsed character data.
PredicatedLists Lists for implementing schema-derived list properties.
Unmarshaller An unmarshaller governs the process of unmarshalling an XML document into a newly-created content tree, validating the tree as it is constructed.
ValidatableObject Abstract base class for all validatable objects.
Validator A validator governs the process of validating a content tree.
Validator.Patcher A patcher represents an unresolved identifier reference.
 

Exception Summary
ConversionException Checked exception thrown by an XML scanner when an I/O error occurs.
ConversionFailureException Unchecked exception thrown when a conversion's print method fails during marshalling.
CycleException Checked exception thrown when a cycle in an instance tree is detected.
DuplicateAttributeException Checked exception thrown when a duplicate attribute is scanned.
DuplicateIdentifierException Checked exception thrown when a duplicate identifier value is detected.
ElementNameRegisteredException Unchecked exception thrown when an attempt is made to register an element name with a dispatcher that already has a mapping for that name.
EmptyAttributeException Checked exception thrown when a compound attribute is detected to be empty.
ExternalReferenceException Checked exception thrown when a referent of a property derived from an IDREF or IDREFS attribute is detected to have a value that is not an object in the containing content tree.
FixedValueException Unchecked exception thrown by a property mutation method derived from a fixed attribute when invoked with a value different from the default value.
GlobalValidationException Abstract checked-exception class for exceptions thrown when a violation of a global structural constraint expressed in the source schema is detected.
IllegalEnumerationValueException Unchecked exception thrown when the parse method of an enumeration class is invoked with a string that is not a member of the enumeration.
InvalidAttributeException Checked exception thrown when an attribute not specified in the source schema is parsed.
InvalidContentException Checked exception thrown when a violation of an element type's content specification is detected.
InvalidContentObjectException Unchecked exception thrown by a property mutation method when invoked with a content object of unacceptable type.
InvalidEnumerationValueException Unchecked exception thrown by a property mutation method when invoked with a string that is not in its enumerated value list.
InvalidFixedValueException Checked exception thrown when a compound fixed attribute is detected to have the incorrect value.
InvalidNameException Unchecked exception thrown by a property mutation method when invoked with a string that is not a legal XML name but such a string is required.
InvalidNameTokenException Unchecked exception thrown by a property mutation method when invoked with a string that is not a legal XML name token but such a string is required.
LocalValidationException Abstract checked-exception class for exceptions thrown when a violation of a local structural constraint expressed in the source schema is detected.
MissingAttributeException Checked exception thrown when a required attribute without a given value is detected.
MissingContentException Checked exception thrown when a value required by an element type's content specification is detected to be missing.
MissingIdentifierException Checked exception thrown when a referent of a property derived from an IDREF or IDREFS attribute is detected not to have an identifier value.
NonInitialObjectException Unchecked exception thrown when an unmarshal method is invoked upon an object that has already been initialized.
NoValueException Unchecked exception thrown when a primitive property's get method is invoked but the property has neither a given nor a default value.
NullValueException Unchecked exception thrown when an attempt is made to add the value null to a collection property.
StructureValidationException Abstract checked-exception class for exceptions thrown when a violation of a structural constraint expressed in the source schema is detected.
TypeConstraintException Unchecked exception thrown to indicate that a simple dynamically-checked type constraint has been violated.
TypeValidationException Checked exception thrown when a TypeConstraintException is thrown during unmarshalling.
UndefinedIdentifierException Checked exception thrown when an identifier that is used but not defined is detected.
UnmarshalException Abstract checked-exception class for exceptions thrown when errors occur during unmarshalling.
UnrecognizedElementNameException Checked exception thrown when an element name not registered with the dispatcher currently being used is parsed.
ValidationException Abstract checked-exception class for exceptions thrown to indicate that validation has failed.
ValidationRequiredException Unchecked exception thrown when it is determined that an instance tree being marshalled requires validation.
 

Package javax.xml.bind Description

The binding framework: The interfaces and abstract classes that are implemented and extended by classes derived from a source schema, together with classes that govern the unmarshalling, validation, and marshalling processes.

Interfaces and abstract classes

Every schema-derived class extends, indirectly, the abstract class ValidatableObject class. This class defines the public methods as well as the internal state required for content-tree validation.

Every schema-derived class extends the abstract class MarshallableObject, which itself extends the ValidatableObject class. This class defines the instance methods that support marshalling and unmarshalling.

A class that corresponds to an element type declared in the source schema implements the Element interface. This interface specifies no methods beyond those already defined in the ValidatableObject class; it is simply a marker interface that allows element classes to be distinguished from other schema-derived classes.

An element class for a root element type instead implements the RootElement class, which itself extends the Element interface. This interface is also a marker interface, used to distinguish root from non-root element classes.

A marshallable root element class extends the abstract MarshallableRootElement class, which itself extends the MarshallableObject class. This class defines the primary marshalling method. It also specifies, but does not define, the static unmarshalling methods generated into each marshallable root element class by the schema compiler.

If a class contains a property derived from an identifier (ID) attribute then it also implements the IdentifiableElement interface. This interface specifies a single method that returns the value of the identifier property.

To summarize pictorially, with classes on the left and interfaces on the right, we have:



ValidatableObject                                       Element
        |                                                  ||
        +-- MarshallableObject               RootElement ==++
                    |                             ||
                    +-- MarshallableRootElement ==++

Validation, marshalling, and unmarshalling

The validation, marshalling, and unmarshalling processes are implemented by the Validator, Marshaller, and Unmarshaller classes, respectively. An invocation of each process is governed by an instance of the corresponding class. The unmarshalling process uses an instance of the Dispatcher class to map element names to schema-derived or user-provided marshallable-object classes.

Exception specification conventions

Invoking a constructor or method specified in this package and passing a null argument value will, unless otherwise noted, cause an IllegalArgumentException to be thrown.

In many cases the specification of a constructor or method in this package makes descriptive assertions about legal parameter values. Invoking a constructor or method with an argument value that violates such an assertion will, unless otherwise noted, cause an IllegalArgumentException to be thrown.


JAXB
v0.21


Comments to: jaxb-comments@java.sun.com
More information at: http://java.sun.com/xml/jaxb

Copyright © 2001 by Sun Microsystems, Inc., 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.