org.zkoss.idom
Class DocType

java.lang.Object
  extended by org.zkoss.idom.impl.AbstractItem
      extended by org.zkoss.idom.DocType
All Implemented Interfaces:
Serializable, Cloneable, DocumentType, Node, Item

public class DocType
extends AbstractItem
implements DocumentType

The iDOM DocType.

Author:
tomyeh
See Also:
Document, Serialized Form

Field Summary
protected  String _intSubset
          The internal subset of the DOCTYPE
protected  String _name
          The element being constrained
protected  String _pubId
          The public ID of the DOCTYPE
protected  String _sysId
          The system ID of the DOCTYPE
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.zkoss.idom.Item
FIND_BY_PREFIX, FIND_BY_REGEX, FIND_BY_TAGNAME, FIND_IGNORE_CASE, FIND_RECURSIVE
 
Constructor Summary
protected DocType()
          Constructor.
  DocType(String elementName)
          Constructor.
  DocType(String elementName, String systemId)
          Constructor.
  DocType(String elementName, String publicId, String systemId)
          Constructor.
 
Method Summary
 NamedNodeMap getEntities()
           
 String getInternalSubset()
          Gets the data for the internal subset.
 String getName()
          Gets the element name being constrained.
 short getNodeType()
           
 NamedNodeMap getNotations()
           
 String getPublicId()
          Gets the public ID of an externally referenced DTD, or an empty String if none is referenced.
 String getSystemId()
          Gets the system ID of an externally referenced DTD, or an empty String if none is referenced.
 void setInternalSubset(String newData)
          Sets the data for the internal subset.
 void setName(String elementName)
          Sets the name of the item.
 void setPublicId(String publicId)
          Sets the public ID of an externally referenced DTD, or an empty String if none is referenced.
 void setSystemId(String systemId)
          Sets the system ID of an externally referenced DTD, or an empty String if none is referenced.
 String toString()
           
 
Methods inherited from class org.zkoss.idom.impl.AbstractItem
appendChild, clone, cloneNode, compareDocumentPosition, detach, equals, getAttributes, getBaseURI, getChildNodes, getDocument, getFeature, getFirstChild, getLastChild, getLocalName, getLocator, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousSibling, getText, getTextContent, getUserData, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, match, normalize, removeChild, replaceChild, setLocator, setNodeValue, setParent, setPrefix, setText, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Field Detail

_name

protected String _name
The element being constrained


_pubId

protected String _pubId
The public ID of the DOCTYPE


_sysId

protected String _sysId
The system ID of the DOCTYPE


_intSubset

protected String _intSubset
The internal subset of the DOCTYPE

Constructor Detail

DocType

public DocType(String elementName,
               String publicId,
               String systemId)
Constructor.

Parameters:
publicId - the public Id; null or empty if not availabl
systemId - the system Id; null or empty if not availabl

DocType

public DocType(String elementName,
               String systemId)
Constructor.


DocType

public DocType(String elementName)
Constructor.


DocType

protected DocType()
Constructor.

Method Detail

getPublicId

public final String getPublicId()
Gets the public ID of an externally referenced DTD, or an empty String if none is referenced.

Specified by:
getPublicId in interface DocumentType
Returns:
the public ID of referenced DTD; never null

setPublicId

public final void setPublicId(String publicId)
Sets the public ID of an externally referenced DTD, or an empty String if none is referenced.

Parameters:
publicId - the public Id; null or empty if not availabl

getSystemId

public final String getSystemId()
Gets the system ID of an externally referenced DTD, or an empty String if none is referenced.

Specified by:
getSystemId in interface DocumentType
Returns:
the system ID of referenced DTD; never null

setSystemId

public final void setSystemId(String systemId)
Sets the system ID of an externally referenced DTD, or an empty String if none is referenced.

Parameters:
systemId - the system Id; null or empty if not availabl

getInternalSubset

public final String getInternalSubset()
Gets the data for the internal subset.

Specified by:
getInternalSubset in interface DocumentType

setInternalSubset

public final void setInternalSubset(String newData)
Sets the data for the internal subset.


getName

public final String getName()
Gets the element name being constrained. Never null.

Specified by:
getName in interface DocumentType
Specified by:
getName in interface Item
See Also:
Namespaceable.getTagName()

setName

public final void setName(String elementName)
Description copied from interface: Item
Sets the name of the item. For vertices that support namespace (implements Namespaceable), it is the same as setTagName.

Specified by:
setName in interface Item
Overrides:
setName in class AbstractItem
See Also:
Namespaceable.setTagName(java.lang.String)

getNodeType

public final short getNodeType()
Specified by:
getNodeType in interface Node

getEntities

public final NamedNodeMap getEntities()
Specified by:
getEntities in interface DocumentType

getNotations

public final NamedNodeMap getNotations()
Specified by:
getNotations in interface DocumentType

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.