001 package com.thaiopensource.validate.auto; 002 003 import com.thaiopensource.util.PropertyMap; 004 import com.thaiopensource.validate.SchemaReader; 005 import com.thaiopensource.validate.SchemaReaderFactory; 006 import com.thaiopensource.validate.Option; 007 008 public class SchemaReaderFactorySchemaReceiverFactory implements SchemaReceiverFactory { 009 private final SchemaReaderFactory srf; 010 011 public SchemaReaderFactorySchemaReceiverFactory(SchemaReaderFactory srf) { 012 this.srf = srf; 013 } 014 015 public SchemaReceiver createSchemaReceiver(String namespaceUri, 016 PropertyMap properties) { 017 SchemaReader sr = srf.createSchemaReader(namespaceUri); 018 if (sr == null) 019 return null; 020 return new SchemaReaderSchemaReceiver(sr, properties); 021 } 022 023 public Option getOption(String uri) { 024 return srf.getOption(uri); 025 } 026 }