|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object yarfraw.utils.CommonUtils
public class CommonUtils
Utilities methods.
Field Summary | |
---|---|
static String |
ATOM03_JAXB_CONTEXT
|
static String |
ATOM10_JAXB_CONTEXT
|
static String |
ISO_8601_LVL1_PATTERN
|
static String |
ISO_8601_LVL2_PATTERN
|
static String |
ISO_8601_LVL3_PATTERN
|
static String |
ISO_8601_LVL4_PATTERN
|
static String |
ISO_8601_LVL5_PATTERN
|
static String |
ISO_8601_LVL6_PATTERN
|
static String |
ISO8601DATE_PATTERN
|
static String |
NON_STANDARD_PATTERN1
|
static String |
NON_STANDARD_PATTERN2
|
static String |
NON_STANDARD_PATTERN3
|
static String |
NON_STANDARD_PATTERN4
|
static String |
NON_STANDARD_PATTERN5
|
static String |
NON_STANDARD_PATTERN6
|
static String |
NON_STANDARD_PATTERN7
|
static String |
RFC822DATE_PATTERN
|
static String |
RSS10_JAXB_CONTEXT
|
static String |
RSS20_JAXB_CONTEXT
|
Method Summary | |
---|---|
static Integer |
calculateTtl(UpdatePeriodEnum updatePeriod,
BigInteger updateFrequency)
calculate the ttl value from updatePeriod and updateFrequency |
static String |
formatDate(Date date,
FeedFormat format)
Format a Date object to string based on the input FeedFormat . |
static boolean |
isDateFormatValid(String dateString,
FeedFormat format)
Determines whether the input dateString is valid based on the input FeedFormat . |
static Date |
tryParseDate(String dateString)
Parse a date string using both ISO and RFC formats and some non standard formats. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RSS20_JAXB_CONTEXT
public static final String RSS10_JAXB_CONTEXT
public static final String ATOM10_JAXB_CONTEXT
public static final String ATOM03_JAXB_CONTEXT
public static final String RFC822DATE_PATTERN
public static final String ISO8601DATE_PATTERN
public static final String ISO_8601_LVL1_PATTERN
public static final String ISO_8601_LVL2_PATTERN
public static final String ISO_8601_LVL3_PATTERN
public static final String ISO_8601_LVL4_PATTERN
public static final String ISO_8601_LVL5_PATTERN
public static final String ISO_8601_LVL6_PATTERN
public static final String NON_STANDARD_PATTERN1
public static final String NON_STANDARD_PATTERN2
public static final String NON_STANDARD_PATTERN3
public static final String NON_STANDARD_PATTERN4
public static final String NON_STANDARD_PATTERN5
public static final String NON_STANDARD_PATTERN6
public static final String NON_STANDARD_PATTERN7
Method Detail |
---|
public static boolean isDateFormatValid(String dateString, FeedFormat format)
dateString
is valid based on the input FeedFormat
.
dateString
- format
-
public static Date tryParseDate(String dateString)
dateString
-
Date
representation of the input string. null if
unable to parse input string.public static String formatDate(Date date, FeedFormat format)
Date
object to string based on the input FeedFormat
.
For Atom 1.0 and RSS 1.0 it will be formatted as ISO8601 Level 5 string.
date
- any dateformat
- any FeedFormat
public static Integer calculateTtl(UpdatePeriodEnum updatePeriod, BigInteger updateFrequency)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |