1 16 17 package org.apache.xerces.impl.dv; 18 19 import java.util.Hashtable ; 20 21 32 public abstract class DTDDVFactory { 33 34 private static final String DEFAULT_FACTORY_CLASS = "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl"; 35 36 43 public static synchronized final DTDDVFactory getInstance() throws DVFactoryException { 44 return getInstance(DEFAULT_FACTORY_CLASS); 45 } 46 47 55 public static synchronized final DTDDVFactory getInstance(String factoryClass) throws DVFactoryException { 56 57 try { 58 return (DTDDVFactory) 60 (ObjectFactory.newInstance(factoryClass, ObjectFactory.findClassLoader(), true)); 61 } catch (ClassCastException e) { 62 throw new DVFactoryException("DTD factory class " + factoryClass + " does not extend from DTDDVFactory."); 63 } 64 } 65 66 protected DTDDVFactory(){} 68 69 75 public abstract DatatypeValidator getBuiltInDV(String name); 76 77 82 public abstract Hashtable getBuiltInTypes(); 83 84 } 85 | Popular Tags |