| 1 |
package com.thaiopensource.relaxng.jaxp; |
| 2 |
|
| 3 |
import com.thaiopensource.relaxng.pattern.Pattern; |
| 4 |
import com.thaiopensource.relaxng.pattern.SchemaPatternBuilder; |
| 5 |
import com.thaiopensource.relaxng.pattern.ValidatorPatternBuilder; |
| 6 |
import com.thaiopensource.validation.Schema2; |
| 7 |
import com.thaiopensource.validation.ValidatorHandler2; |
| 8 |
|
| 9 |
class SchemaImpl extends Schema2 { |
| 10 |
private final SchemaFactoryImpl factory; |
| 11 |
private final SchemaPatternBuilder spb; |
| 12 |
private final Pattern start; |
| 13 |
|
| 14 |
SchemaImpl(SchemaFactoryImpl factory, SchemaPatternBuilder spb, Pattern start) { |
| 15 |
this.factory = factory; |
| 16 |
this.spb = spb; |
| 17 |
this.start = start; |
| 18 |
} |
| 19 |
|
| 20 |
public ValidatorHandler2 newValidatorHandler() { |
| 21 |
return new ValidatorHandlerImpl(factory, start, new ValidatorPatternBuilder(spb)); |
| 22 |
} |
| 23 |
} |