com.fasterxml.aalto.dom
Class DOMOutputElement

java.lang.Object
  extended by com.fasterxml.aalto.dom.OutputElementBase
      extended by com.fasterxml.aalto.dom.DOMOutputElement
All Implemented Interfaces:
NamespaceContext

public class DOMOutputElement
extends OutputElementBase

Context object that holds information about an open element (one for which START_ELEMENT has been sent, but no END_ELEMENT)

Author:
Tatu Saloranta

Field Summary
 
Fields inherited from class com.fasterxml.aalto.dom.OutputElementBase
_defaultNsURI, _nsMapping, _nsMapShared, _rootNsContext, PREFIX_MISBOUND, PREFIX_OK, PREFIX_UNBOUND
 
Method Summary
protected  void addAttribute(String pname, String value)
           
protected  void addAttribute(String uri, String qname, String value)
           
protected  void addToPool(DOMOutputElement poolHead)
          Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader.
 void appendChild(Node n)
           
protected  void appendNode(Node n)
           
protected  DOMOutputElement createAndAttachChild(Element element)
          Simplest factory method, which gets called when a 1-argument element output method is called.
protected  DOMOutputElement createChild(Element element)
           
static DOMOutputElement createRoot()
           
 String getNameDesc()
           
 DOMOutputElement getParent()
           
 boolean isRoot()
           
protected  DOMOutputElement reuseAsChild(DOMOutputElement parent, Element element)
           
 void setDefaultNsUri(String uri)
           
protected  void setRootNsContext(NamespaceContext ctxt)
           
 
Methods inherited from class com.fasterxml.aalto.dom.OutputElementBase
addPrefix, generateMapping, getDefaultNsUri, getExplicitPrefix, getNamespaceURI, getPrefix, getPrefixes, isPrefixValid, relink, throwOutputError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createRoot

public static DOMOutputElement createRoot()

createAndAttachChild

protected DOMOutputElement createAndAttachChild(Element element)
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

protected DOMOutputElement createChild(Element element)

reuseAsChild

protected DOMOutputElement reuseAsChild(DOMOutputElement parent,
                                        Element element)
Returns:
New head of the recycle pool

addToPool

protected void addToPool(DOMOutputElement poolHead)
Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader.


getParent

public DOMOutputElement getParent()

isRoot

public boolean isRoot()
Specified by:
isRoot in class OutputElementBase

getNameDesc

public String getNameDesc()
Specified by:
getNameDesc in class OutputElementBase
Returns:
String presentation of the fully-qualified name, in "prefix:localName" format (no URI). Useful for error and debugging messages.

setDefaultNsUri

public void setDefaultNsUri(String uri)
Specified by:
setDefaultNsUri in class OutputElementBase

setRootNsContext

protected void setRootNsContext(NamespaceContext ctxt)
Specified by:
setRootNsContext in class OutputElementBase

appendNode

protected void appendNode(Node n)

addAttribute

protected void addAttribute(String pname,
                            String value)

addAttribute

protected void addAttribute(String uri,
                            String qname,
                            String value)

appendChild

public void appendChild(Node n)


Copyright © 2012 Fasterxml.com. All Rights Reserved.