KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > datatype > xsd > DatatypeLibraryFactoryImpl


1 package com.thaiopensource.datatype.xsd;
2
3 import org.relaxng.datatype.DatatypeLibrary;
4 import org.relaxng.datatype.DatatypeLibraryFactory;
5 import com.thaiopensource.xml.util.WellKnownNamespaces;
6
7 public class DatatypeLibraryFactoryImpl implements DatatypeLibraryFactory {
8
9   private DatatypeLibrary datatypeLibrary = null;
10
11   public DatatypeLibrary createDatatypeLibrary(String JavaDoc uri) {
12     if (!WellKnownNamespaces.XML_SCHEMA_DATATYPES.equals(uri))
13       return null;
14     synchronized (this) {
15       if (datatypeLibrary == null)
16         datatypeLibrary = new DatatypeLibraryImpl();
17       return datatypeLibrary;
18     }
19   }
20 }
21
Popular Tags