KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > relaxng > impl > PatternSchema


1 package com.thaiopensource.relaxng.impl;
2
3 import com.thaiopensource.util.PropertyMap;
4 import com.thaiopensource.validate.AbstractSchema;
5 import com.thaiopensource.validate.ValidateProperty;
6 import com.thaiopensource.validate.Validator;
7 import org.xml.sax.ErrorHandler JavaDoc;
8
9 public class PatternSchema extends AbstractSchema {
10   private final SchemaPatternBuilder spb;
11   private final Pattern start;
12
13   public PatternSchema(SchemaPatternBuilder spb, Pattern start, PropertyMap properties) {
14     super(properties);
15     this.spb = spb;
16     this.start = start;
17   }
18
19   public Validator createValidator(PropertyMap properties) {
20     ErrorHandler JavaDoc eh = ValidateProperty.ERROR_HANDLER.get(properties);
21     return new PatternValidator(start, new ValidatorPatternBuilder(spb), eh);
22   }
23 }
24
Popular Tags