org.enhydra.xml.xmlc.dom.lazydom
Class LazyHTMLDomFactory

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
        |
        +--org.enhydra.xml.xmlc.dom.lazydom.LazyDomFactory
              |
              +--org.enhydra.xml.xmlc.dom.lazydom.LazyHTMLDomFactory
All Implemented Interfaces:
XMLCDomFactory

public class LazyHTMLDomFactory
extends LazyDomFactory
implements XMLCDomFactory

Lazy DOM factory for creating HTML Document objects.


Inner classes inherited from class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
XercesDomFactory.LinkedXercesDocument
 
Constructor Summary
LazyHTMLDomFactory()
           
 
Method Summary
 Document createDocument(String namespaceURI, String qualifiedName, DocumentType docType)
          Creates an XML Document object of the specified type.
 Document createDocument(TemplateDOM templateDOM)
          Create a LazyDocument from a template.
 String getBaseClassName()
          Get the base class name for generated classes.
 String getDocumentClassName()
          Get the FQCN of the Document class for the current DOM Implementation
 String[] getElementClassNames(Element element)
          Extract the class names for an element.
 String[] getInterfaceNames()
          Get the interface names that will automatically be added to all generated classes and interfaces.
 String getMIMEType()
          Get the MIME type to associated with the document, or null if none should be associated.
 boolean isURLAttribute(Element element, String attrName)
          Determine if an an attribute of an element may contain a URL and should be subject to URL editing at compile time(or rewriting at run time.
 
Methods inherited from class org.enhydra.xml.xmlc.dom.lazydom.LazyDomFactory
createDocumentType, nodeClassToInterface
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.enhydra.xml.xmlc.dom.XMLCDomFactory
createDocumentType, nodeClassToInterface
 

Constructor Detail

LazyHTMLDomFactory

public LazyHTMLDomFactory()
Method Detail

createDocument

public Document createDocument(String namespaceURI,
                               String qualifiedName,
                               DocumentType docType)
Description copied from interface: XMLCDomFactory
Creates an XML Document object of the specified type. The document element should be created. A HTML document should only have the document element, which differs from the DOMImplementation specification, however it makes code generation easier and its not expected that there will be many custom HTML DOM factories.
Specified by:
createDocument in interface XMLCDomFactory
Overrides:
createDocument in class LazyDomFactory
See Also:
XMLCDomFactory.createDocument(java.lang.String, java.lang.String, org.w3c.dom.DocumentType)

createDocument

public Document createDocument(TemplateDOM templateDOM)
Create a LazyDocument from a template.
Overrides:
createDocument in class LazyDomFactory
See Also:
XMLCDomFactory.createDocument(java.lang.String, java.lang.String, org.w3c.dom.DocumentType)

getDocumentClassName

public String getDocumentClassName()
Description copied from interface: XMLCDomFactory
Get the FQCN of the Document class for the current DOM Implementation
Specified by:
getDocumentClassName in interface XMLCDomFactory
Overrides:
getDocumentClassName in class LazyDomFactory
See Also:
XMLCDomFactory.getDocumentClassName()

getMIMEType

public String getMIMEType()
Description copied from interface: XMLCDomFactory
Get the MIME type to associated with the document, or null if none should be associated.
Specified by:
getMIMEType in interface XMLCDomFactory
Overrides:
getMIMEType in class XercesDomFactory
See Also:
XMLCDomFactory.getMIMEType()

getBaseClassName

public String getBaseClassName()
Description copied from interface: XMLCDomFactory
Get the base class name for generated classes. It must extend XMLObjectImpl. This class maybe overridden for individual documents that are compiled.
Specified by:
getBaseClassName in interface XMLCDomFactory
Overrides:
getBaseClassName in class XercesDomFactory
See Also:
XMLCDomFactory.getBaseClassName()

getInterfaceNames

public String[] getInterfaceNames()
Description copied from interface: XMLCDomFactory
Get the interface names that will automatically be added to all generated classes and interfaces. This class maybe overridden for individual documents that are compiled. It XMLObject is not part of the list, it will be added automatically.
Specified by:
getInterfaceNames in interface XMLCDomFactory
Overrides:
getInterfaceNames in class XercesDomFactory
See Also:
XMLCDomFactory.getInterfaceNames()

getElementClassNames

public String[] getElementClassNames(Element element)
Description copied from interface: XMLCDomFactory
Extract the class names for an element. This is a class for grouping elements, not the Java class. In HTML, the class is specified with the class attribute and with a value of a white-space separated list of class names. Its not specified for XML, however this method can be implemented in DTD-specifc XMLDomFactories to enable this functionality.
Specified by:
getElementClassNames in interface XMLCDomFactory
Overrides:
getElementClassNames in class XercesDomFactory
See Also:
XMLCDomFactory.getElementClassNames(org.w3c.dom.Element)

isURLAttribute

public boolean isURLAttribute(Element element,
                              String attrName)
Description copied from interface: XMLCDomFactory
Determine if an an attribute of an element may contain a URL and should be subject to URL editing at compile time(or rewriting at run time. This method is required, as there is not way to define this in a XML DTD. With HTML, the attributes returned should have values of type %URL, %URI or %Script.
Specified by:
isURLAttribute in interface XMLCDomFactory
Overrides:
isURLAttribute in class XercesDomFactory
See Also:
XMLCDomFactory.isURLAttribute(org.w3c.dom.Element, java.lang.String)


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.