org.activemath.util
Class JdomUtil
java.lang.Object
org.activemath.util.JdomUtil
public class JdomUtil
- extends Object
Little class to contain utility code to manipulate JDom elements.
|
Method Summary |
static void |
addChildPossiblyCloning(org.jdom.Element parent,
org.jdom.Element child)
Adds the gien child at the end of the parent caring to clone
the element before in case it already has a parent. |
static void |
compareJDOMs(org.jdom.Document doc1,
org.jdom.Document doc2)
|
static void |
compareJDOMtree(org.jdom.Element elt1,
org.jdom.Element elt2)
|
static void |
dumpChildren(org.jdom.Element elt)
|
static List |
enumerateConceptRefs(org.jdom.Element elt)
|
static List |
enumerateRefs(org.jdom.Element elt)
Returns a simple list of all the ref elements that are descendent of the given element. |
static String |
getTitle(org.jdom.Element elt,
String preferredLang)
|
static boolean |
isConcept(org.jdom.Element elt)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
thisLogCat
protected static Logger thisLogCat
JdomUtil
public JdomUtil()
enumerateConceptRefs
public static List enumerateConceptRefs(org.jdom.Element elt)
enumerateRefs
public static List enumerateRefs(org.jdom.Element elt)
- Returns a simple list of all the
ref elements that are descendent of the given element.
The ref elemens can have whatever namespace.
- Returns:
- A list of
Object array of size 2 where the first element is
the ID of the element and the second is a string containing the child
of the ref element (and the empty string if there's no such) which is the link.
getTitle
public static String getTitle(org.jdom.Element elt,
String preferredLang)
dumpChildren
public static void dumpChildren(org.jdom.Element elt)
isConcept
public static boolean isConcept(org.jdom.Element elt)
addChildPossiblyCloning
public static void addChildPossiblyCloning(org.jdom.Element parent,
org.jdom.Element child)
- Adds the gien child at the end of the parent caring to clone
the element before in case it already has a parent.
compareJDOMs
public static void compareJDOMs(org.jdom.Document doc1,
org.jdom.Document doc2)
compareJDOMtree
public static void compareJDOMtree(org.jdom.Element elt1,
org.jdom.Element elt2)