Enhydra 3.1 API

org.enhydra.wireless.wml
Class WMLDomFactory

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
        |
        +--org.enhydra.wireless.wml.WMLDomFactory

public class WMLDomFactory
extends org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory

XMLC DOM factory for creating WML-specified DocumentType and Document objects. Specifying this class as the XMLCDomFctory to xmlc will produce XMLC document class that are WMLDocument classes. This is specified using:

 xmlc -dom-factory org.enhydra.wireless.wml.WMLDomFactory
 


Constructor Summary
WMLDomFactory()
           
 
Method Summary
 Document createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, DocumentType docType)
          Creates an XML Document object of the specified type.
 DocumentType createDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId, java.lang.String internalSubset)
          Creates an empty DocumentType node.
 java.lang.String[] getElementClassNames(Element elem)
          Extract the class names for an element.
 java.lang.String[] getInterfaceNames()
          Get the interface names that will automatically be added to all generated classes and interfaces.
 java.lang.String getMIMEType()
          Get the MIME type to associated with the document, or null if none should be associated.
 boolean isURLAttribute(Element element, java.lang.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.
 java.lang.String nodeClassToInterface(Node node)
          Convert an implementation-specific DOM node class name to the external interface or class name that should be used to reference it.
 
Methods inherited from class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
createAccessorGenerator, createDocBuilderGenerator, getBaseClassName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WMLDomFactory

public WMLDomFactory()
Method Detail

createDocumentType

public DocumentType createDocumentType(java.lang.String qualifiedName,
                                       java.lang.String publicId,
                                       java.lang.String systemId,
                                       java.lang.String internalSubset)
Description copied from interface: XMLCDomFactory
Creates an empty DocumentType node.
Overrides:
createDocumentType in class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
See Also:
XMLCDomFactory.createDocumentType(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

createDocument

public Document createDocument(java.lang.String namespaceURI,
                               java.lang.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.
Overrides:
createDocument in class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
See Also:
XMLCDomFactory.createDocument(java.lang.String, java.lang.String, org.w3c.dom.DocumentType)

getMIMEType

public java.lang.String getMIMEType()
Description copied from interface: XMLCDomFactory
Get the MIME type to associated with the document, or null if none should be associated.
Overrides:
getMIMEType in class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
See Also:
XMLCDomFactory.getMIMEType()

getInterfaceNames

public java.lang.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.
Overrides:
getInterfaceNames in class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
See Also:
XMLCDomFactory.getInterfaceNames()

nodeClassToInterface

public java.lang.String nodeClassToInterface(Node node)
Description copied from interface: XMLCDomFactory
Convert an implementation-specific DOM node class name to the external interface or class name that should be used to reference it. This could be a org.w3c.dom interface or other interface or class.
Overrides:
nodeClassToInterface in class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
See Also:
XMLCDomFactory.nodeClassToInterface(org.w3c.dom.Node)

getElementClassNames

public java.lang.String[] getElementClassNames(Element elem)
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.
Overrides:
getElementClassNames in class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
See Also:
XMLCDomFactory.getElementClassNames(org.w3c.dom.Element)

isURLAttribute

public boolean isURLAttribute(Element element,
                              java.lang.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.
Overrides:
isURLAttribute in class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
See Also:
XMLCDomFactory.isURLAttribute(org.w3c.dom.Element, java.lang.String)

Enhydra 3.1 API