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 XSDDuration

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

    public class XSDDuration

extends AbstractDateTime

Represent an XSD duration value. We use a seven dimensional space with years, months, days, hours, minutes, seconds and fractional seconds. This deviates from the spec which allows arbitrary position decimals for seconds.

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

Field Summary

Fields inherited from class com.hp.hpl.jena.datatypes.xsd.AbstractDateTime
`EQUAL, GREATER_THAN, INDETERMINATE, LESS_THAN`

Constructor Summary
`XSDDuration(java.lang.Object value)` Constructor - should only be used by the internals but public scope because the internals spread across multiple packages.

Method Summary
`java.math.BigDecimal` | `getBigSeconds()` Return the number of seconds in the duration, including the fractional part, in a lossless but expensive notation - i.e. a BigDecimal.
`int` | `getDays()` Return the number of years in the duration
`int` | `getFullSeconds()` Return the number of full seconds in the duration
`int` | `getHours()` Return the number of hours in the duration
`int` | `getMinutes()` Return the number of minutes in the duration
`int` | `getMonths()` Return the number of months in the duration
`double` | `getSeconds()` Return the number of seconds in the duration, including fractional part
`double` | `getTimePart()` Return the time component of the duration - i.e. just the hours/mins/seconds, and returns the values in seconds.
`int` | `getYears()` Return the number of years in the duration
`java.lang.String` | `toString()` Serializer

Methods inherited from class com.hp.hpl.jena.datatypes.xsd.AbstractDateTime
`compare, equals, hashCode, normalize`

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

Constructor Detail

### XSDDuration

    public XSDDuration(java.lang.Object value)

  Constructor - should only be used by the internals but public scope because the internals spread across multiple packages.

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

Method Detail

### getYears

    public int getYears()

  Return the number of years in the duration

### getMonths

    public int getMonths()

  Return the number of months in the duration

### getDays

    public int getDays()

  Return the number of years in the duration

### getHours

    public int getHours()

  Return the number of hours in the duration

### getMinutes

    public int getMinutes()

  Return the number of minutes in the duration

### getFullSeconds

    public int getFullSeconds()

  Return the number of full seconds in the duration

### getSeconds

    public double getSeconds()

  Return the number of seconds in the duration, including fractional part

### getBigSeconds

    public java.math.BigDecimal getBigSeconds()

  Return the number of seconds in the duration, including the fractional part, in a lossless but expensive notation - i.e. a BigDecimal.

### getTimePart

    public double getTimePart()

  Return the time component of the duration - i.e. just the hours/mins/seconds, and returns the values in seconds.

### toString

    public java.lang.String toString()

  Serializer

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

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