Class DocumentContext
java.lang.Object
com.aquima.interactions.communication.impl.evaluator.composer.XmlElementContextBase
com.aquima.interactions.communication.impl.evaluator.composer.DocumentContext
- All Implemented Interfaces:
IXmlElementContext
Root xml element context implementation.
- Since:
- 9.0
- Author:
- Arjan pragt
-
Field Summary
Fields inherited from class com.aquima.interactions.communication.impl.evaluator.composer.XmlElementContextBase
namespaces, xmlElement
-
Constructor Summary
ConstructorsModifierConstructorDescriptionConstruct a document context.protected
DocumentContext
(NamespaceMap namespaces) Construct a document context with a namespace map. -
Method Summary
Modifier and TypeMethodDescriptionaddElement
(QualifiedName elementName) Add a child element by namevoid
setAttribute
(QualifiedName attributeName, String value) Set an attribute on the current elementvoid
setInstanceType
(QualifiedName complexType) Sets the instance type as an XML attributevoid
setNil()
Sets the value of the element as nilvoid
Sets the element's valueMethods inherited from class com.aquima.interactions.communication.impl.evaluator.composer.XmlElementContextBase
addElementToMap, asXmlElement, getDocumentString, getElement, getElements, removeElement, setNamespace
-
Constructor Details
-
DocumentContext
public DocumentContext()Construct a document context. -
DocumentContext
Construct a document context with a namespace map.- Parameters:
namespaces
- The namespaces map, may not be null
-
-
Method Details
-
setAttribute
Description copied from interface:IXmlElementContext
Set an attribute on the current element- Parameters:
attributeName
- The attribute namevalue
- The value of the attribute
-
addElement
Description copied from interface:IXmlElementContext
Add a child element by name- Parameters:
elementName
- The name of the element- Returns:
- The added element
-
setInstanceType
Description copied from interface:IXmlElementContext
Sets the instance type as an XML attribute- Parameters:
complexType
- The element type
-
setValue
Description copied from interface:IXmlElementContext
Sets the element's value- Parameters:
value
- The value to be setcdata
- True if a CDATA section should be created
-
setNil
public void setNil()Description copied from interface:IXmlElementContext
Sets the value of the element as nil
-