FileDocCategorySizeDatePackage
DTDDVFactoryImpl.javaAPI DocApache Xerces 3.0.12878Fri Sep 14 20:33:52 BST 2007org.apache.xerces.impl.dv.dtd

DTDDVFactoryImpl

public class DTDDVFactoryImpl extends org.apache.xerces.impl.dv.DTDDVFactory
the factory to create/return built-in schema DVs and create user-defined DVs
xerces.internal
author
Sandy Gao, IBM
version
$Id: DTDDVFactoryImpl.java 572061 2007-09-02 18:05:06Z mrglavas $

Fields Summary
static final Hashtable
fBuiltInTypes
Constructors Summary
Methods Summary
static voidcreateBuiltInTypes()


        DatatypeValidator dvTemp;

        fBuiltInTypes.put("string", new StringDatatypeValidator());
        fBuiltInTypes.put("ID", new IDDatatypeValidator());
        dvTemp = new IDREFDatatypeValidator();
        fBuiltInTypes.put("IDREF", dvTemp);
        fBuiltInTypes.put("IDREFS", new ListDatatypeValidator(dvTemp));
        dvTemp = new ENTITYDatatypeValidator();
        fBuiltInTypes.put("ENTITY", new ENTITYDatatypeValidator());
        fBuiltInTypes.put("ENTITIES", new ListDatatypeValidator(dvTemp));
        fBuiltInTypes.put("NOTATION", new NOTATIONDatatypeValidator());
        dvTemp = new NMTOKENDatatypeValidator();
        fBuiltInTypes.put("NMTOKEN", dvTemp);
        fBuiltInTypes.put("NMTOKENS", new ListDatatypeValidator(dvTemp));

    
public org.apache.xerces.impl.dv.DatatypeValidatorgetBuiltInDV(java.lang.String name)
return a dtd type of the given name

param
name the name of the datatype
return
the datatype validator of the given name

     
        createBuiltInTypes();
    
        return (DatatypeValidator)fBuiltInTypes.get(name);
    
public java.util.HashtablegetBuiltInTypes()
get all built-in DVs, which are stored in a hashtable keyed by the name

return
a hashtable which contains all datatypes

        return (Hashtable)fBuiltInTypes.clone();