1 package org.xmldb.common.xml.queries; 2 54 55 import javax.xml.parsers.FactoryConfigurationError ; 56 57 58 63 public abstract class XUpdateQueryFactory { 64 65 66 public XUpdateQueryFactory() { 67 } 68 69 70 public static XUpdateQueryFactory newInstance() { 71 String factoryName = System.getProperty("org.xmldb.common.xml.queries.XUpdateQueryFactory", 72 "org.xmldb.lexus.XUpdateQueryFactoryImpl"); 73 74 XUpdateQueryFactory factory = null; 75 76 try { 77 Class clazz = Class.forName(factoryName); 78 factory = (XUpdateQueryFactory) clazz.newInstance(); 79 } catch (ClassNotFoundException cnfe) { 80 throw new FactoryConfigurationError (cnfe); 81 } catch (IllegalAccessException iae) { 82 throw new FactoryConfigurationError (iae); 83 } catch (InstantiationException ie) { 84 throw new FactoryConfigurationError (ie); 85 } 86 return factory; 87 } 88 89 90 public abstract XUpdateQuery newXUpdateQuery() throws XUpdateQueryConfigurationException; 91 92 } 93 | Popular Tags |