1 57 58 package com.sun.org.apache.xerces.internal.impl.dv; 59 60 import java.util.Hashtable ; 61 62 71 public abstract class DTDDVFactory { 72 73 private static final String DEFAULT_FACTORY_CLASS = "com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl"; 74 75 82 public static synchronized final DTDDVFactory getInstance() throws DVFactoryException { 83 return getInstance(DEFAULT_FACTORY_CLASS); 84 } 85 86 94 public static synchronized final DTDDVFactory getInstance(String factoryClass) throws DVFactoryException { 95 96 try { 97 return (DTDDVFactory) 99 (ObjectFactory.newInstance(factoryClass, ObjectFactory.findClassLoader(), true)); 100 } catch (ClassCastException e) { 101 throw new DVFactoryException("DTD factory class " + factoryClass + " does not extend from DTDDVFactory."); 102 } 103 } 104 105 protected DTDDVFactory(){} 107 108 114 public abstract DatatypeValidator getBuiltInDV(String name); 115 116 121 public abstract Hashtable getBuiltInTypes(); 122 123 } 124 | Popular Tags |