|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a factory class that can create DocumentType and Document objects. It also provides document-type specific functions. This is used in implementing subclassed DOMs.
Classes implementing this must:
This class is designed to be build using a DOMImplementation object. However, since the DOM doesn't specify how DOMImplementation objects are obtained, we hide that detail. The methods are somewhat different for historic reasons.
DOMImplementation
,
HTMLDOMImplementation
Method Summary | |
Document |
createDocument(String namespaceURI,
String qualifiedName,
DocumentType doctype)
Creates an XML Document object of the specified type. |
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. |
Method Detail |
public DocumentType createDocumentType(String qualifiedName, String publicID, String systemID, String internalSubset)
DocumentType
node.qualifiedName
- The document type name (same as the root element).publicID
- The document type public identifier.systemID
- The document type system identifier.internalSubset
- The internal subset as a string.DocumentType
node.public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
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.namespaceURI
- The namespace URI of the document element to
create, or null.qualifiedName
- The document type name (same as the root element).
Maybe null for HTML documents or documents without DTDs.doctype
- The type of document to be created or null
.
When doctype
is not null
, its
Node.ownerDocument
attribute is set to the document being
created. Maybe null for for documents without DTDs or HTML documents.Document
object.DOMImplementation
,
HTMLDOMImplementation
public String getDocumentClassName()
public String getMIMEType()
public String getBaseClassName()
public String[] getInterfaceNames()
public String nodeClassToInterface(Node node)
org.w3c.dom
interface or
other interface or class.public String[] getElementClassNames(Element element)
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.public boolean isURLAttribute(Element element, String attrName)
element
- The element object the attribute is associated with.attrName
- The name of the attribute.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |