|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.dom.AbstractNode
org.apache.batik.dom.AbstractParentNode
org.apache.batik.dom.AbstractDocument
This class implements the Document
interface.
Nested Class Summary | |
protected class |
AbstractDocument.IdSoftRef
|
Nested classes inherited from class org.apache.batik.dom.AbstractParentNode |
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS |
Field Summary | |
protected DocumentEventSupport |
documentEventSupport
The DocumentEventSupport. |
protected Map |
elementsById
The elementsById lists. |
protected WeakHashMap |
elementsByTagNames
The ElementsByTagName lists. |
protected WeakHashMap |
elementsByTagNamesNS
The ElementsByTagNameNS lists. |
protected boolean |
eventsEnabled
Whether the event dispatching must be done. |
protected DOMImplementation |
implementation
The DOM implementation. |
protected LocalizableSupport |
localizableSupport
The localizable support for the error messages. |
protected static String |
RESOURCES
The error messages bundle class name. |
protected TraversalSupport |
traversalSupport
The traversal support. |
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 |
AbstractDocument()
Creates a new document. |
|
AbstractDocument(DocumentType dt,
DOMImplementation impl)
Creates a new document. |
Method Summary | |
void |
addIdEntry(Element e,
String id)
|
protected void |
checkChildType(Node n,
boolean replace)
Checks the validity of a node to be inserted. |
Node |
cloneNode(boolean deep)
DOM: Implements Node.cloneNode(boolean) . |
protected Node |
copyInto(Node n)
Copy the fields of the current node into the given node. |
Event |
createEvent(String eventType)
DOM: Implements DocumentEvent.createEvent(String) . |
NodeIterator |
createNodeIterator(Node root,
int whatToShow,
NodeFilter filter,
boolean entityReferenceExpansion)
DOM: Implements DocumentTraversal.createNodeIterator(Node,int,NodeFilter,boolean) . |
TreeWalker |
createTreeWalker(Node root,
int whatToShow,
NodeFilter filter,
boolean entityReferenceExpansion)
DOM: Implements DocumentTraversal.createTreeWalker(Node,int,NodeFilter,boolean) . |
protected Node |
deepCopyInto(Node n)
Deeply copy the fields of the current node into the given node. |
protected Node |
deepExport(Node n,
Document d)
Deeply exports this node to the given document. |
void |
detachNodeIterator(NodeIterator it)
Detaches the given node iterator from this document. |
protected Node |
export(Node n,
Document d)
Exports this node to the given document. |
String |
formatMessage(String key,
Object[] args)
Implements Localizable.formatMessage(String,Object[]) . |
Element |
getChildElementById(Node requestor,
String id)
Finds an element that is in the same document fragment as 'requestor' that has 'id'. |
protected AbstractDocument |
getCurrentDocument()
Returns the current document. |
DocumentType |
getDoctype()
DOM: Implements Document.getDoctype() . |
Element |
getDocumentElement()
DOM: Implements Document.getDocumentElement() . |
Element |
getElementById(String id)
DOM: Implements Document.getElementById(String) . |
AbstractParentNode.ElementsByTagName |
getElementsByTagName(Node n,
String ln)
Returns an ElementsByTagName object from the cache, if any. |
AbstractParentNode.ElementsByTagNameNS |
getElementsByTagNameNS(Node n,
String ns,
String ln)
Returns an ElementsByTagNameNS object from the cache, if any. |
boolean |
getEventsEnabled()
Tests whether the event dispatching must be done. |
DOMImplementation |
getImplementation()
DOM: Implements Document.getImplementation() . |
Locale |
getLocale()
Implements Localizable.getLocale() . |
String |
getNodeName()
DOM: Implements Node.getNodeName() . |
short |
getNodeType()
DOM: Implements Node.getNodeType() . |
protected Node |
getRoot(Node n)
|
Node |
importNode(Node importedNode,
boolean deep)
DOM: Implements Document.importNode(Node,boolean) . |
Node |
importNode(Node importedNode,
boolean deep,
boolean trimId)
Imports the given node 'importNode' to this document. |
abstract boolean |
isId(Attr node)
|
void |
nodeToBeRemoved(Node node)
Notifies this document that a node will be removed. |
void |
putElementsByTagName(Node n,
String ln,
AbstractParentNode.ElementsByTagName l)
Puts an ElementsByTagName object in the cache. |
void |
putElementsByTagNameNS(Node n,
String ns,
String ln,
AbstractParentNode.ElementsByTagNameNS l)
Puts an ElementsByTagNameNS object in the cache. |
void |
removeIdEntry(Element e,
String id)
Remove the mapping for element to id |
void |
setDoctype(DocumentType dt)
Sets the document type node. |
void |
setEventsEnabled(boolean b)
Sets the eventsEnabled property. |
void |
setLocale(Locale l)
Implements Localizable.setLocale(Locale) . |
void |
updateIdEntry(Element e,
String oldId,
String newId)
|
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, newNode, 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 |
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, 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 |
Methods inherited from interface org.apache.batik.dom.ExtendedNode |
isReadonly, setReadonly |
Field Detail |
protected static final String RESOURCES
protected transient LocalizableSupport localizableSupport
protected transient DOMImplementation implementation
protected transient TraversalSupport traversalSupport
protected transient DocumentEventSupport documentEventSupport
protected transient boolean eventsEnabled
protected transient WeakHashMap elementsByTagNames
protected transient WeakHashMap elementsByTagNamesNS
protected transient Map elementsById
Constructor Detail |
protected AbstractDocument()
public AbstractDocument(DocumentType dt, DOMImplementation impl)
Method Detail |
public void setLocale(Locale l)
Localizable.setLocale(Locale)
.
setLocale
in interface Localizable
l
- The locale to set.public Locale getLocale()
Localizable.getLocale()
.
getLocale
in interface Localizable
public String formatMessage(String key, Object[] args) throws MissingResourceException
Localizable.formatMessage(String,Object[])
.
formatMessage
in interface Localizable
key
- The key used to retreive the message from the resource
bundle.args
- The objects that compose the message.
MissingResourceException
- if the key is not in the bundle.public boolean getEventsEnabled()
public void setEventsEnabled(boolean b)
public String getNodeName()
Node.getNodeName()
.
getNodeName
in interface Node
public short getNodeType()
Node.getNodeType()
.
getNodeType
in interface Node
Node.DOCUMENT_NODE
public DocumentType getDoctype()
Document.getDoctype()
.
getDoctype
in interface Document
public void setDoctype(DocumentType dt)
public DOMImplementation getImplementation()
Document.getImplementation()
.
getImplementation
in interface Document
implementation
public Element getDocumentElement()
Document.getDocumentElement()
.
getDocumentElement
in interface Document
public Node importNode(Node importedNode, boolean deep) throws DOMException
Document.importNode(Node,boolean)
.
importNode
in interface Document
DOMException
public Node importNode(Node importedNode, boolean deep, boolean trimId)
public Node cloneNode(boolean deep)
Node.cloneNode(boolean)
.
cloneNode
in interface Node
cloneNode
in class AbstractNode
public abstract boolean isId(Attr node)
public Element getElementById(String id)
Document.getElementById(String)
.
getElementById
in interface Document
public Element getChildElementById(Node requestor, String id)
protected Node getRoot(Node n)
public void removeIdEntry(Element e, String id)
public void addIdEntry(Element e, String id)
public void updateIdEntry(Element e, String oldId, String newId)
public AbstractParentNode.ElementsByTagName getElementsByTagName(Node n, String ln)
public void putElementsByTagName(Node n, String ln, AbstractParentNode.ElementsByTagName l)
public AbstractParentNode.ElementsByTagNameNS getElementsByTagNameNS(Node n, String ns, String ln)
public void putElementsByTagNameNS(Node n, String ns, String ln, AbstractParentNode.ElementsByTagNameNS l)
public Event createEvent(String eventType) throws DOMException
DocumentEvent.createEvent(String)
.
createEvent
in interface DocumentEvent
DOMException
public NodeIterator createNodeIterator(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion) throws DOMException
DocumentTraversal.createNodeIterator(Node,int,NodeFilter,boolean)
.
createNodeIterator
in interface DocumentTraversal
DOMException
public TreeWalker createTreeWalker(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion) throws DOMException
DocumentTraversal.createTreeWalker(Node,int,NodeFilter,boolean)
.
createTreeWalker
in interface DocumentTraversal
DOMException
public void detachNodeIterator(NodeIterator it)
public void nodeToBeRemoved(Node node)
nodeToBeRemoved
in class AbstractParentNode
protected AbstractDocument getCurrentDocument()
getCurrentDocument
in class AbstractNode
protected Node export(Node n, Document d)
n
- The clone node.d
- The destination document.protected Node deepExport(Node n, Document d)
n
- The clone node.d
- The destination document.protected Node copyInto(Node n)
copyInto
in class AbstractNode
n
- a node of the type of this.protected Node deepCopyInto(Node n)
deepCopyInto
in class AbstractParentNode
n
- a node of the type of this.protected void checkChildType(Node n, boolean replace)
checkChildType
in class AbstractNode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |