Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.datatypes.xsd
Class AbstractDateTime

    java.lang.Object
      com.hp.hpl.jena.datatypes.xsd.AbstractDateTime

Direct Known Subclasses:
  XSDDateTime, XSDDuration

    public class AbstractDateTime

extends java.lang.Object

Base class for representation of XSD duration, time, date/time and related datatype instances. We are using the Xerces internal packages for the all heavy lifting which represent date/times using an int array. These wrapper classes just provide more convenient access to the date values.

This class includees code derived from Xerces 2.6.0 Copyright (c) 1999-2002 The Apache Software Foundation. All rights reserved.

Version:
  $Revision: 1.14 $ on $Date: 2008/01/02 12:10:49 $
Author:
  Dave Reynolds

Field Summary
`static short` | `EQUAL` constant to indicate an equals relationship from compare()
`static short` | `GREATER_THAN` constant to indicate a greater than relationship from compare()
`static short` | `INDETERMINATE` constant to indicate an indeterminate relationship from compare()
`static short` | `LESS_THAN` constant to indicate a less than relationship from compare()

Constructor Summary
`AbstractDateTime(java.lang.Object value)` Constructor

Method Summary
`int` | `compare(AbstractDateTime other)` Comparison function.
`boolean` | `equals(java.lang.Object obj)` Equality function
`int` | `hashCode()` hash function
`static void` | `normalize(int[] date, int[] timeZone)` If timezone present - normalize dateTime [E Adding durations to dateTimes] Public to allow reuse with type objects.

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LESS_THAN

    public static final short LESS_THAN

  constant to indicate a less than relationship from compare()

  See Also:
    Constant Field Values

### EQUAL

    public static final short EQUAL

  constant to indicate an equals relationship from compare()

  See Also:
    Constant Field Values

### GREATER_THAN

    public static final short GREATER_THAN

  constant to indicate a greater than relationship from compare()

  See Also:
    Constant Field Values

### INDETERMINATE

    public static final short INDETERMINATE

  constant to indicate an indeterminate relationship from compare()

  See Also:
    Constant Field Values

Constructor Detail

### AbstractDateTime

    public AbstractDateTime(java.lang.Object value)

  Constructor

  Parameters:
    `value` - the date/time value returned by the parsing

Method Detail

### compare

    public int compare(AbstractDateTime other)

  Comparison function. Not quite the same as normal java compare because XSD date/times are not always comparable.

  Parameters:
    `other` - the time/date to compare to
  Returns:
    an order flag - one of LESS_THAN, EQUAL, GREATER_THEN, INDETERMINATE

### equals

    public boolean equals(java.lang.Object obj)

  Equality function

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  hash function

  Overrides:
    `hashCode` in class `java.lang.Object`

### normalize

    public static void normalize(int[] date,
                                 int[] timeZone)

  If timezone present - normalize dateTime [E Adding durations to dateTimes] Public to allow reuse with type objects.

  Parameters:
    `date` - CCYY-MM-DDThh:mm:ss+03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP