|
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
Abstract base class for all validatable objects. The methods in this class,
in conjunction with those in the Validator
class, define the
content-tree validation process.
Validator
Method Summary | |
void |
invalidate()
Marks this object invalid. |
void |
validate()
Validates the content tree rooted at this object, which must be a root element. |
void |
validate(Validator vd)
Recursively validates this object's children using the given validator and updates the validator with any local information that is subject to global constraints. |
void |
validateThis()
Ensures that this object does not violate any local structural constraints. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public final void invalidate()
This method is intended to be invoked only by the property-mutation methods defined in schema-derived classes. It should not be invoked during the unmarshalling process.
public final void validate() throws StructureValidationException
This method creates a new Validator
object and then proceeds
to validate this content tree by invoking the validator's validate(ValidatableObject)
method, passing this object. If this recursive process completes
successfully then the validation
propositions are known to hold for every object in the content
tree. This method then checks that the target of every identifier
reference has an identifier and is a member of the content tree.
StructureValidationException
- If any structural constraints are violatedUnsupportedOperationException
- If this object is not an instance of the RootElement
interfacepublic void validate(Validator vd) throws StructureValidationException
This method must invoke the validator's validate(ValidatableObject)
method upon the children of this object in the content tree. It must
also invoke the validator's reference(IdentifiableElement)
method upon the target of each identifier-reference property in this
object.
The default implementation of this method does nothing; it should be overridden only by schema-derived classes. This method may only be invoked by the validation process; its behavior when invoked in any other manner is unspecified.
vd
- The validator to be applied to this object's childrenStructureValidationException
- If any structural constraints are violatedpublic void validateThis() throws LocalValidationException
The default implementation of this method does nothing; it should be overridden only by schema-derived classes. This method may be invoked outside of the normal validation process.
EmptyAttributeException
- If a collection property derived from a compound attribute is
empty, but the source schema requires at least one valueInvalidContentException
- If the children of this object violate the content
specification of the schema component from which this
object's class was derivedMissingAttributeException
- If a property derived from a required attribute
has no valueMissingContentException
- If a property derived from a required content component
has no value
|
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.