Media Authoring
with Java API

tv.amwa.maj.record
Interface TimeStruct

All Known Implementing Classes:
TimeStruct

public interface TimeStruct

Specifies the time component of date and time values specified according to Coordinated Universal Time (UTC), including hour, minute, second and 1/100th of a second. The time structure is itself a component of a timestamp.

A time structure value is represented in the database by a column of type date:

     `Date` date
 

Author:
Richard Cartwright
See Also:
TimeStamp, DateStruct, TypeDefinitionRecord.TimeStruct

Method Summary
 byte getFraction()
          Returns the fractions of a second component of the time value.
 byte getHour()
          Returns the hours component of the time value.
 byte getMinute()
          Returns the minutes component of the time value.
 byte getSecond()
          Returns the seconds component of the time value.
 void setFraction(byte fraction)
          Sets the fractions of a second component of the time value, in the range 0 to 99.
 void setHour(byte hour)
          Sets the hours component of the time value, in the range 0 to 23.
 void setMinute(byte minute)
          Sets the minutes component of the time value, in the range 0 to 59.
 void setSecond(byte second)
          Sets the second component of the time value, normally in the range 0 to 59.
 void setTime(byte hour, byte minute, byte second)
          Set the values of the time structure using an hour, minute and second values provided.
 void setTime(byte hour, byte minute, byte second, byte fraction)
          Sets all the values of the time structure using the hour, minute, second and fraction of a second values provided.
 

Method Detail

setTime

void setTime(@UInt8
             byte hour,
             @UInt8
             byte minute,
             @UInt8
             byte second)
             throws IllegalArgumentException

Set the values of the time structure using an hour, minute and second values provided. The fraction of the second represented is set to be 0.

Parameters:
hour - Hours component of the time value, represented in 24-hour clock format.
minute - Minutes component of the time value.
second - Seconds component of the time value.
Throws:
IllegalArgumentException - One or more of the values is outside the acceptable range for a time value.

setTime

void setTime(@UInt8
             byte hour,
             @UInt8
             byte minute,
             @UInt8
             byte second,
             @UInt8
             byte fraction)
             throws IllegalArgumentException

Sets all the values of the time structure using the hour, minute, second and fraction of a second values provided.

Parameters:
hour - Hours component of the time value, represented in 24-hour clock format.
minute - Minutes component of the time value.
second - Seconds component of the time value.
fraction - Fractions of a second component of the time value.
Throws:
IllegalArgumentException - One or more of the values is outside the acceptable range for a time value.

getFraction

@UInt8
byte getFraction()

Returns the fractions of a second component of the time value.

Returns:
Fractions of a second component of the time value.

setFraction

void setFraction(@UInt8
                 byte fraction)
                 throws IllegalArgumentException

Sets the fractions of a second component of the time value, in the range 0 to 99.

Parameters:
fraction - Fractions of a second component of the time value.
Throws:
IllegalArgumentException - The fractions of a second value is outside the acceptable range.

getHour

@UInt8
byte getHour()

Returns the hours component of the time value.

Returns:
Hours component of the time value.

setHour

void setHour(@UInt8
             byte hour)
             throws IllegalArgumentException

Sets the hours component of the time value, in the range 0 to 23.

Parameters:
hour - Hours component of the time value.
Throws:
IllegalArgumentException - The hours value is outside the acceptable range.

getMinute

@UInt8
byte getMinute()

Returns the minutes component of the time value.

Returns:
Minutes component of the time value.

setMinute

void setMinute(@UInt8
               byte minute)
               throws IllegalArgumentException

Sets the minutes component of the time value, in the range 0 to 59.

Parameters:
minute - Minutes component of the time value.
Throws:
IllegalArgumentException - The minute value is outside the acceptable range.

getSecond

@UInt8
byte getSecond()

Returns the seconds component of the time value. Note that advanced implementations may allow for very occasional leap second values of 60 or 61.

Returns:
Seconds component of the time value.

setSecond

void setSecond(@UInt8
               byte second)
               throws IllegalArgumentException

Sets the second component of the time value, normally in the range 0 to 59. Note that advanced implementations may allow for very occasional leap second values of 60 or 61.

Parameters:
second - Seconds component of the time value.
Throws:
IllegalArgumentException - The second value is outside the acceptable range.

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.