cascading.operation.text
Class DateParser

java.lang.Object
  extended by cascading.operation.BaseOperation
      extended by cascading.operation.text.DateOperation
          extended by cascading.operation.text.DateParser
All Implemented Interfaces:
Function, Operation, Serializable

public class DateParser
extends DateOperation
implements Function

Class DateParser is used to convert a text date string to a timestamp, the number of milliseconds since January 1, 1970, 00:00:00 GMT, using the SimpleDateFormat syntax.

If given, individual Calendar fields can be stored in unique fields for a given TimeZone and Locale.

See Also:
Serialized Form

Field Summary
static String FIELD_NAME
          Field FIELD_NAME
 
Fields inherited from class cascading.operation.text.DateOperation
locale, zone
 
Fields inherited from class cascading.operation.BaseOperation
fieldDeclaration, numArgs
 
Fields inherited from interface cascading.operation.Operation
ANY
 
Constructor Summary
DateParser(Fields fieldDeclaration, int[] calendarFields, String dateFormatString)
          Constructor DateParser creates a new DateParser instance, where calendarFields is an int[] of Calendar field values.
DateParser(Fields fieldDeclaration, int[] calendarFields, TimeZone zone, Locale locale, String dateFormatString)
          Constructor DateParser creates a new DateParser instance, where calendarFields is an int[] of Calendar field values.
DateParser(Fields fieldDeclaration, String dateFormatString)
          Constructor DateParser creates a new DateParser instance.
DateParser(String dateFormatString)
          Constructor DateParser creates a new DateParser instance that creates a simple long time stamp of the parsed date.
 
Method Summary
 void operate(TupleEntry input, TupleCollector outputCollector)
          Method operate provides the implementation of this Function.
 
Methods inherited from class cascading.operation.text.DateOperation
getCalendar, getDateFormat
 
Methods inherited from class cascading.operation.BaseOperation
getFieldDeclaration, getNumArgs, printOperationInternal, toString, toStringInternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cascading.operation.Operation
getFieldDeclaration, getNumArgs
 

Field Detail

FIELD_NAME

public static final String FIELD_NAME
Field FIELD_NAME

See Also:
Constant Field Values
Constructor Detail

DateParser

public DateParser(String dateFormatString)
Constructor DateParser creates a new DateParser instance that creates a simple long time stamp of the parsed date.

Parameters:
dateFormatString - of type String

DateParser

public DateParser(Fields fieldDeclaration,
                  String dateFormatString)
Constructor DateParser creates a new DateParser instance.

Parameters:
fieldDeclaration - of type Fields
dateFormatString - of type String

DateParser

public DateParser(Fields fieldDeclaration,
                  int[] calendarFields,
                  String dateFormatString)
Constructor DateParser creates a new DateParser instance, where calendarFields is an int[] of Calendar field values. See Calendar.get(int).

Parameters:
fieldDeclaration - of type Fields
calendarFields - of type int[]
dateFormatString - of type String

DateParser

public DateParser(Fields fieldDeclaration,
                  int[] calendarFields,
                  TimeZone zone,
                  Locale locale,
                  String dateFormatString)
Constructor DateParser creates a new DateParser instance, where calendarFields is an int[] of Calendar field values. See Calendar.get(int). The TimeZone and/or Locale may also be set.

Parameters:
fieldDeclaration - of type Fields
calendarFields - of type int[]
zone - of type TimeZone
locale - of type Locale
dateFormatString - of type String
Method Detail

operate

public void operate(TupleEntry input,
                    TupleCollector outputCollector)
Description copied from interface: Function
Method operate provides the implementation of this Function.

Specified by:
operate in interface Function
Parameters:
input - of type TupleEntry
outputCollector - of type TupleEntryListIterator
See Also:
Function.operate(TupleEntry, TupleCollector)


Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.