edu.ntnu.cikmr.services.resources
Class ResourceUtils

java.lang.Object
  extended by edu.ntnu.cikmr.services.resources.ResourceUtils

public class ResourceUtils
extends java.lang.Object


Constructor Summary
ResourceUtils()
           
 
Method Summary
static java.lang.Class[] convertParameterTypesToClasses(java.lang.String[] types)
           
static java.lang.String generateUniqueID()
           
static DataType getDataType(java.lang.String name)
           
static ResourceDescription getResourceDescriptionFromXML(java.io.File file)
           
static ResourceDescription getResourceDescriptionFromXML(java.lang.String xml)
           
static boolean hasDataType(java.lang.String name)
           
static void printResourceDescription(ResourceDescription resourceDescription, java.io.OutputStream outputStream)
           
static void registerDataType(DataType dataType)
           
static DataType removeDataType(java.lang.String name)
           
static java.lang.String typeConversion(java.lang.String type, java.lang.Object value)
           
static java.lang.Object typeConversion(java.lang.String type, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceUtils

public ResourceUtils()
Method Detail

generateUniqueID

public static java.lang.String generateUniqueID()

registerDataType

public static void registerDataType(DataType dataType)

hasDataType

public static boolean hasDataType(java.lang.String name)

removeDataType

public static DataType removeDataType(java.lang.String name)

getDataType

public static DataType getDataType(java.lang.String name)

convertParameterTypesToClasses

public static java.lang.Class[] convertParameterTypesToClasses(java.lang.String[] types)
                                                        throws javax.xml.datatype.DatatypeConfigurationException
Throws:
javax.xml.datatype.DatatypeConfigurationException

getResourceDescriptionFromXML

public static ResourceDescription getResourceDescriptionFromXML(java.lang.String xml)

getResourceDescriptionFromXML

public static ResourceDescription getResourceDescriptionFromXML(java.io.File file)

typeConversion

public static java.lang.String typeConversion(java.lang.String type,
                                              java.lang.Object value)
                                       throws javax.xml.datatype.DatatypeConfigurationException
Throws:
javax.xml.datatype.DatatypeConfigurationException

typeConversion

public static java.lang.Object typeConversion(java.lang.String type,
                                              java.lang.String value)
                                       throws javax.xml.datatype.DatatypeConfigurationException
Throws:
javax.xml.datatype.DatatypeConfigurationException

printResourceDescription

public static void printResourceDescription(ResourceDescription resourceDescription,
                                            java.io.OutputStream outputStream)