public class XmlHelpers extends Object
| Constructor and Description |
|---|
XmlHelpers() |
public static org.jdom2.Element textElement(String name, String text)
public static String getText(org.jdom2.Element parent, String name)
public static String getText(org.jdom2.Element parent, String name, String defaultValue)
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 URI loadPathURI(org.jdom2.Element parent, String name, String defaultRelativePath, URI basePath)
public static File loadPath(org.jdom2.Element parent, String name, File basePath)
public static URI loadPathURI(org.jdom2.Element parent, String name, URI 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 thispublic static org.jdom2.Element pathElementURI(String name, URI path, URI basePath)
Element with the given tag name containing a String representation of the given path.
The Element has an attribute "type" which can either be "absolute" or "relative".
If basePath is given try to relativize the path.name - tag namepath - path to storebasePath - if null put the absolute path, otherwise relative to thisElement with the given tag name containing a String representation of the given pathCopyright © 2013–2024 BigDataViewer. All rights reserved.