org.odftoolkit.odfdom.type
Class TimeOrDateTime

java.lang.Object
  extended by org.odftoolkit.odfdom.type.TimeOrDateTime
All Implemented Interfaces:
OdfDataType

public class TimeOrDateTime
extends Object
implements OdfDataType

This class represents the in OpenDocument format used data type timeOrDateTime


Constructor Summary
TimeOrDateTime(XMLGregorianCalendar timeOrDateTime)
          Construct an newly TimeOrDateTime object that represents the specified XMLGregorianCalendar value
 
Method Summary
 XMLGregorianCalendar getXMLGregorianCalendar()
          Returns the value of this TimeOrDateTime object as an XMLGregorianCalendar
static boolean isValid(XMLGregorianCalendar timeOrDateTime)
          check if the specified XMLGregorianCalendar instance is a valid timeOrDateTime data type
 String toString()
          Returns a String Object representing this TimeOrDateTime value
static TimeOrDateTime valueOf(String stringValue)
          Returns a TimeOrDateTime instance representing the specified String value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeOrDateTime

public TimeOrDateTime(XMLGregorianCalendar timeOrDateTime)
               throws IllegalArgumentException
Construct an newly TimeOrDateTime object that represents the specified XMLGregorianCalendar value

Parameters:
timeOrDateTime - the value to be represented by the TimeOrDateTime Object
Throws:
IllegalArgumentException - if the given argument is not a valid TimeOrDateTime
Method Detail

toString

public String toString()
Returns a String Object representing this TimeOrDateTime value

Overrides:
toString in class Object
Returns:
return a string representation of the value of this TimeOrDateTime object

valueOf

public static TimeOrDateTime valueOf(String stringValue)
                              throws IllegalArgumentException
Returns a TimeOrDateTime instance representing the specified String value

Parameters:
stringValue - a String value
Returns:
return a TimeOrDateTime instance representing stringValue
Throws:
IllegalArgumentException - if the given argument is not a valid TimeOrDateTime

getXMLGregorianCalendar

public XMLGregorianCalendar getXMLGregorianCalendar()
Returns the value of this TimeOrDateTime object as an XMLGregorianCalendar

Returns:
the XMLGregorianCalendar value of this TimeOrDateTime object.

isValid

public static boolean isValid(XMLGregorianCalendar timeOrDateTime)
check if the specified XMLGregorianCalendar instance is a valid timeOrDateTime data type

Parameters:
timeOrDateTime - the value to be tested
Returns:
true if the value of argument is valid for timeOrDateTime data type false otherwise


Copyright © 2008-2017 The Apache Software Foundation. All Rights Reserved.