FileDocCategorySizeDatePackage
DTDDVFactoryImpl.javaAPI DocJava SE 5 API4709Fri Aug 26 14:55:48 BST 2005com.sun.org.apache.xerces.internal.impl.dv.dtd

DTDDVFactoryImpl

public class DTDDVFactoryImpl extends DTDDVFactory
the factory to create/return built-in schema DVs and create user-defined DVs
author
Sandy Gao, IBM
version
$Id: DTDDVFactoryImpl.java,v 1.4 2002/12/07 00:20:55 neilg Exp $

Fields Summary
static 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 com.sun.org.apache.xerces.internal.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();