org.graphstream.util.time
Class ISODateComponent

java.lang.Object
  extended by org.graphstream.util.time.ISODateComponent
Direct Known Subclasses:
ISODateComponent.AliasComponent, ISODateComponent.AMPMComponent, ISODateComponent.EpochComponent, ISODateComponent.FieldComponent, ISODateComponent.NotImplementedComponent, ISODateComponent.TextComponent, ISODateComponent.UTCOffsetComponent

public abstract class ISODateComponent
extends Object

Defines components of ISODateIO.


Nested Class Summary
static class ISODateComponent.AliasComponent
          Defines an alias component.
static class ISODateComponent.AMPMComponent
          Component handling AM/PM.
static class ISODateComponent.EpochComponent
          Component handling a number of milliseconds since the epoch (january, 1st 1970).
static class ISODateComponent.FieldComponent
          Defines a component associated with a field of a calendar.
static class ISODateComponent.NotImplementedComponent
          Defines a not implemented component.
static class ISODateComponent.TextComponent
          Defines a text component.
static class ISODateComponent.UTCOffsetComponent
          Component handling utc offset (+/- 0000).
 
Field Summary
static ISODateComponent ABBREVIATED_MONTH_NAME
           
static ISODateComponent ABBREVIATED_MONTH_NAME_ALIAS
           
static ISODateComponent ABBREVIATED_WEEKDAY_NAME
           
static ISODateComponent AM_PM
           
static ISODateComponent CENTURY
           
static ISODateComponent DATE
           
static ISODateComponent DATE_ISO8601
           
static ISODateComponent DAY_OF_MONTH
           
static ISODateComponent DAY_OF_MONTH_2_DIGITS
           
static ISODateComponent DAY_OF_WEEK_0_6
           
static ISODateComponent DAY_OF_WEEK_1_7
           
static ISODateComponent DAY_OF_YEAR
           
static ISODateComponent EPOCH
           
static ISODateComponent FULL_MONTH_NAME
           
static ISODateComponent FULL_WEEKDAY_NAME
           
static ISODateComponent HOUR
           
static ISODateComponent HOUR_AND_MINUTE
           
static ISODateComponent HOUR_OF_DAY
           
static ISODateComponent LOCALE_CLOCK_TIME_12_HOUR
           
static ISODateComponent LOCALE_DATE_AND_TIME
           
static ISODateComponent LOCALE_DATE_REPRESENTATION
           
static ISODateComponent LOCALE_TIME_REPRESENTATION
           
static ISODateComponent LOCALE_TIME_ZONE_NAME
           
static ISODateComponent MILLISECOND
           
static ISODateComponent MINUTE
           
static ISODateComponent MONTH
           
static ISODateComponent NEW_LINE
           
static ISODateComponent PERCENT
           
static ISODateComponent SECOND
           
static ISODateComponent TABULATION
           
static ISODateComponent TIME_ISO8601
           
static ISODateComponent UTC_OFFSET
           
static ISODateComponent WEEK_BASED_YEAR_2_DIGITS
           
static ISODateComponent WEEK_BASED_YEAR_4_DIGITS
           
static ISODateComponent WEEK_NUMBER_ISO8601
           
static ISODateComponent WEEK_OF_YEAR_FROM_MONDAY
           
static ISODateComponent WEEK_OF_YEAR_FROM_SUNDAY
           
static ISODateComponent YEAR_2_DIGITS
           
static ISODateComponent YEAR_4_DIGITS
           
 
Constructor Summary
ISODateComponent(String directive, String replace)
          Build a new component composed of a directive name ("%.") and a replacement value.
 
Method Summary
abstract  String get(Calendar calendar)
          Get a string representation of this component for a given calendar.
 String getDirective()
          Access to the directive name of the component.
 String getReplacement()
          Get the replacement value of this component.
 boolean isAlias()
          Return true if this component is an alias.
abstract  void set(String value, Calendar calendar)
          Handle the value catched with the replacement value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABBREVIATED_WEEKDAY_NAME

public static final ISODateComponent ABBREVIATED_WEEKDAY_NAME

FULL_WEEKDAY_NAME

public static final ISODateComponent FULL_WEEKDAY_NAME

ABBREVIATED_MONTH_NAME

public static final ISODateComponent ABBREVIATED_MONTH_NAME

FULL_MONTH_NAME

public static final ISODateComponent FULL_MONTH_NAME

LOCALE_DATE_AND_TIME

public static final ISODateComponent LOCALE_DATE_AND_TIME

CENTURY

public static final ISODateComponent CENTURY

DAY_OF_MONTH_2_DIGITS

public static final ISODateComponent DAY_OF_MONTH_2_DIGITS

DATE

public static final ISODateComponent DATE

DAY_OF_MONTH

public static final ISODateComponent DAY_OF_MONTH

DATE_ISO8601

public static final ISODateComponent DATE_ISO8601

WEEK_BASED_YEAR_2_DIGITS

public static final ISODateComponent WEEK_BASED_YEAR_2_DIGITS

WEEK_BASED_YEAR_4_DIGITS

public static final ISODateComponent WEEK_BASED_YEAR_4_DIGITS

ABBREVIATED_MONTH_NAME_ALIAS

public static final ISODateComponent ABBREVIATED_MONTH_NAME_ALIAS

HOUR_OF_DAY

public static final ISODateComponent HOUR_OF_DAY

HOUR

public static final ISODateComponent HOUR

DAY_OF_YEAR

public static final ISODateComponent DAY_OF_YEAR

MILLISECOND

public static final ISODateComponent MILLISECOND

EPOCH

public static final ISODateComponent EPOCH

MONTH

public static final ISODateComponent MONTH

MINUTE

public static final ISODateComponent MINUTE

NEW_LINE

public static final ISODateComponent NEW_LINE

AM_PM

public static final ISODateComponent AM_PM

LOCALE_CLOCK_TIME_12_HOUR

public static final ISODateComponent LOCALE_CLOCK_TIME_12_HOUR

HOUR_AND_MINUTE

public static final ISODateComponent HOUR_AND_MINUTE

SECOND

public static final ISODateComponent SECOND

TABULATION

public static final ISODateComponent TABULATION

TIME_ISO8601

public static final ISODateComponent TIME_ISO8601

DAY_OF_WEEK_1_7

public static final ISODateComponent DAY_OF_WEEK_1_7

WEEK_OF_YEAR_FROM_SUNDAY

public static final ISODateComponent WEEK_OF_YEAR_FROM_SUNDAY

WEEK_NUMBER_ISO8601

public static final ISODateComponent WEEK_NUMBER_ISO8601

DAY_OF_WEEK_0_6

public static final ISODateComponent DAY_OF_WEEK_0_6

WEEK_OF_YEAR_FROM_MONDAY

public static final ISODateComponent WEEK_OF_YEAR_FROM_MONDAY

LOCALE_DATE_REPRESENTATION

public static final ISODateComponent LOCALE_DATE_REPRESENTATION

LOCALE_TIME_REPRESENTATION

public static final ISODateComponent LOCALE_TIME_REPRESENTATION

YEAR_2_DIGITS

public static final ISODateComponent YEAR_2_DIGITS

YEAR_4_DIGITS

public static final ISODateComponent YEAR_4_DIGITS

UTC_OFFSET

public static final ISODateComponent UTC_OFFSET

LOCALE_TIME_ZONE_NAME

public static final ISODateComponent LOCALE_TIME_ZONE_NAME

PERCENT

public static final ISODateComponent PERCENT
Constructor Detail

ISODateComponent

public ISODateComponent(String directive,
                        String replace)
Build a new component composed of a directive name ("%.") and a replacement value.

Parameters:
directive - directive name, should start with a leading '%'.
replace - replace the directive with the value given here.
Method Detail

getDirective

public String getDirective()
Access to the directive name of the component.

Returns:
directive of the component.

isAlias

public boolean isAlias()
Return true if this component is an alias. An alias can contain other directive name and its replacement should be parse again.

Returns:
true if component is an alias.

getReplacement

public String getReplacement()
Get the replacement value of this component.

Returns:
replacement value

set

public abstract void set(String value,
                         Calendar calendar)
Handle the value catched with the replacement value.

Parameters:
value - value matching the replacement string
calendar - calendar we are working on

get

public abstract String get(Calendar calendar)
Get a string representation of this component for a given calendar.

Parameters:
calendar - the calendar
Returns:
string representation of this component.


Copyright © 2013. All Rights Reserved.