org.gcube.data.trees.patterns
Class CalendarPattern

java.lang.Object
  extended by org.gcube.data.trees.patterns.AbstractPattern
      extended by org.gcube.data.trees.patterns.LeafPattern<Calendar,Constraint<? super Calendar>>
          extended by org.gcube.data.trees.patterns.CalendarPattern
All Implemented Interfaces:
Serializable, Pattern

public final class CalendarPattern
extends LeafPattern<Calendar,Constraint<? super Calendar>>

A Pattern that matches the value of a Leaf against a given Calendar Constraint.

Author:
Federico De Faveri (defaveri@isti.cnr.it)
See Also:
Serialized Form

Field Summary
static DateFormat ISO8601formatter
          Formatter for ISO8601.
static DateFormat ISO8601minFormatter
          Formatter for ISO8601 without time.
static DateFormat ISO8601shortFormatter
          Formatter for ISO8601 without time zones.
 
Fields inherited from class org.gcube.data.trees.patterns.LeafPattern
constraint
 
Constructor Summary
CalendarPattern(Constraint<? super Calendar> c)
          Creates an instance with a given constraint.
 
Method Summary
 String name()
          Returns the name of the pattern.
protected  Calendar valueOf(String s)
          Returns the typed equivalent of a leaf's value.
 
Methods inherited from class org.gcube.data.trees.patterns.LeafPattern
constraint, equals, hashCode, matches, prune, toString
 
Methods inherited from class org.gcube.data.trees.patterns.AbstractPattern
idPattern, setIdPattern
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ISO8601formatter

public static DateFormat ISO8601formatter
Formatter for ISO8601.


ISO8601shortFormatter

public static DateFormat ISO8601shortFormatter
Formatter for ISO8601 without time zones.


ISO8601minFormatter

public static DateFormat ISO8601minFormatter
Formatter for ISO8601 without time.

Constructor Detail

CalendarPattern

public CalendarPattern(Constraint<? super Calendar> c)
Creates an instance with a given constraint.

Parameters:
c - the constraint
Method Detail

valueOf

protected Calendar valueOf(String s)
                    throws Exception
Returns the typed equivalent of a leaf's value.

Specified by:
valueOf in class LeafPattern<Calendar,Constraint<? super Calendar>>
Parameters:
s - the value
Returns:
the typed value
Throws:
Exception

name

public String name()
Description copied from class: LeafPattern
Returns the name of the pattern.

Specified by:
name in class LeafPattern<Calendar,Constraint<? super Calendar>>
Returns:
the name


Copyright © 2012. All Rights Reserved.