|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.properties.PropertyUtilities
Utilities for converting property values that are
org.w3c.dom.Element
objects
into other objects.
The methods assume that Property.getValue
returns a
org.w3c.dom.Element
that corresponds to an XML
fragment with a single root element and that the child of this
element (whether it be an element or a text node is the desired
value).
For example, the property value
<name>MyValue</name>
will be
converted into MyValue
by the method
getAsString
.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
Constructor Summary | |
PropertyUtilities()
|
Method Summary | |
static boolean |
getAsBoolean(Property property)
Retrieves the boolean value from a property. |
static float |
getAsFloat(Property property)
Retrieves the float value from a property. |
static int |
getAsInt(Property property)
Retrieves the integer value from a property. |
static javax.xml.namespace.QName |
getAsQName(Property property)
Retrieves the qualified name value from a property. |
static java.lang.String |
getAsString(Property property)
Retrieves a string value from a property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
Constructor Detail |
public PropertyUtilities()
Method Detail |
public static java.lang.String getAsString(Property property) throws DataFormatException
property
- Property whose value is to be parsed.
DataFormatException
- if the property value is not an
org.w3c.dom.Element
or this element does not
contain a single text node child that can be converted to a
string.public static int getAsInt(Property property) throws DataFormatException
property
- Property whose value is to be parsed.
DataFormatException
- if the property value is not an
org.w3c.dom.Element
or this element does not
contain a single text node child that can be converted to an
integer.public static float getAsFloat(Property property) throws DataFormatException
property
- Property whose value is to be parsed.
DataFormatException
- if the property value is not an
org.w3c.dom.Element
or this element does not
contain a single text node child that can be converted to a
float.public static boolean getAsBoolean(Property property) throws DataFormatException
property
- Property whose value is to be parsed.
DataFormatException
- if the property value is not an
org.w3c.dom.Element
or this element does not
contain a single text node child that can be converted to a
boolean.public static javax.xml.namespace.QName getAsQName(Property property) throws DataFormatException
property
- Property whose value is to be parsed.
DataFormatException
- if the property value is not an
org.w3c.dom.Element
or this element does not
contain a single text node child that can be converted to a
qualified name.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |