Class XmlElementContextBase
java.lang.Object
com.aquima.interactions.communication.impl.evaluator.composer.XmlElementContextBase
- All Implemented Interfaces:
IXmlElementContext
- Direct Known Subclasses:
DefaultXmlElementContext
,DocumentContext
Base class for
IXmlElementContext
implementations- Since:
- 9.5
- Author:
- Radu Batori
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addElementToMap
(QualifiedName elementName, IXmlElementContext elementContext) Add anIXmlElementContext
to the children mapGets the underlyingIXmlElement
Gets the XML document as stringgetElement
(QualifiedName elementName) Get a child element by nameGet all the child elements of the nodevoid
removeElement
(IXmlElementContext element) Remove a child elementvoid
setNamespace
(String prefix, String namespace) Set a namespace for the elementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.communication.IXmlElementContext
addElement, setAttribute, setInstanceType, setNil, setValue
-
Field Details
-
xmlElement
-
namespaces
-
-
Constructor Details
-
XmlElementContextBase
public XmlElementContextBase()
-
-
Method Details
-
addElementToMap
Add anIXmlElementContext
to the children map- Parameters:
elementName
- The name of the elementelementContext
- The element to be added
-
getElement
Get a child element by name- Specified by:
getElement
in interfaceIXmlElementContext
- Parameters:
elementName
- The qualified name of the element- Returns:
- The element as
IXmlElementContext
or null if not found
-
getElements
Get all the child elements of the node- Specified by:
getElements
in interfaceIXmlElementContext
- Returns:
- A
Collection
of the child elements
-
removeElement
Remove a child element- Specified by:
removeElement
in interfaceIXmlElementContext
- Parameters:
element
- The element to be removed
-
asXmlElement
Gets the underlyingIXmlElement
- Specified by:
asXmlElement
in interfaceIXmlElementContext
- Returns:
- The element as
IXmlElement
-
getDocumentString
Gets the XML document as string- Specified by:
getDocumentString
in interfaceIXmlElementContext
- Returns:
- The document string
-
setNamespace
Set a namespace for the element- Specified by:
setNamespace
in interfaceIXmlElementContext
- Parameters:
prefix
- The namespace prefixnamespace
- The namespace
-