KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > validate > auto > SchemaReaderFactorySchemaReceiverFactory


1 package com.thaiopensource.validate.auto;
2
3 import com.thaiopensource.util.PropertyMap;
4 import com.thaiopensource.validate.SchemaReader;
5 import com.thaiopensource.validate.SchemaReaderFactory;
6 import com.thaiopensource.validate.Option;
7
8 public class SchemaReaderFactorySchemaReceiverFactory implements SchemaReceiverFactory {
9   private final SchemaReaderFactory srf;
10
11   public SchemaReaderFactorySchemaReceiverFactory(SchemaReaderFactory srf) {
12     this.srf = srf;
13   }
14
15   public SchemaReceiver createSchemaReceiver(String JavaDoc namespaceUri,
16                                              PropertyMap properties) {
17     SchemaReader sr = srf.createSchemaReader(namespaceUri);
18     if (sr == null)
19       return null;
20     return new SchemaReaderSchemaReceiver(sr, properties);
21   }
22
23   public Option getOption(String JavaDoc uri) {
24     return srf.getOption(uri);
25   }
26 }
27
Popular Tags