uk.org.ogsadai.client.toolkit.properties
Class PropertyUtilities

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.properties.PropertyUtilities

public class PropertyUtilities
extends java.lang.Object

Utilities for converting property values from org.w3c.dom.Element into other objects.

For example, the property value <name>MyDataResource</name> will be converted into MyDataResource by the method getAsString().

Author:
The OGSA-DAI Team.

Constructor Summary
PropertyUtilities()
           
 
Method Summary
static boolean getAsBoolean(Property property)
           
static boolean[] getAsBooleanArray(Property property)
           
static float getAsFloat(Property property)
           
static float[] getAsFloatArray(Property property)
           
static int getAsInt(Property property)
           
static int[] getAsIntArray(Property property)
           
static javax.xml.namespace.QName getAsQName(Property property)
           
static javax.xml.namespace.QName[] getAsQNameArray(Property property)
           
static java.lang.String getAsString(Property property)
          Retrieves the string value from a property.
static java.lang.String[] getAsStringArray(Property property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyUtilities

public PropertyUtilities()
Method Detail

getAsString

public static java.lang.String getAsString(Property property)
                                    throws DataFormatException
Retrieves the string value from a property.

Parameters:
property -
Returns:
the string value
Throws:
DataFormatException - if the property format was not as expected

getAsInt

public static int getAsInt(Property property)
                    throws DataFormatException,
                           java.lang.NumberFormatException
DataFormatException
java.lang.NumberFormatException

getAsFloat

public static float getAsFloat(Property property)
                        throws DataFormatException
DataFormatException

getAsBoolean

public static boolean getAsBoolean(Property property)
                            throws DataFormatException
DataFormatException

getAsQName

public static javax.xml.namespace.QName getAsQName(Property property)
                                            throws DataFormatException
DataFormatException

getAsStringArray

public static java.lang.String[] getAsStringArray(Property property)

getAsIntArray

public static int[] getAsIntArray(Property property)

getAsFloatArray

public static float[] getAsFloatArray(Property property)

getAsBooleanArray

public static boolean[] getAsBooleanArray(Property property)

getAsQNameArray

public static javax.xml.namespace.QName[] getAsQNameArray(Property property)