org.apache.xerces.impl.dv.dtd
Class DatatypeValidatorFactoryImpl
java.lang.Object
|
+--org.apache.xerces.impl.dv.dtd.DatatypeValidatorFactoryImpl
- All Implemented Interfaces:
- DatatypeValidatorFactory
- public class DatatypeValidatorFactoryImpl
- extends java.lang.Object
- implements DatatypeValidatorFactory
This class implements a factory of Datatype Validators. Internally the
DatatypeValidators are kept in a registry.
There is one instance of DatatypeValidatorFactoryImpl per Parser.
There is one datatype Registry per instance of DatatypeValidatorFactoryImpl,
such registry is first allocated with the number DatatypeValidators needed.
e.g.
If Parser finds an XML document with a DTD, a registry of DTD validators (only
9 validators) get initialized in the registry.
The initialization process consist of instantiating the Datatype and
facets and registering the Datatype into registry table.
This implementatio uses a Hahtable as a registry table but future implementation
should use a lighter object, maybe a Map class ( not use a derived Map class
because of JDK 1.1.8 no supporting Map).
As the Parser parses an instance document it knows if validation needs
to be checked. If no validation is necesary we should not instantiate a
DatatypeValidatorFactoryImpl.
If validation is needed, we need to instantiate a DatatypeValidatorFactoryImpl.
- Version:
- $Id: DatatypeValidatorFactoryImpl.java,v 1.3 2002/01/29 01:15:11 lehors Exp $
- Author:
- Jeffrey Rodriguez
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fUserDefinedTypes
protected java.util.Hashtable fUserDefinedTypes
DatatypeValidatorFactoryImpl
public DatatypeValidatorFactoryImpl()
initializeDTDRegistry
public void initializeDTDRegistry()
- Initializes registry with primitive and derived
Simple types.
This method does not clear the registry to clear
the registry you have to call resetRegistry.
The net effect of this method is to start with
a the smallest set of datatypes needed by the
validator.
If we start with DTD's then we initialize the
table to only the 9 validators needed by DTD Validation.
If we start with Schema's then we initialize to
to full set of validators.
- Parameters:
registrySet
-
resetRegistry
public void resetRegistry()
getDatatypeValidator
public DatatypeValidator getDatatypeValidator(java.lang.String type)
Copyright © 1999-2002 Apache XML Project. All Rights Reserved.