Validate using JSR 349.
Do not expose Document.store(): dangerous and confusing.
Build validation.
Validation testing.