org.apache.xerces.impl.dv
Class DTDDVFactory
java.lang.Object
|
+--org.apache.xerces.impl.dv.DTDDVFactory
- Direct Known Subclasses:
- DTDDVFactoryImpl
- public abstract class DTDDVFactory
- extends java.lang.Object
The factory to create and return DTD types. The implementation should
store the created datatypes in static data, so that they can be shared by
multiple parser instance, and multiple threads.
- Version:
- $Id: DTDDVFactory.java,v 1.3 2002/02/15 16:00:29 sandygao Exp $
- Author:
- Sandy Gao, IBM
Method Summary |
abstract DatatypeValidator |
getBuiltInDV(java.lang.String name)
return a dtd type of the given name |
abstract java.util.Hashtable |
getBuiltInTypes()
get all built-in DVs, which are stored in a hashtable keyed by the name |
static DTDDVFactory |
getInstance()
Get an instance of DTDDVFactory implementation. |
static void |
setFactoryClass(java.lang.String factoryClass)
Set the class name of the dtd factory implementation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DTDDVFactory
protected DTDDVFactory()
setFactoryClass
public static final void setFactoryClass(java.lang.String factoryClass)
throws DVFactoryException
- Set the class name of the dtd factory implementation. This method
can only be called before the first time the method
getInstance
successfully returns, otherwise a DVFactoryException will be thrown.
- Parameters:
className
- the class name of the DTDDVFactory implementation- Throws:
DVFactoryException
- the method cannot be called at this time
getInstance
public static final DTDDVFactory getInstance()
throws DVFactoryException
- Get an instance of DTDDVFactory implementation.
If
setFactoryClass
is called before this method,
the passed-in class name will be used to create the factory instance.
Otherwise, a default implementation is used.
After the first time this method successfully returns, any subsequent
invocation to this method returns the same instance.
- Returns:
- an instance of DTDDVFactory implementation
- Throws:
DVFactoryException
- cannot create an instance of the specified
class name or the default class name
getBuiltInDV
public abstract DatatypeValidator getBuiltInDV(java.lang.String name)
- return a dtd type of the given name
- Parameters:
name
- the name of the datatype- Returns:
- the datatype validator of the given name
getBuiltInTypes
public abstract java.util.Hashtable getBuiltInTypes()
- get all built-in DVs, which are stored in a hashtable keyed by the name
- Returns:
- a hashtable which contains all datatypes
Copyright © 1999-2001 Apache XML Project. All Rights Reserved.