deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.datatypes.time
Class TimeDuration

java.lang.Object
  extended by org.deegree.datatypes.time.TimeDuration
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TimeDuration
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Version:
$Revision: 18195 $, $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $
See Also:
Serialized Form

Constructor Summary
TimeDuration(int hours, int minutes)
           
TimeDuration(int years, int month, int days)
           
TimeDuration(int years, int month, int days, int hours, int minutes)
           
TimeDuration(int years, int month, int days, int hours, int minutes, int seconds, int millis)
           
 
Method Summary
 java.lang.Object clone()
           
static TimeDuration createTimeDuration(java.lang.String time)
           
 java.lang.String getAsGMLTimeDuration()
          return format: P1Y2M3DT10H30M10S
 long getAsMilliSeconds()
          returns a duration a milli seconds
 int getDays()
           
 int getHours()
           
 int getMillis()
           
 int getMinutes()
           
 int getMonth()
           
 int getSeconds()
           
 int getYears()
           
 void setDays(int days)
           
 void setHours(int hours)
           
 void setMillis(int millis)
           
 void setMinutes(int minutes)
           
 void setMonth(int month)
           
 void setSeconds(int seconds)
           
 void setYears(int years)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeDuration

public TimeDuration(int years,
                    int month,
                    int days)
Parameters:
years -
month -
days -

TimeDuration

public TimeDuration(int hours,
                    int minutes)
Parameters:
hours -
minutes -

TimeDuration

public TimeDuration(int years,
                    int month,
                    int days,
                    int hours,
                    int minutes)
Parameters:
years -
month -
days -
hours -
minutes -

TimeDuration

public TimeDuration(int years,
                    int month,
                    int days,
                    int hours,
                    int minutes,
                    int seconds,
                    int millis)
Parameters:
years -
month -
days -
hours -
minutes -
seconds -
millis -
Method Detail

createTimeDuration

public static TimeDuration createTimeDuration(java.lang.String time)
Parameters:
time - String as defined in W3C XSD simple datatypes section, e.g.: P1Y2M3DT10H30M; P1Y2MT2H; P0Y1347M0D
Returns:
corresponding TimeDuration instance

getDays

public int getDays()
Returns:
Returns the days.

setDays

public void setDays(int days)
Parameters:
days - The days to set.

getHours

public int getHours()
Returns:
Returns the hours.

setHours

public void setHours(int hours)
Parameters:
hours - The hours to set.

getMillis

public int getMillis()
Returns:
Returns the millis.

setMillis

public void setMillis(int millis)
Parameters:
millis - The millis to set.

getMinutes

public int getMinutes()
Returns:
Returns the minutes.

setMinutes

public void setMinutes(int minutes)
Parameters:
minutes - The minutes to set.

getMonth

public int getMonth()
Returns:
Returns the month.

setMonth

public void setMonth(int month)
Parameters:
month - The month to set.

getSeconds

public int getSeconds()
Returns:
Returns the seconds.

setSeconds

public void setSeconds(int seconds)
Parameters:
seconds - The seconds to set.

getYears

public int getYears()
Returns:
Returns the years.

setYears

public void setYears(int years)
Parameters:
years - The years to set.

getAsMilliSeconds

public long getAsMilliSeconds()
returns a duration a milli seconds

Returns:
a duration a milli seconds

getAsGMLTimeDuration

public java.lang.String getAsGMLTimeDuration()
return format: P1Y2M3DT10H30M10S

Returns:
String corresponding to this TimeDuration

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org