org.apache.batik.dom
Class GenericDocument

java.lang.Object
  extended byorg.apache.batik.dom.AbstractNode
      extended byorg.apache.batik.dom.AbstractParentNode
          extended byorg.apache.batik.dom.AbstractDocument
              extended byorg.apache.batik.dom.GenericDocument
All Implemented Interfaces:
org.w3c.dom.Document, org.w3c.dom.events.DocumentEvent, org.w3c.dom.traversal.DocumentTraversal, org.w3c.dom.events.EventTarget, ExtendedNode, Localizable, org.w3c.dom.Node, NodeEventTarget, java.io.Serializable

public class GenericDocument
extends AbstractDocument

This class implements the Document, DocumentEvent.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.apache.batik.dom.AbstractParentNode
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS
 
Field Summary
protected  boolean readonly
          Is this document immutable?
 
Fields inherited from class org.apache.batik.dom.AbstractDocument
documentEventSupport, elementsByTagNames, elementsByTagNamesNS, eventsEnabled, implementation, localizableSupport, RESOURCES, traversalSupport
 
Fields inherited from class org.apache.batik.dom.AbstractParentNode
childNodes
 
Fields inherited from class org.apache.batik.dom.AbstractNode
EMPTY_NODE_LIST, eventSupport, ownerDocument
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
protected GenericDocument()
          Creates a new uninitialized document.
  GenericDocument(org.w3c.dom.DocumentType dt, org.w3c.dom.DOMImplementation impl)
          Creates a new uninitialized document.
 
Method Summary
 org.w3c.dom.Attr createAttribute(java.lang.String name)
          DOM: Implements Document.createAttribute(String).
 org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          DOM: Implements Document.createAttributeNS(String,String).
 org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
          DOM: Implements Document.createCDATASection(String).
 org.w3c.dom.Comment createComment(java.lang.String data)
          DOM: Implements Document.createComment(String).
 org.w3c.dom.DocumentFragment createDocumentFragment()
          DOM: Implements Document.createDocumentFragment().
 org.w3c.dom.Element createElement(java.lang.String tagName)
          DOM: Implements Document.createElement(String).
 org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          DOM: Implements Document.createElementNS(String,String).
 org.w3c.dom.EntityReference createEntityReference(java.lang.String name)
          DOM: Implements Document.createEntityReference(String).
 org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
          DOM: Implements Document.createProcessingInstruction(String,String).
 org.w3c.dom.Text createTextNode(java.lang.String data)
          DOM: Implements Document.createTextNode(String).
protected static org.w3c.dom.Element getById(java.lang.String id, org.w3c.dom.Node node)
          An auxiliary method used by getElementById.
 org.w3c.dom.Element getElementById(java.lang.String elementId)
          DOM: Implements Document.getElementById(String).
 boolean isReadonly()
          Tests whether this node is readonly.
protected  org.w3c.dom.Node newNode()
          Returns a new uninitialized instance of this object's class.
 void setReadonly(boolean v)
          Sets this node readonly attribute.
 
Methods inherited from class org.apache.batik.dom.AbstractDocument
checkChildType, cloneNode, copyInto, createEvent, createNodeIterator, createTreeWalker, deepCopyInto, deepExport, detachNodeIterator, export, formatMessage, getCurrentDocument, getDoctype, getDocumentElement, getElementsByTagName, getElementsByTagNameNS, getEventsEnabled, getImplementation, getLocale, getNodeName, getNodeType, importNode, nodeToBeRemoved, putElementsByTagName, putElementsByTagNameNS, setDoctype, setEventsEnabled, setLocale
 
Methods inherited from class org.apache.batik.dom.AbstractParentNode
appendChild, checkAndRemove, deepExport, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, fireDOMSubtreeModifiedEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, hasChildNodes, insertBefore, nodeAdded, normalize, removeChild, replaceChild
 
Methods inherited from class org.apache.batik.dom.AbstractNode
addEventListener, createDOMException, dispatchEvent, export, fireDOMCharacterDataModifiedEvent, getAttributes, getEventSupport, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getParentNodeEventTarget, getPrefix, getPreviousSibling, hasAttributes, isSupported, removeEventListener, setNextSibling, setNodeName, setNodeValue, setOwnerDocument, setParentNode, setPrefix, setPreviousSibling, setSpecified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Document
getElementsByTagName, getElementsByTagNameNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Field Detail

readonly

protected boolean readonly
Is this document immutable?

Constructor Detail

GenericDocument

protected GenericDocument()
Creates a new uninitialized document.


GenericDocument

public GenericDocument(org.w3c.dom.DocumentType dt,
                       org.w3c.dom.DOMImplementation impl)
Creates a new uninitialized document.

Method Detail

isReadonly

public boolean isReadonly()
Tests whether this node is readonly.


setReadonly

public void setReadonly(boolean v)
Sets this node readonly attribute.


createElement

public org.w3c.dom.Element createElement(java.lang.String tagName)
                                  throws org.w3c.dom.DOMException
DOM: Implements Document.createElement(String).

Throws:
org.w3c.dom.DOMException

createDocumentFragment

public org.w3c.dom.DocumentFragment createDocumentFragment()
DOM: Implements Document.createDocumentFragment().


createTextNode

public org.w3c.dom.Text createTextNode(java.lang.String data)
DOM: Implements Document.createTextNode(String).


createComment

public org.w3c.dom.Comment createComment(java.lang.String data)
DOM: Implements Document.createComment(String).


createCDATASection

public org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
                                            throws org.w3c.dom.DOMException
DOM: Implements Document.createCDATASection(String).

Throws:
org.w3c.dom.DOMException

createProcessingInstruction

public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target,
                                                                     java.lang.String data)
                                                              throws org.w3c.dom.DOMException
DOM: Implements Document.createProcessingInstruction(String,String).

Returns:
a StyleSheetProcessingInstruction if target is "xml-stylesheet" or a GenericProcessingInstruction otherwise.
Throws:
org.w3c.dom.DOMException

getElementById

public org.w3c.dom.Element getElementById(java.lang.String elementId)
DOM: Implements Document.getElementById(String).


getById

protected static org.w3c.dom.Element getById(java.lang.String id,
                                             org.w3c.dom.Node node)
An auxiliary method used by getElementById.


createAttribute

public org.w3c.dom.Attr createAttribute(java.lang.String name)
                                 throws org.w3c.dom.DOMException
DOM: Implements Document.createAttribute(String).

Throws:
org.w3c.dom.DOMException

createEntityReference

public org.w3c.dom.EntityReference createEntityReference(java.lang.String name)
                                                  throws org.w3c.dom.DOMException
DOM: Implements Document.createEntityReference(String).

Throws:
org.w3c.dom.DOMException

createElementNS

public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName)
                                    throws org.w3c.dom.DOMException
DOM: Implements Document.createElementNS(String,String).

Throws:
org.w3c.dom.DOMException

createAttributeNS

public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI,
                                          java.lang.String qualifiedName)
                                   throws org.w3c.dom.DOMException
DOM: Implements Document.createAttributeNS(String,String).

Throws:
org.w3c.dom.DOMException

newNode

protected org.w3c.dom.Node newNode()
Returns a new uninitialized instance of this object's class.

Specified by:
newNode in class AbstractNode


Copyright © 2004 Apache Software Foundation. All Rights Reserved.