org.apache.airavata.wsmg.client.util
Class DcDate

java.lang.Object
  extended by org.apache.airavata.wsmg.client.util.DcDate
All Implemented Interfaces:
Cloneable

public final class DcDate
extends Object
implements Cloneable

Represent dc:date as an immutable value object. http://www.w3.org/TR/NOTE-datetime http://www.sics.se/~preben/DC/date_help.html


Field Summary
static String LOCATION_PROPERTY
           
 
Constructor Summary
DcDate(Calendar cal)
           
DcDate(String dcDate)
           
DcDate(TimeZone tz)
           
 
Method Summary
static List<String> breakIntoWords(String s)
           
static void check(String dcDate, int pos, char ch)
           
 Object clone()
           
static String escape(char ch)
           
static String escape(String s)
           
static void fill(StringBuffer sb, int value, int fields)
           
 int getDay()
           
 String getDcDate()
           
 String getDecimalFraction()
           
 int getHour()
           
static int getInt(String dcDate, int pos, int len)
           
 int getMinute()
           
 int getMonth()
           
 int getSecond()
           
 long getTimeInMillis()
           
 int getTimeZoneOffset()
           
static String getWikiTitle(String title)
          Take string and return string that has no spaces, only alpahnumerics, each word is capitalized (like WikiWords) sometimes called CamelCase?!.
 int getYear()
           
static String makeTwoDigit(int oneOrTwoDigits)
           
static String printable(char ch)
           
static String printable(String s)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCATION_PROPERTY

public static final String LOCATION_PROPERTY
See Also:
Constant Field Values
Constructor Detail

DcDate

public DcDate(TimeZone tz)
       throws RuntimeException
Throws:
RuntimeException

DcDate

public DcDate(Calendar cal)
       throws RuntimeException
Throws:
RuntimeException

DcDate

public DcDate(String dcDate)
       throws RuntimeException
Throws:
RuntimeException
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

getTimeInMillis

public long getTimeInMillis()

getYear

public int getYear()

getMonth

public int getMonth()

getDay

public int getDay()

getHour

public int getHour()

getMinute

public int getMinute()

getSecond

public int getSecond()

getTimeZoneOffset

public int getTimeZoneOffset()

getDcDate

public String getDcDate()

getDecimalFraction

public String getDecimalFraction()

toString

public String toString()
Overrides:
toString in class Object

printable

public static String printable(char ch)

printable

public static String printable(String s)

escape

public static String escape(char ch)

escape

public static String escape(String s)

fill

public static void fill(StringBuffer sb,
                        int value,
                        int fields)

check

public static void check(String dcDate,
                         int pos,
                         char ch)

getInt

public static int getInt(String dcDate,
                         int pos,
                         int len)
                  throws RuntimeException
Throws:
RuntimeException

getWikiTitle

public static String getWikiTitle(String title)
Take string and return string that has no spaces, only alpahnumerics, each word is capitalized (like WikiWords) sometimes called CamelCase?!.


breakIntoWords

public static List<String> breakIntoWords(String s)

makeTwoDigit

public static String makeTwoDigit(int oneOrTwoDigits)


Copyright © 2011-2012 The Apache Software Foundation. All Rights Reserved.