|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.etaxonomy.cdm.common.XmlHelp
public class XmlHelp
| Constructor Summary | |
|---|---|
XmlHelp()
|
|
| Method Summary | |
|---|---|
static List<org.jdom.Element> |
getAttributedChildList(org.jdom.Element parent,
String elementName,
String attributeName)
|
static List<org.jdom.Element> |
getAttributedChildListWithValue(org.jdom.Element parent,
String elementName,
String attributeName,
String value)
Returns a list of children with the given element name and with a given attribute name and a given value for this attribute. The value comparison is case insensitive. |
static org.jdom.Element |
getBeansRoot(InputStream xmlInput)
returns the root Element in the File xmlFile |
static String |
getChildAttributeValue(org.jdom.Element element,
String childElementName,
org.jdom.Namespace childElementNamespace,
String childAttributeName,
org.jdom.Namespace childAttributeNamespace)
|
static org.jdom.Element |
getFirstAttributedChild(org.jdom.Element parent,
String elementName,
String attributeName,
String attributeValue)
|
static List<org.jdom.Element> |
getMultipleChildElement(org.jdom.Element parentElement,
String childName,
org.jdom.Namespace nsChild,
boolean obligatory)
|
static org.jdom.Element |
getOrAddChild(org.jdom.Element parent,
String elementName,
String attributeName,
String attributeValue)
|
static org.jdom.Element |
getRoot(InputStream xmlInput)
returns the root Element in the File xmlFile |
static org.jdom.Element |
getRoot(InputStream xmlInput,
String elementName)
returns the root Element in the File xmlFile |
static DoubleResult<org.jdom.Element,Boolean> |
getSingleChildElement(org.jdom.Element parentElement,
String childName,
org.jdom.Namespace nsChild,
boolean obligatory)
Gets the child element and tests if there is no other child element exists having the same name. |
static org.jdom.Element |
getSingleChildElement(ResultWrapper<Boolean> success,
org.jdom.Element parentElement,
String childName,
org.jdom.Namespace nsChild,
boolean obligatory)
|
static org.jdom.Element |
insertXmlBean(org.jdom.Element parent,
String strId,
String strClass)
|
static org.jdom.Element |
insertXmlRefProperty(org.jdom.Element parent,
String strName,
String strValue)
|
static org.jdom.Element |
insertXmlValueProperty(org.jdom.Element parent,
String strName,
String strValue)
|
static boolean |
saveToXml(org.jdom.Document doc,
OutputStream outStream,
org.jdom.output.Format format)
Writes the Document doc to the specified file |
static boolean |
saveToXml(org.jdom.Document doc,
String path,
String fileName,
org.jdom.output.Format format)
Writes the Document doc to the specified file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlHelp()
| Method Detail |
|---|
public static boolean saveToXml(org.jdom.Document doc,
String path,
String fileName,
org.jdom.output.Format format)
doc - path - fileName -
public static boolean saveToXml(org.jdom.Document doc,
OutputStream outStream,
org.jdom.output.Format format)
doc - path - fileName -
public static org.jdom.Element getFirstAttributedChild(org.jdom.Element parent,
String elementName,
String attributeName,
String attributeValue)
public static List<org.jdom.Element> getAttributedChildList(org.jdom.Element parent,
String elementName,
String attributeName)
public static List<org.jdom.Element> getAttributedChildListWithValue(org.jdom.Element parent,
String elementName,
String attributeName,
String value)
parent - elementName - attributeName - value -
public static String getChildAttributeValue(org.jdom.Element element,
String childElementName,
org.jdom.Namespace childElementNamespace,
String childAttributeName,
org.jdom.Namespace childAttributeNamespace)
public static org.jdom.Element getOrAddChild(org.jdom.Element parent,
String elementName,
String attributeName,
String attributeValue)
parent - elementName - attributeName - attributeValue -
public static org.jdom.Element insertXmlRefProperty(org.jdom.Element parent,
String strName,
String strValue)
public static org.jdom.Element insertXmlValueProperty(org.jdom.Element parent,
String strName,
String strValue)
public static org.jdom.Element insertXmlBean(org.jdom.Element parent,
String strId,
String strClass)
public static org.jdom.Element getRoot(InputStream xmlInput)
throws org.jdom.JDOMException,
IOException
xmlInput -
org.jdom.JDOMException
IOException
public static org.jdom.Element getRoot(InputStream xmlInput,
String elementName)
xmlInput - elementName -
public static org.jdom.Element getBeansRoot(InputStream xmlInput)
xmlInput -
public static DoubleResult<org.jdom.Element,Boolean> getSingleChildElement(org.jdom.Element parentElement,
String childName,
org.jdom.Namespace nsChild,
boolean obligatory)
true the second part of the result is false
Otherwise it is true.
parentElement - the parent elementchildName - name of the child elementnsChild - the namespace for the child elementobligatory - if true, return value is only true if exactly 1 child element with
the given name exists
public static org.jdom.Element getSingleChildElement(ResultWrapper<Boolean> success,
org.jdom.Element parentElement,
String childName,
org.jdom.Namespace nsChild,
boolean obligatory)
public static List<org.jdom.Element> getMultipleChildElement(org.jdom.Element parentElement,
String childName,
org.jdom.Namespace nsChild,
boolean obligatory)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||