FileDocCategorySizeDatePackage
DTDDVFactoryImpl.javaAPI DocJava SE 6 API2674Tue Jun 10 00:22:42 BST 2008com.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
xerces.internal
author
Sandy Gao, IBM
version
$Id: DTDDVFactoryImpl.java,v 1.2.6.1 2005/09/09 07:19:17 neerajbj 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();