eu.emi.dsr.util
Class ServiceUtil

java.lang.Object
  extended by eu.emi.dsr.util.ServiceUtil

public class ServiceUtil
extends Object

Utility class to (Un)Marshal the Service information

Author:
a.memon

Field Summary
static SimpleDateFormat ISODateFormat
           
static SimpleDateFormat ServiceDateFormat
           
static SimpleDateFormat UTCISODateFormat
           
 
Constructor Summary
ServiceUtil()
           
 
Method Summary
static String convertStreamToString(InputStream is)
           
static List<String> getAttributeNames()
           
static void initLogger(String path)
          Simultaneously initializing the log4j and log4j
static boolean isValidServiceInfo(org.codehaus.jettison.json.JSONObject jo)
          Checks the service description being registered contains the mandatory service attributes
static String toUTCFormat(Date d)
           
static Date toUTCFormat(String d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ServiceDateFormat

public static SimpleDateFormat ServiceDateFormat

ISODateFormat

public static SimpleDateFormat ISODateFormat

UTCISODateFormat

public static SimpleDateFormat UTCISODateFormat
Constructor Detail

ServiceUtil

public ServiceUtil()
Method Detail

isValidServiceInfo

public static boolean isValidServiceInfo(org.codehaus.jettison.json.JSONObject jo)
                                  throws org.codehaus.jettison.json.JSONException
Checks the service description being registered contains the mandatory service attributes

Parameters:
serviceDesc -
Throws:
org.codehaus.jettison.json.JSONException

toUTCFormat

public static String toUTCFormat(Date d)

toUTCFormat

public static Date toUTCFormat(String d)
                        throws ParseException
Throws:
ParseException

convertStreamToString

public static String convertStreamToString(InputStream is)
                                    throws IOException
Throws:
IOException

getAttributeNames

public static List<String> getAttributeNames()

initLogger

public static void initLogger(String path)
Simultaneously initializing the log4j and log4j

Parameters:
path -


Copyright © 2012. All Rights Reserved.