|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jopendocument.dom.ChildCreator
public class ChildCreator
A helper to create children in the schema order.
Constructor Summary | |
---|---|
ChildCreator(org.jdom.Element content,
org.jdom.Element... children)
|
|
ChildCreator(org.jdom.Element content,
List<org.jdom.Element> children)
Create a new instance to add children to content . |
Method Summary | |
---|---|
org.jdom.Element |
addChild(org.jdom.Namespace childNS,
String childName)
|
static ChildCreator |
createFromSets(org.jdom.Element content,
List<Set<org.jdom.Element>> children)
Create a new instance to add children to content . |
org.jdom.Element |
getChild(org.jdom.Element child,
boolean create)
|
org.jdom.Element |
getChild(org.jdom.Namespace childNS,
String childName)
|
org.jdom.Element |
getChild(org.jdom.Namespace childNS,
String childName,
boolean create)
Return the asked child, optionally creating it. |
org.jdom.Element |
getElement()
|
void |
setChild(org.jdom.Element elem)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChildCreator(org.jdom.Element content, List<org.jdom.Element> children)
content
.
content
- the parent element where to create children.children
- the elements in the order they must appear inside content
. One
null
can be included, it matches any element.
IllegalArgumentException
- if a child is specified more than once in
children
.createFromSets(Element, List)
public ChildCreator(org.jdom.Element content, org.jdom.Element... children)
Method Detail |
---|
public static ChildCreator createFromSets(org.jdom.Element content, List<Set<org.jdom.Element>> children)
content
. This method accepts a list of
set to be able to specify more than one element for the same index.
content
- the parent element where to create children.children
- the elements in the order they must appear inside content
. One
null
can be included, it matches any element.
IllegalArgumentException
- if a child is specified more than once in
children
or if a set is empty.ChildCreator(Element, List)
public final org.jdom.Element getElement()
public final org.jdom.Element getChild(org.jdom.Namespace childNS, String childName)
public final org.jdom.Element getChild(org.jdom.Element child, boolean create)
public final org.jdom.Element getChild(org.jdom.Namespace childNS, String childName, boolean create)
childNS
- the namespace of the child.childName
- the name of the child.create
- whether it should be created in case it doesn't exist.
null
if it doesn't exist and create is
false
public final org.jdom.Element addChild(org.jdom.Namespace childNS, String childName)
public final void setChild(org.jdom.Element elem)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |