public class XmlHelpers extends Object
Constructor and Description |
---|
XmlHelpers() |
Modifier and Type | Method and Description |
---|---|
static org.jdom2.Element |
affineTransform3DElement(String name,
AffineGet value) |
static org.jdom2.Element |
booleanElement(String name,
boolean value) |
static org.jdom2.Element |
dimensionsElement(String name,
Dimensions size) |
static org.jdom2.Element |
doubleArrayElement(String name,
double[] value)
Append a double array as space-separated list of values
|
static org.jdom2.Element |
doubleElement(String name,
double value) |
static AffineTransform3D |
getAffineTransform3D(org.jdom2.Element parent,
String name) |
static AffineTransform3D |
getAffineTransform3D(org.jdom2.Element parent,
String name,
AffineTransform3D defaultValue) |
static boolean |
getBoolean(org.jdom2.Element parent,
String name) |
static boolean |
getBoolean(org.jdom2.Element parent,
String name,
boolean defaultValue) |
static Dimensions |
getDimensions(org.jdom2.Element parent,
String name) |
static Dimensions |
getDimensions(org.jdom2.Element parent,
String name,
Dimensions defaultValue) |
static double |
getDouble(org.jdom2.Element parent,
String name) |
static double |
getDouble(org.jdom2.Element parent,
String name,
double defaultValue) |
static double[] |
getDoubleArray(org.jdom2.Element parent,
String name) |
static double[] |
getDoubleArray(org.jdom2.Element parent,
String name,
double[] defaultValue) |
static double[] |
getDoubleArrayAttribute(org.jdom2.Element parent,
String name) |
static double |
getDoubleAttribute(org.jdom2.Element parent,
String name) |
static int |
getInt(org.jdom2.Element parent,
String name) |
static int |
getInt(org.jdom2.Element parent,
String name,
int defaultValue) |
static int[] |
getIntArray(org.jdom2.Element parent,
String name) |
static int[] |
getIntArray(org.jdom2.Element parent,
String name,
int[] defaultValue) |
static int |
getIntAttribute(org.jdom2.Element parent,
String name) |
static long[] |
getLongArray(org.jdom2.Element parent,
String name) |
static long[] |
getLongArray(org.jdom2.Element parent,
String name,
long[] defaultValue) |
static File |
getRelativePath(File file,
File relativeToThis) |
static String |
getText(org.jdom2.Element parent,
String name) |
static String |
getText(org.jdom2.Element parent,
String name,
String defaultValue) |
static org.jdom2.Element |
intArrayElement(String name,
int[] value) |
static org.jdom2.Element |
intElement(String name,
int value) |
static boolean |
isPathRelative(org.jdom2.Element parent,
String name) |
static File |
loadPath(org.jdom2.Element parent,
String name,
File basePath) |
static File |
loadPath(org.jdom2.Element parent,
String name,
String defaultRelativePath,
File basePath) |
static org.jdom2.Element |
longArrayElement(String name,
long[] value) |
static org.jdom2.Element |
pathElement(String name,
File path,
File basePath) |
static org.jdom2.Element |
textElement(String name,
String text) |
public static org.jdom2.Element intElement(String name, int value)
public static int getInt(org.jdom2.Element parent, String name)
public static int getInt(org.jdom2.Element parent, String name, int defaultValue)
public static org.jdom2.Element booleanElement(String name, boolean value)
public static boolean getBoolean(org.jdom2.Element parent, String name)
public static boolean getBoolean(org.jdom2.Element parent, String name, boolean defaultValue)
public static org.jdom2.Element doubleElement(String name, double value)
public static double getDouble(org.jdom2.Element parent, String name)
public static double getDouble(org.jdom2.Element parent, String name, double defaultValue)
public static double getDoubleAttribute(org.jdom2.Element parent, String name)
public static org.jdom2.Element doubleArrayElement(String name, double[] value)
public static double[] getDoubleArray(org.jdom2.Element parent, String name)
public static double[] getDoubleArray(org.jdom2.Element parent, String name, double[] defaultValue)
public static double[] getDoubleArrayAttribute(org.jdom2.Element parent, String name)
public static int getIntAttribute(org.jdom2.Element parent, String name)
public static org.jdom2.Element intArrayElement(String name, int[] value)
public static int[] getIntArray(org.jdom2.Element parent, String name)
public static int[] getIntArray(org.jdom2.Element parent, String name, int[] defaultValue)
public static org.jdom2.Element longArrayElement(String name, long[] value)
public static long[] getLongArray(org.jdom2.Element parent, String name)
public static long[] getLongArray(org.jdom2.Element parent, String name, long[] defaultValue)
public static org.jdom2.Element dimensionsElement(String name, Dimensions size)
public static Dimensions getDimensions(org.jdom2.Element parent, String name)
public static Dimensions getDimensions(org.jdom2.Element parent, String name, Dimensions defaultValue)
public static org.jdom2.Element affineTransform3DElement(String name, AffineGet value)
public static AffineTransform3D getAffineTransform3D(org.jdom2.Element parent, String name)
public static AffineTransform3D getAffineTransform3D(org.jdom2.Element parent, String name, AffineTransform3D defaultValue)
public static File loadPath(org.jdom2.Element parent, String name, String defaultRelativePath, File basePath)
public static boolean isPathRelative(org.jdom2.Element parent, String name)
true
if the path under parent/name
is stored relative, false
if absolute.public static org.jdom2.Element pathElement(String name, File path, File basePath)
basePath
- if null put the absolute path, otherwise relative to thisCopyright © 2015–2021 Fiji. All rights reserved.