org.openrdf.util.xml.datatypes
Class DateTime

java.lang.Object
  extended byorg.openrdf.util.xml.datatypes.DateTime
All Implemented Interfaces:
Cloneable, Comparable

public class DateTime
extends Object
implements Cloneable, Comparable

This class provides utility functions for comparisons operating on xml:dateTime datatypes as specified in W3C, XML Schema Part 2: Datatypes Second Edition

Version:
0.2 2005-07-10
Author:
Thomas Beer, Arjohn Kampman

Constructor Summary
DateTime(String dateTimeString)
          Creates a new DateTime object for the supplied xsd:dateTime string value.
 
Method Summary
 Object clone()
           
 int compareTo(Object other)
          Compares this DateTime object to another DateTime object.
 boolean isNormalized()
          Checks whether this object has already been normalized.
 void normalize()
          Normalizes this dateTime object.
 String toString()
          Returns the xsd:dateTime string-representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateTime

public DateTime(String dateTimeString)
Creates a new DateTime object for the supplied xsd:dateTime string value.

Parameters:
dateTimeString - An xsd:dateTime value, for example 1999-05-31T13:20:00-05:00.
Method Detail

isNormalized

public boolean isNormalized()
Checks whether this object has already been normalized.


normalize

public void normalize()
Normalizes this dateTime object.


toString

public String toString()
Returns the xsd:dateTime string-representation of this object.

Returns:
An xsd:dateTime value, e.g. 1999-05-31T13:20:00-05:00.

compareTo

public int compareTo(Object other)
Compares this DateTime object to another DateTime object.

Specified by:
compareTo in interface Comparable
Throws:
ClassCastException - If other is not a DateTime object.

clone

public Object clone()


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.