Class DomDocumentImpl
java.lang.Object
org.camunda.bpm.model.xml.impl.instance.DomDocumentImpl
- All Implemented Interfaces:
DomDocument
- Author:
- Sebastian Menski
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones the DOM document.createElement
(String namespaceUri, String localName) Creates a new element in the dom document.boolean
Returns a newDOMSource
of the document.getElementById
(String id) Gets an element by its id.getElementsByNameNs
(String namespaceUri, String localName) Gets all elements with the namespace and name.Returns the root element of the document.protected String
int
hashCode()
registerNamespace
(String namespaceUri) Registers a new namespace with a generic prefix.void
registerNamespace
(String prefix, String namespaceUri) Registers a new namespace for the prefix.void
setRootElement
(DomElement rootElement) Sets the root element of the DOM document.
-
Field Details
-
GENERIC_NS_PREFIX
- See Also:
-
-
Constructor Details
-
DomDocumentImpl
-
-
Method Details
-
getRootElement
Description copied from interface:DomDocument
Returns the root element of the document.- Specified by:
getRootElement
in interfaceDomDocument
- Returns:
- the root element or null if non exists
-
setRootElement
Description copied from interface:DomDocument
Sets the root element of the DOM document. Replace an existing if necessary.- Specified by:
setRootElement
in interfaceDomDocument
- Parameters:
rootElement
- the new root element
-
createElement
Description copied from interface:DomDocument
Creates a new element in the dom document.- Specified by:
createElement
in interfaceDomDocument
- Parameters:
namespaceUri
- the namespaceUri of the new elementlocalName
- the localName of the new element- Returns:
- the new DOM element
-
getElementById
Description copied from interface:DomDocument
Gets an element by its id.- Specified by:
getElementById
in interfaceDomDocument
- Parameters:
id
- the id to search for- Returns:
- the element or null if no such element exists
-
getElementsByNameNs
Description copied from interface:DomDocument
Gets all elements with the namespace and name.- Specified by:
getElementsByNameNs
in interfaceDomDocument
- Parameters:
namespaceUri
- the element namespaceURI to search forlocalName
- the element name to search for- Returns:
- the list of matching elements
-
getDomSource
Description copied from interface:DomDocument
Returns a newDOMSource
of the document. Note that aDOMSource
wraps the underlyingDocument
which is not thread-safe. Multiple DOMSources of the same document should be synchronized by the calling application.- Specified by:
getDomSource
in interfaceDomDocument
- Returns:
- the new
DOMSource
-
registerNamespace
Description copied from interface:DomDocument
Registers a new namespace with a generic prefix.- Specified by:
registerNamespace
in interfaceDomDocument
- Parameters:
namespaceUri
- the namespaceUri of the new namespace- Returns:
- the used prefix
-
registerNamespace
Description copied from interface:DomDocument
Registers a new namespace for the prefix.- Specified by:
registerNamespace
in interfaceDomDocument
- Parameters:
prefix
- the prefix of the new namespacenamespaceUri
- the namespaceUri of the new namespace
-
getUnusedGenericNsPrefix
-
clone
Description copied from interface:DomDocument
Clones the DOM document.- Specified by:
clone
in interfaceDomDocument
- Overrides:
clone
in classObject
- Returns:
- the cloned DOM document
-
equals
-
hashCode
public int hashCode()
-