Class DOMOutputElement
java.lang.Object
com.fasterxml.aalto.dom.OutputElementBase
com.fasterxml.aalto.dom.DOMOutputElement
- All Implemented Interfaces:
NamespaceContext
Context object that holds information about an open element
(one for which START_ELEMENT has been sent, but no END_ELEMENT)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate ElementActual DOM element for which this element object acts as a proxy.private DOMOutputElementReference to the parent element, element enclosing this element.Fields inherited from class OutputElementBase
_defaultNsURI, _nsMapping, _nsMapShared, _rootNsContext, PREFIX_MISBOUND, PREFIX_OK, PREFIX_UNBOUND -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstructor for the virtual root elementprivateDOMOutputElement(DOMOutputElement parent, Element element, BijectiveNsMap ns) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAttribute(String pname, String value) protected voidaddAttribute(String uri, String qname, String value) protected voidaddToPool(DOMOutputElement poolHead) Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader.voidappendChild(Node n) protected voidappendNode(Node n) protected DOMOutputElementcreateAndAttachChild(Element element) Simplest factory method, which gets called when a 1-argument element output method is called.protected DOMOutputElementcreateChild(Element element) static DOMOutputElementbooleanisRoot()private voidrelink(DOMOutputElement parent, Element element) Method called to reuse a pooled instance.protected DOMOutputElementreuseAsChild(DOMOutputElement parent, Element element) voidsetDefaultNsUri(String uri) protected voidMethods inherited from class OutputElementBase
addPrefix, generateMapping, getDefaultNsUri, getExplicitPrefix, getNamespaceURI, getPrefix, getPrefixes, isPrefixValid, relink, throwOutputError
-
Field Details
-
_parent
Reference to the parent element, element enclosing this element. Null for root element. Non-final to allow temporary pooling (on per-writer basis, to keep these short-lived). -
_element
Actual DOM element for which this element object acts as a proxy. -
_defaultNsSet
private boolean _defaultNsSet
-
-
Constructor Details
-
DOMOutputElement
private DOMOutputElement()Constructor for the virtual root element -
DOMOutputElement
-
-
Method Details
-
relink
Method called to reuse a pooled instance. -
createRoot
-
createAndAttachChild
Simplest factory method, which gets called when a 1-argument element output method is called. Element is assumed to use the current default namespace. Will both create the child element and attach it to parent element, or lacking own owner document. -
createChild
-
reuseAsChild
- Returns:
- New head of the recycle pool
-
addToPool
Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader. -
getParent
-
isRoot
public boolean isRoot()- Specified by:
isRootin classOutputElementBase
-
getNameDesc
- Specified by:
getNameDescin classOutputElementBase- Returns:
- String presentation of the fully-qualified name, in "prefix:localName" format (no URI). Useful for error and debugging messages.
-
setDefaultNsUri
- Specified by:
setDefaultNsUriin classOutputElementBase
-
setRootNsContext
- Specified by:
setRootNsContextin classOutputElementBase
-
appendNode
-
addAttribute
-
addAttribute
-
appendChild
-