Class MediaTimePointImpl
java.lang.Object
org.opencastproject.metadata.mpeg7.MediaTimePointImpl
- All Implemented Interfaces:
org.opencastproject.mediapackage.XmlElement,MediaTimePoint
- Direct Known Subclasses:
MediaRelTimePointImpl
TODO: Comment me!
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe day of monthprotected intThe fractionprotected intThe number of fractions per secondprotected intThe number of hourprotected intThe nubmer of minutesprotected intThe monthprotected intThe number of secondsprotected StringThe time zoneprotected intThe year -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new media time point representingT00:00:00:0F0MediaTimePointImpl(long milliseconds) Creates a new timepoint representing the given time. -
Method Summary
Modifier and TypeMethodDescriptionintgetDay()Returns the day of month.intThe fractions per second.intgetHour()Returns the hour of day (in 24-hour representation).intReturns the number of minutes.intgetMonth()Returns the month.intReturns the fractions.intReturns the seconds.longReturns the media time point in milliseconds.intgetYear()Returns the year.booleanReturnstrueif this time point is relative to another time point, e. g. the starting time point of a temporal segment's track.protected voidParses the date portion of a time point.protected voidParses the time portion of a time pointstatic MediaTimePointImplparseTimePoint(String text) Creates a timepoint representation from the given time point string.voidsetDay(int day) voidsetFractions(int fractions) voidsetFractionsPerSecond(int fractionsPerSecond) voidsetHour(int hour) voidsetMinutes(int minutes) voidsetMonth(int month) voidsetReferenceTimePoint(MediaTimePoint timePoint) Sets a reference time point which makes this time point relative to the given one.voidsetSeconds(int seconds) voidsetTimeZone(String timeZone) voidsetYear(int year) toString()
-
Field Details
-
year
protected int yearThe year -
month
protected int monthThe month -
day
protected int dayThe day of month -
hour
protected int hourThe number of hour -
minute
protected int minuteThe nubmer of minutes -
second
protected int secondThe number of seconds -
fractions
protected int fractionsThe fraction -
fractionsPerSecond
protected int fractionsPerSecondThe number of fractions per second -
timeZone
The time zone
-
-
Constructor Details
-
MediaTimePointImpl
public MediaTimePointImpl()Creates a new media time point representingT00:00:00:0F0 -
MediaTimePointImpl
public MediaTimePointImpl(long milliseconds) Creates a new timepoint representing the given time.- Parameters:
milliseconds- the number of milliseconds
-
-
Method Details
-
getDay
public int getDay()Description copied from interface:MediaTimePointReturns the day of month.- Specified by:
getDayin interfaceMediaTimePoint- Returns:
- the day of month
- See Also:
-
getHour
public int getHour()Description copied from interface:MediaTimePointReturns the hour of day (in 24-hour representation).- Specified by:
getHourin interfaceMediaTimePoint- Returns:
- the hour
- See Also:
-
getMinutes
public int getMinutes()Description copied from interface:MediaTimePointReturns the number of minutes.- Specified by:
getMinutesin interfaceMediaTimePoint- Returns:
- the minutes
- See Also:
-
getMonth
public int getMonth()Description copied from interface:MediaTimePointReturns the month.- Specified by:
getMonthin interfaceMediaTimePoint- Returns:
- the month
- See Also:
-
getNFractions
public int getNFractions()Description copied from interface:MediaTimePointReturns the fractions.- Specified by:
getNFractionsin interfaceMediaTimePoint- Returns:
- the fractions
- See Also:
-
getSeconds
public int getSeconds()Description copied from interface:MediaTimePointReturns the seconds.- Specified by:
getSecondsin interfaceMediaTimePoint- Returns:
- the seconds
- See Also:
-
getYear
public int getYear()Description copied from interface:MediaTimePointReturns the year.- Specified by:
getYearin interfaceMediaTimePoint- Returns:
- the year
- See Also:
-
getFractionsPerSecond
public int getFractionsPerSecond()Description copied from interface:MediaTimePointThe fractions per second.- Specified by:
getFractionsPerSecondin interfaceMediaTimePoint- Returns:
- the fractions per second
- See Also:
-
getTimeInMilliseconds
public long getTimeInMilliseconds()Description copied from interface:MediaTimePointReturns the media time point in milliseconds.- Specified by:
getTimeInMillisecondsin interfaceMediaTimePoint- Returns:
- the media time point
- See Also:
-
isRelative
public boolean isRelative()Description copied from interface:MediaTimePointReturnstrueif this time point is relative to another time point, e. g. the starting time point of a temporal segment's track.- Specified by:
isRelativein interfaceMediaTimePoint- Returns:
trueif this time point is relative- See Also:
-
setReferenceTimePoint
Sets a reference time point which makes this time point relative to the given one.- Parameters:
timePoint- the reference time point
-
setFractionsPerSecond
public void setFractionsPerSecond(int fractionsPerSecond) -
getTimeZone
-
setTimeZone
-
setDay
public void setDay(int day) -
setHour
public void setHour(int hour) -
setMinutes
public void setMinutes(int minutes) -
setMonth
public void setMonth(int month) -
setFractions
public void setFractions(int fractions) -
setSeconds
public void setSeconds(int seconds) -
setYear
public void setYear(int year) -
parseTimePoint
Creates a timepoint representation from the given time point string.- Parameters:
text- the timepoint text representation- Returns:
- the the timepoint
- Throws:
IllegalArgumentException- iftextis malformed
-
parseDate
Parses the date portion of a time point.- Parameters:
date- the date
-
parseTime
Parses the time portion of a time point- Parameters:
time- the time
-
toString
-
toXml
- Specified by:
toXmlin interfaceorg.opencastproject.mediapackage.XmlElement- See Also:
-