DocumentTypeImplpublic class DocumentTypeImpl extends LeafNodeImpl implements DocumentTypeProvides a straightforward implementation of the corresponding W3C DOM
interface. The class is used internally only, thus only notable members that
are not in the original interface are documented (the W3C docs are quite
extensive). Hope that's ok.
Some of the fields may have package visibility, so other classes belonging to
the DOM implementation can easily access them while maintaining the DOM tree
structure. |
Fields Summary |
---|
private String | qualifiedName | private String | publicId | private String | systemId |
Constructors Summary |
---|
DocumentTypeImpl(DOMImplementationImpl impl, String qualifiedName, String publicId, String systemId)
super(null);
if (qualifiedName == null || "".equals(qualifiedName)) {
throw new DOMException(DOMException.NAMESPACE_ERR, qualifiedName);
}
int prefixSeparator = qualifiedName.lastIndexOf(":");
if (prefixSeparator != -1) {
String prefix = qualifiedName.substring(0, prefixSeparator);
String localName = qualifiedName.substring(prefixSeparator + 1);
if (!DocumentImpl.isXMLIdentifier(prefix)) {
throw new DOMException(DOMException.NAMESPACE_ERR, qualifiedName);
}
if (!DocumentImpl.isXMLIdentifier(localName)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, qualifiedName);
}
} else {
if (!DocumentImpl.isXMLIdentifier(qualifiedName)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, qualifiedName);
}
}
this.qualifiedName = qualifiedName;
this.publicId = publicId;
this.systemId = systemId;
|
Methods Summary |
---|
public org.w3c.dom.NamedNodeMap | getEntities()
// TODO Dummy. Implement this later, if at all (we're DOM level 2 only).
return null;
| public java.lang.String | getInternalSubset()
// TODO Dummy. Implement this later, if at all (we're DOM level 2 only).
return null;
| public java.lang.String | getName()
return qualifiedName;
| public java.lang.String | getNodeName()
return qualifiedName;
| public short | getNodeType()
return Node.DOCUMENT_TYPE_NODE;
| public org.w3c.dom.NamedNodeMap | getNotations()
// TODO Dummy. Implement this later, if at all (we're DOM level 2 only).
return null;
| public java.lang.String | getPublicId()
return publicId;
| public java.lang.String | getSystemId()
return systemId;
|
|