org.jopendocument.dom
Class ChildCreator

java.lang.Object
  extended by org.jopendocument.dom.ChildCreator

public class ChildCreator
extends java.lang.Object

A helper to create children in the schema order.

Author:
Sylvain CUAZ

Constructor Summary
ChildCreator(org.jdom.Element content, org.jdom.Element... children)
           
 
Method Summary
 org.jdom.Element addChild(org.jdom.Namespace childNS, java.lang.String childName)
           
 org.jdom.Element getChild(org.jdom.Namespace childNS, java.lang.String childName)
           
 org.jdom.Element getChild(org.jdom.Namespace childNS, java.lang.String childName, boolean create)
          Return the asked child, optionally creating it.
 java.util.List<org.jdom.Element> getChildren()
           
 org.jdom.Element getElement()
           
 void setChild(org.jdom.Element elem)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChildCreator

public ChildCreator(org.jdom.Element content,
                    org.jdom.Element... children)
Method Detail

getElement

public final org.jdom.Element getElement()

getChildren

public final java.util.List<org.jdom.Element> getChildren()

getChild

public final org.jdom.Element getChild(org.jdom.Namespace childNS,
                                       java.lang.String childName)

getChild

public final org.jdom.Element getChild(org.jdom.Namespace childNS,
                                       java.lang.String childName,
                                       boolean create)
Return the asked child, optionally creating it.

Parameters:
childNS - the namespace of the child.
childName - the name of the child.
create - whether it should be created in case it doesn't exist.
Returns:
the asked child or null if it doesn't exist and create is false

addChild

public final org.jdom.Element addChild(org.jdom.Namespace childNS,
                                       java.lang.String childName)

setChild

public final void setChild(org.jdom.Element elem)