public class JDOMUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
tagAlt |
static String |
tagLat |
static String |
tagLayerBounds |
static String |
tagLL |
static String |
tagLon |
static String |
tagStart |
static String |
tagStop |
static String |
tagUR |
static String |
tagX |
static String |
tagY |
static String |
tagZ |
| Constructor and Description |
|---|
JDOMUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
doc2String(org.jdom.Document doc) |
static org.jdom.Element |
findFirstChild(org.jdom.Element parentEl,
String childName) |
static Double |
getAttrDoubleVal(org.jdom.Element e,
String attrName) |
static String |
getAttrStringValIgnoreNamespace(org.jdom.Element resourceEl,
String attrName) |
static boolean |
getBooleanVal(org.jdom.Element e,
boolean defaultValue) |
static boolean |
getBooleanVal(org.jdom.Element e,
String childTag,
boolean defaultValue) |
static Boolean |
getBoolValIgnoreNamespace(org.jdom.Element rootEl,
String tagName,
org.jdom.Namespace[] namespaces,
boolean tryLowerCase) |
static Byte |
getByteVal(org.jdom.Element e) |
static Byte |
getByteVal(org.jdom.Element e,
String childText) |
static Byte |
getByteVal(org.jdom.Element e,
String childText,
org.jdom.Namespace ns) |
static org.jdom.Element |
getChildIgnoreNamespace(org.jdom.Element parentEl,
String childName,
org.jdom.Namespace[] namespaces,
boolean tryLowerCase) |
static List<org.jdom.Element> |
getChildrenIgnoreNamespace(org.jdom.Element parentEl,
String childName,
org.jdom.Namespace[] namespaces,
boolean tryLowerCase) |
static Double |
getDoubleVal(org.jdom.Element e) |
static Double |
getDoubleVal(org.jdom.Element e,
String childText) |
static Double |
getDoubleVal(org.jdom.Element e,
String childText,
double defaultValue) |
static Double |
getDoubleVal(org.jdom.Element e,
String childText,
org.jdom.Namespace ns) |
static Double |
getDoubleValIgnoreNamespace(org.jdom.Element rootEl,
String tagName,
org.jdom.Namespace[] namespaces,
boolean tryLowerCase) |
static org.jdom.Element |
getElementVal(org.jdom.Element e,
String tag) |
static Float |
getFloatVal(org.jdom.Element e,
String childText) |
static Float |
getFloatValIgnoreNamespace(org.jdom.Element rootEl,
String tagName,
org.jdom.Namespace[] namespaces,
boolean tryLowerCase) |
static Integer |
getIntegerVal(org.jdom.Element e) |
static Integer |
getIntegerVal(org.jdom.Element e,
String childText) |
static Integer |
getIntegerVal(org.jdom.Element e,
String childText,
int defaultValue) |
static Integer |
getIntegerVal(org.jdom.Element e,
String childText,
org.jdom.Namespace ns) |
static Long |
getLongVal(org.jdom.Element e) |
static Long |
getLongVal(org.jdom.Element e,
String childTag) |
static Long |
getLongVal(org.jdom.Element e,
String childText,
long defaultValue) |
static Long |
getLongVal(org.jdom.Element e,
String childText,
org.jdom.Namespace ns) |
static String |
getProp(org.jdom.Element e,
String childName,
org.slf4j.Logger logger,
String errorMessage) |
static Short |
getShortVal(org.jdom.Element e) |
static Short |
getShortVal(org.jdom.Element e,
String childText) |
static Short |
getShortVal(org.jdom.Element e,
String childText,
org.jdom.Namespace ns) |
static Short |
getShortVal(org.jdom.Element e,
String childText,
short defaultValue) |
static String |
getStringVal(org.jdom.Element e) |
static String |
getStringVal(org.jdom.Element e,
boolean trim) |
static String |
getStringVal(org.jdom.Element e,
String childText) |
static String |
getStringVal(org.jdom.Element e,
String childText,
boolean trim) |
static String |
getStringVal(org.jdom.Element e,
String childText,
org.jdom.Namespace ns) |
static String |
getStringValIgnoreNamespace(org.jdom.Element parentEl,
String childName,
org.jdom.Namespace[] namespaces,
boolean tryLowerCase) |
static org.jdom.Element |
parseDocument(File f) |
static org.jdom.Element |
parseDocument(InputSource is) |
static org.jdom.Element |
parseDocument(InputStream is) |
static org.jdom.Element |
parseDocument(String filename) |
static org.jdom.Element |
parseDocument(URL docUrl) |
static Boolean |
readBooleanVal(String tag,
org.jdom.Element el)
Warning: Can return null!
|
static javax.vecmath.Point2d[] |
readBounds(org.jdom.Element boundsEl) |
static javax.vecmath.Point2d[] |
readBounds(String tagName,
org.jdom.Element parentEl) |
static Color |
readColor(org.jdom.Element el) |
static Color |
readColor(String tagName,
org.jdom.Element el) |
static ArrayList<Color> |
readColorList(String tagName,
org.jdom.Element elList) |
static Date |
readDate(String tagName,
org.jdom.Element parentEl) |
static org.jdom.Document |
readDocumentFromString(String xmlData) |
static ArrayList<Double> |
readDoubleList(String tagName,
org.jdom.Element elList) |
static Double |
readDoubleVal(String tag,
org.jdom.Element el) |
static org.jdom.Element |
readElementFromString(String xmlData) |
static Integer |
readIntegerVal(String tag,
org.jdom.Element el) |
static javax.vecmath.Point2d |
readPoint(org.jdom.Element ptEl) |
static javax.vecmath.Point2d |
readPoint(String tagName,
org.jdom.Element parentEl) |
static javax.vecmath.Point2d |
readPoint2d(org.jdom.Element ptEl) |
static javax.vecmath.Point2d |
readPoint2d(String tagName,
org.jdom.Element parentEl) |
static javax.vecmath.Point3d |
readPoint3d(org.jdom.Element ptEl) |
static javax.vecmath.Point3d |
readPoint3d(String tagName,
org.jdom.Element parentEl) |
static ArrayList<javax.vecmath.Point3d> |
readPoint3dList(org.jdom.Element parentEl,
String tagName) |
static ArrayList<javax.vecmath.Point2d> |
readPointList(org.jdom.Element el) |
static String |
readStringVal(String tag,
org.jdom.Element el) |
static org.jdom.Document |
string2Doc(String xml) |
static org.jdom.Element |
writeBooleanVal(String tag,
Boolean b) |
static org.jdom.Element |
writeBounds(String tagName,
javax.vecmath.Point2d[] bounds) |
static org.jdom.Element |
writeByteVal(String tag,
byte b) |
static org.jdom.Element |
writeByteVal(String tag,
byte b,
org.jdom.Namespace ns) |
static org.jdom.Element |
writeColor(String tagName,
Color c) |
static ArrayList<org.jdom.Element> |
writeColorList(String tagName,
List<Color> colorList) |
static org.jdom.Element |
writeDate(String tagName,
Date date) |
static ArrayList<org.jdom.Element> |
writeDoubleList(String tagName,
List<Double> doubleList) |
static org.jdom.Element |
writeDoubleVal(String tag,
double d) |
static org.jdom.Element |
writeDoubleVal(String tag,
double d,
org.jdom.Namespace ns) |
static org.jdom.Element |
writeElement(String tag,
org.jdom.Element childElm) |
static org.jdom.Element |
writeElement(String tag,
org.jdom.Element childElm,
org.jdom.Namespace ns) |
static org.jdom.Element |
writeElementList(String tag,
Collection<?> c) |
static org.jdom.Element |
writeElementList(String tag,
Collection<?> c,
org.jdom.Namespace ns) |
static void |
writeElementToStream(org.jdom.Element e,
OutputStream os) |
static void |
writeElementToStreamPretty(org.jdom.Element e,
OutputStream os) |
static String |
writeElementToString(org.jdom.Element e) |
static String |
writeElementToStringWithoutHeader(org.jdom.Element e) |
static void |
writeElementToWriter(org.jdom.Element e,
Writer writer) |
static org.jdom.Element |
writeEmptyProperty(String tag) |
static org.jdom.Element |
writeFloatVal(String tag,
float f) |
static org.jdom.Element |
writeIntegerVal(String tag,
int i) |
static org.jdom.Element |
writeIntegerVal(String tag,
int i,
org.jdom.Namespace ns) |
static org.jdom.Element |
writeLongVal(String tag,
long i) |
static org.jdom.Element |
writeLongVal(String tag,
long i,
org.jdom.Namespace ns) |
static org.jdom.Element |
writePoint(String tagName,
javax.vecmath.Point2d pt) |
static org.jdom.Element |
writePoint2d(String tagName,
javax.vecmath.Point2d pt) |
static org.jdom.Element |
writePoint3d(String tagName,
javax.vecmath.Point3d pt) |
static org.jdom.Element |
writePoint3dList(String tagName,
ArrayList<javax.vecmath.Point3d> pts) |
static org.jdom.Element |
writePointList(String tagName,
ArrayList<javax.vecmath.Point2d> pts) |
static org.jdom.Element |
writeShortVal(String tag,
short s) |
static org.jdom.Element |
writeShortVal(String tag,
short s,
org.jdom.Namespace ns) |
static org.jdom.Element |
writeStringVal(String tag,
String val) |
static org.jdom.Element |
writeStringVal(String tag,
String val,
org.jdom.Namespace ns) |
public static final String tagLayerBounds
public static final String tagX
public static final String tagY
public static final String tagZ
public static final String tagLat
public static final String tagLon
public static final String tagAlt
public static final String tagLL
public static final String tagUR
public static final String tagStart
public static final String tagStop
public static org.jdom.Element parseDocument(URL docUrl)
public static org.jdom.Element parseDocument(File f)
public static org.jdom.Element parseDocument(InputStream is)
public static org.jdom.Element parseDocument(InputSource is)
public static org.jdom.Element parseDocument(String filename)
public static void writeElementToStream(org.jdom.Element e,
OutputStream os)
public static void writeElementToStreamPretty(org.jdom.Element e,
OutputStream os)
public static String writeElementToString(org.jdom.Element e)
public static String writeElementToStringWithoutHeader(org.jdom.Element e)
public static void writeElementToWriter(org.jdom.Element e,
Writer writer)
public static org.jdom.Document readDocumentFromString(String xmlData)
public static org.jdom.Element readElementFromString(String xmlData)
public static String getProp(org.jdom.Element e, String childName, org.slf4j.Logger logger, String errorMessage)
public static org.jdom.Element writeElementList(String tag, Collection<?> c)
public static org.jdom.Element writeElementList(String tag, Collection<?> c, org.jdom.Namespace ns)
public static org.jdom.Element writeElement(String tag, org.jdom.Element childElm)
public static org.jdom.Element writeElement(String tag, org.jdom.Element childElm, org.jdom.Namespace ns)
public static org.jdom.Element writeStringVal(String tag, String val, org.jdom.Namespace ns)
public static String getStringVal(org.jdom.Element e, String childText, org.jdom.Namespace ns)
public static String getStringVal(org.jdom.Element e)
public static String getStringVal(org.jdom.Element e, boolean trim)
public static org.jdom.Element writeEmptyProperty(String tag)
public static org.jdom.Element writeDoubleVal(String tag, double d)
public static org.jdom.Element writeDoubleVal(String tag, double d, org.jdom.Namespace ns)
public static Double getDoubleVal(org.jdom.Element e)
public static Double getDoubleVal(org.jdom.Element e, String childText, double defaultValue)
public static Double getDoubleVal(org.jdom.Element e, String childText, org.jdom.Namespace ns)
public static org.jdom.Element writeFloatVal(String tag, float f)
public static org.jdom.Element writeIntegerVal(String tag, int i)
public static org.jdom.Element writeIntegerVal(String tag, int i, org.jdom.Namespace ns)
public static org.jdom.Element writeShortVal(String tag, short s)
public static org.jdom.Element writeShortVal(String tag, short s, org.jdom.Namespace ns)
public static Short getShortVal(org.jdom.Element e)
public static Short getShortVal(org.jdom.Element e, String childText, short defaultValue)
public static Short getShortVal(org.jdom.Element e, String childText, org.jdom.Namespace ns)
public static org.jdom.Element writeByteVal(String tag, byte b)
public static org.jdom.Element writeByteVal(String tag, byte b, org.jdom.Namespace ns)
public static Byte getByteVal(org.jdom.Element e)
public static Byte getByteVal(org.jdom.Element e, String childText, org.jdom.Namespace ns)
public static Integer getIntegerVal(org.jdom.Element e)
public static Integer getIntegerVal(org.jdom.Element e, String childText, int defaultValue)
public static Integer getIntegerVal(org.jdom.Element e, String childText, org.jdom.Namespace ns)
public static org.jdom.Element writeLongVal(String tag, long i)
public static org.jdom.Element writeLongVal(String tag, long i, org.jdom.Namespace ns)
public static Long getLongVal(org.jdom.Element e)
public static Long getLongVal(org.jdom.Element e, String childText, org.jdom.Namespace ns)
public static boolean getBooleanVal(org.jdom.Element e,
String childTag,
boolean defaultValue)
public static boolean getBooleanVal(org.jdom.Element e,
boolean defaultValue)
public static org.jdom.Element getElementVal(org.jdom.Element e,
String tag)
public static javax.vecmath.Point2d readPoint(String tagName, org.jdom.Element parentEl)
public static javax.vecmath.Point2d readPoint(org.jdom.Element ptEl)
public static org.jdom.Element writePoint(String tagName, javax.vecmath.Point2d pt)
public static org.jdom.Element writePointList(String tagName, ArrayList<javax.vecmath.Point2d> pts)
public static ArrayList<javax.vecmath.Point2d> readPointList(org.jdom.Element el)
public static org.jdom.Element writePoint3dList(String tagName, ArrayList<javax.vecmath.Point3d> pts)
public static ArrayList<javax.vecmath.Point3d> readPoint3dList(org.jdom.Element parentEl, String tagName)
public static org.jdom.Element writePoint2d(String tagName, javax.vecmath.Point2d pt)
public static javax.vecmath.Point2d readPoint2d(String tagName, org.jdom.Element parentEl)
public static javax.vecmath.Point2d readPoint2d(org.jdom.Element ptEl)
public static org.jdom.Element writePoint3d(String tagName, javax.vecmath.Point3d pt)
public static javax.vecmath.Point3d readPoint3d(String tagName, org.jdom.Element parentEl)
public static javax.vecmath.Point3d readPoint3d(org.jdom.Element ptEl)
public static javax.vecmath.Point2d[] readBounds(String tagName, org.jdom.Element parentEl)
public static javax.vecmath.Point2d[] readBounds(org.jdom.Element boundsEl)
public static org.jdom.Element writeBounds(String tagName, javax.vecmath.Point2d[] bounds)
public static ArrayList<Double> readDoubleList(String tagName, org.jdom.Element elList)
public static ArrayList<org.jdom.Element> writeDoubleList(String tagName, List<Double> doubleList)
public static ArrayList<org.jdom.Element> writeColorList(String tagName, List<Color> colorList)
public static Boolean readBooleanVal(String tag, org.jdom.Element el)
tag - el - public static Color readColor(org.jdom.Element el)
public static org.jdom.Element findFirstChild(org.jdom.Element parentEl,
String childName)
public static org.jdom.Element getChildIgnoreNamespace(org.jdom.Element parentEl,
String childName,
org.jdom.Namespace[] namespaces,
boolean tryLowerCase)
public static List<org.jdom.Element> getChildrenIgnoreNamespace(org.jdom.Element parentEl, String childName, org.jdom.Namespace[] namespaces, boolean tryLowerCase)
public static String getStringValIgnoreNamespace(org.jdom.Element parentEl, String childName, org.jdom.Namespace[] namespaces, boolean tryLowerCase)
public static Double getDoubleValIgnoreNamespace(org.jdom.Element rootEl, String tagName, org.jdom.Namespace[] namespaces, boolean tryLowerCase)
public static Float getFloatValIgnoreNamespace(org.jdom.Element rootEl, String tagName, org.jdom.Namespace[] namespaces, boolean tryLowerCase)
public static Boolean getBoolValIgnoreNamespace(org.jdom.Element rootEl, String tagName, org.jdom.Namespace[] namespaces, boolean tryLowerCase)
public static String getAttrStringValIgnoreNamespace(org.jdom.Element resourceEl, String attrName)
public static org.jdom.Document string2Doc(String xml)
public static String doc2String(org.jdom.Document doc)
Copyright © 2013–2019. All rights reserved.