| 1 | package com.thaiopensource.validation; |
| 2 | |
| 3 | import javax.xml.validation.Schema; |
| 4 | |
| 5 | /** |
| 6 | * An extension to the Schema abstract class. The main difference is that |
| 7 | * there is a default implementation of newValidator in terms of newValidatorHandler. |
| 8 | * Also both newValidator and newValidatorHandler return the extended versions |
| 9 | * of Validator and ValidatorHandler (using covariant return types). |
| 10 | */ |
| 11 | public abstract class Schema2 extends Schema { |
| 12 | protected Schema2() { } |
| 13 | |
| 14 | public Validator2 newValidator() { |
| 15 | return new ValidatorImpl(newValidatorHandler()); |
| 16 | } |
| 17 | |
| 18 | public abstract ValidatorHandler2 newValidatorHandler(); |
| 19 | } |