org.enhydra.xml.xmlc.dom.xerces
Class XercesDomFactory

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
All Implemented Interfaces:
XMLCDomFactory
Direct Known Subclasses:
LazyDomFactory, XercesHTMLDomFactory

public class XercesDomFactory
extends Object
implements XMLCDomFactory

XMLC DOM factory for creating DocumentType and Document objects based on the Xerces DOM.


Inner Class Summary
 class XercesDomFactory.LinkedXercesDocument
          Deprecated. Remains for compaitiblity with objects compiled with XMLC 2.0.1
 
Constructor Summary
XercesDomFactory()
           
 
Method Summary
 Document createDocument(String namespaceURI, String qualifiedName, DocumentType docType)
          This creates a Document object that extends the Xerces Document class and implements XMLObjectLink.
 DocumentType createDocumentType(String qualifiedName, String publicId, String systemId, String internalSubset)
          Creates an empty DocumentType node.
 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.
 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 java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XercesDomFactory

public XercesDomFactory()
Method Detail

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
Returns:
"text/xml"
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
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
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
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
See Also:
XMLCDomFactory.isURLAttribute(org.w3c.dom.Element, java.lang.String)

createDocumentType

public DocumentType createDocumentType(String qualifiedName,
                                       String publicId,
                                       String systemId,
                                       String internalSubset)
Description copied from interface: XMLCDomFactory
Creates an empty DocumentType node.
Specified by:
createDocumentType in interface XMLCDomFactory
See Also:
XMLCDomFactory.createDocumentType(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

createDocument

public Document createDocument(String namespaceURI,
                               String qualifiedName,
                               DocumentType docType)
This creates a Document object that extends the Xerces Document class and implements XMLObjectLink.
Specified by:
createDocument in interface XMLCDomFactory
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
See Also:
XMLCDomFactory.getDocumentClassName()

nodeClassToInterface

public 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.
Specified by:
nodeClassToInterface in interface XMLCDomFactory
See Also:
XMLCDomFactory.nodeClassToInterface(org.w3c.dom.Node)


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