Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Raptor Engineering Public Development
Jitsi
jaxb-api
Commits
b7580fd8
Commit
b7580fd8
authored
4 years ago
by
Lukas Jungmann
Browse files
Options
Download
Email Patches
Plain Diff
Update appendix G
Signed-off-by:
Lukas Jungmann
<
lukas.jungmann@oracle.com
>
parent
6bb35824
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
24 deletions
+21
-24
spec/src/main/asciidoc/appG-deprecated.adoc
spec/src/main/asciidoc/appG-deprecated.adoc
+21
-24
No files found.
spec/src/main/asciidoc/appG-deprecated.adoc
View file @
b7580fd8
...
...
@@ -14,7 +14,7 @@ longer required to be implemented in JAXB 2.0. These deprecated
operations do still need to be supported by a JAXB 2.0 binding runtime
for JAXB 1.0 schema-derived classes.
===
[[a5094]]
On-demand Validation
=== On-demand Validation
It is optional for a JAXB 2.0 implementation
to implement on-demand validation for JAXB 2.0 mapped classes. There is
...
...
@@ -23,9 +23,9 @@ classes and leverage JAXP 1.3 validation facility. For backwards
compatibility, an implementation is required to support this
functionality for JAXB 1.0 schema-derived classes.
===
[[a5096]]
Validator for JAXB 1.0 schema-derived classes
===
=
Validator for JAXB 1.0 schema-derived classes
_The following text is from JAXB 1.0
_The following text is from JAXB 1.0
Specification and applies to JAXB 1.0 schema-derived classes._
An application may wish to validate the
...
...
@@ -35,40 +35,37 @@ the validation process on a Java content tree at a point in time that it
feels it should be valid. The application is notified about validation
errors and warnings detected in the Java content tree.
The
_
Validator
_
class is responsible for
The
`
Validator
`
class is responsible for
controlling the validation of a content tree of in-memory objects. The
following summarizes the available operations on the class.
public interface Validator \{ +
ValidationEventHandler _getEventHandler_ () +
void _setEventHandler_ (ValidationEventHandler)
[source,java,indent="4"]
----
public interface Validator {
ValidationEventHandler getEventHandler()
void setEventHandler(ValidationEventHandler)
+
boolean _validate_ (java.lang.Object subrootObject)
boolean _validateRoot_ (java.lang.Object
rootObject) +
java.lang.Object _getProperty_
(java.lang.String name) +
void _setProperty_ (java.lang.String name,
java.lang.Object value)
boolean validate(java.lang.Object subrootObject)
boolean validateRoot(java.lang.Object rootObject)
java.lang.Object getProperty(java.lang.String name)
void setProperty(java.lang.String name, java.lang.Object value)
}
----
_
The JAXBContext
_
class provides a factory
to create a
_
Validator
_
instance. After an application has made a series
`
The JAXBContext
`
class provides a factory
to create a
`
Validator
`
instance. After an application has made a series
of modifications to a Java content tree, the application validates the
content tree on-demand. As far as the application is concerned, this
validation takes place against the Java content instances and validation
constraint warnings and errors are reported to the application relative
to the Java content tree. Validation is initiated by invoking the
_
validateRoot(Object)
_
method on the root of the Java content tree or by
invoking
_
validate(Object)
_
method to validate any arbitrary subtree of
`
validateRoot(Object)
`
method on the root of the Java content tree or by
invoking
`
validate(Object)
`
method to validate any arbitrary subtree of
the Java content tree. The only difference between these two methods is
global constraint checking (i.e. verifying ID/IDREF constraints.) The
_
validateRoot(Object)
_
method includes global constraint checking as
part of its operation, whereas the
_
validate(Object)
_
method does not.
`
validateRoot(Object)
`
method includes global constraint checking as
part of its operation, whereas the
`
validate(Object)
`
method does not.
The validator governs the process of
validating the content tree, serves as a registry for identifier
...
...
@@ -78,6 +75,6 @@ complete.
If a violation of a local or global
structural constraint is detected, then the application is notified of
the event with a callback passing an instance of a
_
ValidationEvent
_
as
the event with a callback passing an instance of a
`
ValidationEvent
`
as
a parameter.
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment