org.jSyncManager.API.Conduit.Tools

Class JSXMLElement

Known Direct Subclasses:
JSXMLDate

public class JSXMLElement
extends org.jdom.Element

A single node of the JSXML XML Tree. This node is used for all types of elements in the XML tree, including CDATA.

Constructor Summary

JSXMLElement()
Creates a new instance of JSXMLElement
JSXMLElement(String name)
Creates a new instance of JSXMLElement with the name given.
JSXMLElement(String name, Calendar dateentry)
Creates a new instance of JSXMLElement with the given name and content of the Calendar date given.
JSXMLElement(String name, String value)
Creates a new instance of JSXMLElement with the given name and content of the String given.
JSXMLElement(String name, StringBuffer value)
Creates a new instance of JSXMLElement with the given name and content of the StringBuffer value given.
JSXMLElement(String name, boolean value)
Creates a new instance of JSXMLElement with the given name and content of the boolean given.
JSXMLElement(String name, byte value)
Creates a new instance of JSXMLElement with the given name and content of the byte value given.
JSXMLElement(String name, char value)
Creates a new instance of JSXMLElement with the given name and content of the char given.
JSXMLElement(String name, double value)
Creates a new instance of JSXMLElement with the given name and content of the double value given.
JSXMLElement(String name, float value)
Creates a new instance of JSXMLElement with the given name and content of the float given.
JSXMLElement(String name, int value)
Creates a new instance of JSXMLElement with the given name and content of the int value given.
JSXMLElement(String name, long value)
Creates a new instance of JSXMLElement with the given name and content of the long given.
JSXMLElement(String name, value[] )
Creates a new instance of JSXMLElement with the given name and content of the String array given.
JSXMLElement(String name, value[] )
Creates a new set of instances of JSXMLElement with the given name and content of the char array values given.
JSXMLElement(String name, value[] )
Creates a new instance of JSXMLElement with the given name and content of the boolean array values given.
JSXMLElement(String name, value[] )
Creates a new set of instances of JSXMLElement with the given name and content of the int array values given.
JSXMLElement(String name, value[] )
Creates a new instance of JSXMLElement with the given name and content of the long value array given.
JSXMLElement(String name, value[] )
Creates a new instance of JSXMLElement with the given name and content of the array of float values given.
JSXMLElement(String name, value[] )
Creates a new instance of JSXMLElement with the given name and content of the array of double values given.

Method Summary

boolean
readBooleanElement()
Read boolean element and return the value.
byte[]
readByteArrayElement()
Read byte array element and return the value in a byte array.
byte
readByteElement()
Read byte element and return the value.
char[]
readCharArrayElement()
Read char array element and return the value in a byte array.
char
readCharElement()
Read char element and return the value.
Calendar
readDateElement()
Read date element and return the Calendar value.
double[]
readDoubleArrayElement()
Read double array element and return the value in a byte array.
double
readDoubleElement()
Read double element and return the value.
float[]
readFloatArrayElement()
Read float array element and return the value in a byte array.
float
readFloatElement()
Read float element and return the value.
int[]
readIntArrayElement()
Read int array element and return the value in a byte array.
int
readIntElement()
Read int element and return the value.
long[]
readLongArrayElement()
Read long array element and return the value in a byte array.
long
readLongElement()
Read long element and return the value.
String[]
readStringArrayElement()
Read the Child contents of the JSXMLElement, and create a String array from them.

Constructor Details

JSXMLElement

public JSXMLElement()
Creates a new instance of JSXMLElement

JSXMLElement

public JSXMLElement(String name)
Creates a new instance of JSXMLElement with the name given.
Parameters:
name - String name of element

JSXMLElement

public JSXMLElement(String name,
                    Calendar dateentry)
Creates a new instance of JSXMLElement with the given name and content of the Calendar date given.
Parameters:
name - String name of element.
dateentry - Calendar object for date content.

JSXMLElement

public JSXMLElement(String name,
                    String value)
Creates a new instance of JSXMLElement with the given name and content of the String given.
Parameters:
name - String name of element.
value - String object for content.

JSXMLElement

public JSXMLElement(String name,
                    StringBuffer value)
Creates a new instance of JSXMLElement with the given name and content of the StringBuffer value given.
Parameters:
name - String name of element.
value - StringBuffer type for content.

JSXMLElement

public JSXMLElement(String name,
                    boolean value)
Creates a new instance of JSXMLElement with the given name and content of the boolean given.
Parameters:
name - String name of element.
value - Boolean primitive type for content.

JSXMLElement

public JSXMLElement(String name,
                    byte value)
Creates a new instance of JSXMLElement with the given name and content of the byte value given.
Parameters:
name - String name of element.
value - byte primitive type for content.

JSXMLElement

public JSXMLElement(String name,
                    char value)
Creates a new instance of JSXMLElement with the given name and content of the char given.
Parameters:
name - String name of element.
value - char primitive type for content.

JSXMLElement

public JSXMLElement(String name,
                    double value)
Creates a new instance of JSXMLElement with the given name and content of the double value given.
Parameters:
name - String name of element.
value - double primitive type for content.

JSXMLElement

public JSXMLElement(String name,
                    float value)
Creates a new instance of JSXMLElement with the given name and content of the float given.
Parameters:
name - String name of element.
value - float primitive type for content.

JSXMLElement

public JSXMLElement(String name,
                    int value)
Creates a new instance of JSXMLElement with the given name and content of the int value given.
Parameters:
name - String name of element.
value - int primitive type for content.

JSXMLElement

public JSXMLElement(String name,
                    long value)
Creates a new instance of JSXMLElement with the given name and content of the long given.
Parameters:
name - String name of element.
value - long primitive type for content.

JSXMLElement

public JSXMLElement(String name,
                    value[] )
Creates a new instance of JSXMLElement with the given name and content of the String array given. Each String content element is created as its own XML Element.
Parameters:
name - String name of element.

JSXMLElement

public JSXMLElement(String name,
                    value[] )
Creates a new set of instances of JSXMLElement with the given name and content of the char array values given.
Parameters:
name - String name of element.

JSXMLElement

public JSXMLElement(String name,
                    value[] )
Creates a new instance of JSXMLElement with the given name and content of the boolean array values given.
Parameters:
name - String name of element.

JSXMLElement

public JSXMLElement(String name,
                    value[] )
Creates a new set of instances of JSXMLElement with the given name and content of the int array values given.
Parameters:
name - String name of element.

JSXMLElement

public JSXMLElement(String name,
                    value[] )
Creates a new instance of JSXMLElement with the given name and content of the long value array given.
Parameters:
name - String name of element.

JSXMLElement

public JSXMLElement(String name,
                    value[] )
Creates a new instance of JSXMLElement with the given name and content of the array of float values given.
Parameters:
name - String name of element.

JSXMLElement

public JSXMLElement(String name,
                    value[] )
Creates a new instance of JSXMLElement with the given name and content of the array of double values given.
Parameters:
name - String name of element.

Method Details

readBooleanElement

public boolean readBooleanElement()
Read boolean element and return the value.
Returns:
boolean value content of the element.

readByteArrayElement

public byte[] readByteArrayElement()
Read byte array element and return the value in a byte array.
Returns:
byte array value content of the element's children.

readByteElement

public byte readByteElement()
Read byte element and return the value.
Returns:
byte value content of the element.

readCharArrayElement

public char[] readCharArrayElement()
Read char array element and return the value in a byte array.
Returns:
char array value content of the element's children.

readCharElement

public char readCharElement()
Read char element and return the value.
Returns:
char value content of the element.

readDateElement

public Calendar readDateElement()
Read date element and return the Calendar value.
Returns:
Calendar value content of the element.

readDoubleArrayElement

public double[] readDoubleArrayElement()
Read double array element and return the value in a byte array.
Returns:
double array value content of the element's children.

readDoubleElement

public double readDoubleElement()
Read double element and return the value.
Returns:
double value content of the element.

readFloatArrayElement

public float[] readFloatArrayElement()
Read float array element and return the value in a byte array.
Returns:
float array value content of the element's children.

readFloatElement

public float readFloatElement()
Read float element and return the value.
Returns:
float value content of the element.

readIntArrayElement

public int[] readIntArrayElement()
Read int array element and return the value in a byte array.
Returns:
int array value content of the element's children.

readIntElement

public int readIntElement()
Read int element and return the value.
Returns:
int value content of the element.

readLongArrayElement

public long[] readLongArrayElement()
Read long array element and return the value in a byte array.
Returns:
long array value content of the element's children.

readLongElement

public long readLongElement()
Read long element and return the value.
Returns:
long value content of the element.

readStringArrayElement

public String[] readStringArrayElement()
Read the Child contents of the JSXMLElement, and create a String array from them.
Returns:
String[] An array of String values from the Children of this Element.