Package org.gvsig.timesupport
Interface TimeSupportManager
public interface TimeSupportManager
This class is responsible of the management of the library's business logic.
It is the library's main entry point.
- Version:
- $Id$
- Author:
- gvSIG team
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelativeInstantPattern(String relativeInstantPattern) Add a time pattern that is used to parse a relative instantCreates anAbsoluteInstantwithout any value.createAbsoluteInstant(int[] types, int[] values) Creates anAbsoluteInstantwith a set of types and an array of values.createAbsoluteInstant(int[] typess, int[] values, Chronology chronology) Creates anAbsoluteInstantwith a set of types and an array of values.createAbsoluteInstant(int type, int value) Creates anAbsoluteInstantwith a type and a value.createAbsoluteInstant(int type, int value, Chronology chronology) Creates anAbsoluteInstantwith a type and a value and using a chronology.createAbsoluteInstant(Chronology chronology) Creates anAbsoluteInstantwithout any value and using a chronology.createAbsoluteInterval(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis) Creates anAbsoluteIntervalfrom individual fields.createAbsoluteInterval(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, Chronology chronology) Creates anAbsoluteIntervalfrom individual fields and a chronology.createAbsoluteInterval(AbsoluteInstant startAbsoluteInstant, int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis) Creates anAbsoluteIntervalfrom a start instant and an increment of the time fields.createAbsoluteInterval(AbsoluteInstant startAbsoluteInstant, int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, Chronology chronology) Creates anAbsoluteIntervalfrom a start instant and an increment of the time fields and a chronology.createAbsoluteInterval(AbsoluteInstant startInstant, AbsoluteInstant endInstant) Creates anAbsoluteIntervalfrom a start and an end instants.createAbsoluteInterval(AbsoluteInstant startInstant, AbsoluteInstant endInstant, Chronology chronology) Creates anAbsoluteIntervalfrom a start and an end instants and a chronology.createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) Creates aRelativeInstantusing the datetime field values.createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, int chronology) Creates aRelativeInstantusing the datetime field values and using a chronology code.createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, Chronology chronology) Creates aRelativeInstantusing the datetime field values and using a chronology.createRelativeInstant(long instant) Creates aRelativeInstantusing the number of milliseconds from 1970-01-01T00:00Z.createRelativeInstant(long instant, Chronology chronology) Creates aRelativeInstantusing the number of milliseconds from 1970-01-01T00:00Z and using a chronology.createRelativeInstant(Date date) Creates aRelativeInstantusing aDate.createRelativeInstant(Date date, Chronology chronology) Creates aRelativeInstantusing aDateand using a chronology.createRelativeInstant(Chronology chronology) Creates aRelativeInstantusing the current system time and using a chronology.createRelativeInterval(long startInstant, long endInstant) Creates aRelativeIntervalfrom a start and an end instants.createRelativeInterval(long startInstant, long endInstant, Chronology chronology) Creates aRelativeIntervalfrom a start and an end instants, and using a chonology.createRelativeInterval(RelativeInstant startDateTime, RelativeInstant endDateTime) Creates aRelativeIntervalfrom a start and an end instants.Creates a time animation object.getAbsoluteInstantType(int type) Gets anAbsoluteInstantTypeby code.getAbsoluteIntervalType(int type) Gets anAbsoluteIntervalTypeby code.getChronology(int typechronology) Gets anChronologyby code.parseRelativeInstant(String relativeInstantString) Creates a relative instant from a string.voidregisterAbsoluteInstantType(AbsoluteInstantType absoluteInstantType) Registers a newAbsoluteInstantTypethat can be used in the creation of anAbsoluteInstant.voidregisterAbsoluteIntervalType(AbsoluteIntervalType absoluteIntervalType) Registers a newAbsoluteIntervalTypethat can be used in the creation of anAbsoluteInterval.voidregisterChronology(Chronology chronology) Registers a newChronologythat can be used in the creation of any temporal object.voidsetDefaultChronology(int chronology) Sets the default chronology.
-
Method Details
-
registerAbsoluteInstantType
Registers a newAbsoluteInstantTypethat can be used in the creation of anAbsoluteInstant.- Parameters:
absoluteInstantType- the AbsoluteInstantType to register
-
getAbsoluteInstantType
AbsoluteInstantType getAbsoluteInstantType(int type) throws AbsoluteInstantTypeNotRegisteredException Gets anAbsoluteInstantTypeby code.- Parameters:
type- the code of theAbsoluteInstantTypeto retrieve.- Returns:
- an
AbsoluteInstantTypewith a concrete code. - Throws:
AbsoluteInstantTypeNotRegisteredException- if theAbsoluteInstantTypedoen's exist.
-
registerAbsoluteIntervalType
Registers a newAbsoluteIntervalTypethat can be used in the creation of anAbsoluteInterval.- Parameters:
absoluteInstantType- the AbsoluteIntervalType to register
-
getAbsoluteIntervalType
AbsoluteIntervalType getAbsoluteIntervalType(int type) throws AbsoluteIntervalTypeNotRegisteredException Gets anAbsoluteIntervalTypeby code.- Parameters:
type- the code of theAbsoluteIntervalTypeto retrieve.- Returns:
- an
AbsoluteIntervalTypewith a concrete code. - Throws:
AbsoluteIntervalTypeNotRegisteredException- if theAbsoluteIntervalTypedoen's exist.
-
registerChronology
Registers a newChronologythat can be used in the creation of any temporal object.- Parameters:
chronology- the chronology to register
-
getChronology
Gets anChronologyby code.- Parameters:
type- the code of theChronologyto retrieve.- Returns:
- an
Chronologywith a concrete code.
-
setDefaultChronology
void setDefaultChronology(int chronology) Sets the default chronology. This chronology is used in all the time object creation if the chronology is not fixed.- Parameters:
chronology- the default chronology.
-
createRelativeInstant
Creates aRelativeInstantusing the number of milliseconds from 1970-01-01T00:00Z. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
instant- the milliseconds from 1970-01-01T00:00:00Z- Returns:
- a relative instant
-
createRelativeInstant
Creates aRelativeInstantusing the number of milliseconds from 1970-01-01T00:00Z and using a chronology.- Parameters:
instant- the milliseconds from 1970-01-01T00:00:00Z.chronology- the chronology.- Returns:
- a relative instant
-
createRelativeInstant
Creates aRelativeInstantusing aDate. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
date- the java.util.Date- Returns:
- a relative instant
-
createRelativeInstant
Creates aRelativeInstantusing aDateand using a chronology.- Parameters:
date- the java.util.Datechronology- the chronology.- Returns:
- a relative instant
-
createRelativeInstant
Creates aRelativeInstantusing the current system time and using a chronology.- Parameters:
chronology- the chronology.date- the java.util.Date- Returns:
- a relative instant
-
createRelativeInstant
RelativeInstant createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) Creates aRelativeInstantusing the datetime field values. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
year- the yearmonthOfYear- the month of the yeardayOfMonth- the day of the monthhourOfDay- the hour of the dayminuteOfHour- the minute of the hoursecondOfMinute- the second of the minutemillisOfSecond- the millisecond of the second- Returns:
- a relative instant
-
createRelativeInstant
RelativeInstant createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, Chronology chronology) Creates aRelativeInstantusing the datetime field values and using a chronology.- Parameters:
year- the yearmonthOfYear- the month of the yeardayOfMonth- the day of the monthhourOfDay- the hour of the dayminuteOfHour- the minute of the hoursecondOfMinute- the second of the minutemillisOfSecond- the millisecond of the secondchronology- the chronology.- Returns:
- a relative instant
-
createRelativeInstant
RelativeInstant createRelativeInstant(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, int chronology) Creates aRelativeInstantusing the datetime field values and using a chronology code.- Parameters:
year- the yearmonthOfYear- the month of the yeardayOfMonth- the day of the monthhourOfDay- the hour of the dayminuteOfHour- the minute of the hoursecondOfMinute- the second of the minutemillisOfSecond- the millisecond of the secondchronology- the chronology code.- Returns:
- a relative instant
-
createAbsoluteInstant
AbsoluteInstant createAbsoluteInstant()Creates anAbsoluteInstantwithout any value. It uses the chronology defined by thesetDefaultChronology(int)method.- Returns:
- an absolute instant
-
createAbsoluteInstant
Creates anAbsoluteInstantwithout any value and using a chronology.- Parameters:
chronology- the chronology.- Returns:
- an absolute instant
-
createAbsoluteInstant
AbsoluteInstant createAbsoluteInstant(int type, int value) throws AbsoluteInstantTypeNotRegisteredException Creates anAbsoluteInstantwith a type and a value. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
type- the single type to create the instant. It has to be one of the values specified inAbsoluteInstantType.value- the value of the field.- Returns:
- an absolute instant.
- Throws:
AbsoluteInstantTypeNotRegisteredException- if there is not anAbsoluteInstantTypewith this code.
-
createAbsoluteInstant
AbsoluteInstant createAbsoluteInstant(int type, int value, Chronology chronology) throws AbsoluteInstantTypeNotRegisteredException Creates anAbsoluteInstantwith a type and a value and using a chronology.- Parameters:
type- the single type to create the instant. It has to be one of the values specified inAbsoluteInstantType.value- the value of the field.chronology- the chronology.- Returns:
- an absolute instant.
- Throws:
AbsoluteInstantTypeNotRegisteredException- if there is not anAbsoluteInstantTypewith this code.
-
createAbsoluteInstant
AbsoluteInstant createAbsoluteInstant(int[] types, int[] values) throws AbsoluteInstantTypeNotRegisteredException Creates anAbsoluteInstantwith a set of types and an array of values. The length of both arrays has to be the same. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
types- the types to create the instant. All of them have to be one of the values specified inAbsoluteInstantType.values- the values of every field.- Returns:
- an absolute instant.
- Throws:
AbsoluteInstantTypeNotRegisteredException- if there is not anAbsoluteInstantTypewith the codes.
-
createAbsoluteInstant
AbsoluteInstant createAbsoluteInstant(int[] typess, int[] values, Chronology chronology) throws AbsoluteInstantTypeNotRegisteredException Creates anAbsoluteInstantwith a set of types and an array of values. It uses a chronology. and the length of both arrays has to be the same.- Parameters:
values- the values of every field.chronology- the chronology.types- the types to create the instant. All of them have to be one of the values specified inAbsoluteInstantType.- Returns:
- an absolute instant.
- Throws:
AbsoluteInstantTypeNotRegisteredException- if there is not anAbsoluteInstantTypewith the codes.
-
createRelativeInterval
Creates aRelativeIntervalfrom a start and an end instants. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
startInstant- start of this interval, as milliseconds from 1970-01-01T00:00:00Z.endInstant- end of this interval, as milliseconds from 1970-01-01T00:00:00Z.- Returns:
- a relative interval
- Throws:
IllegalArgumentException- if the end is before the start
-
createRelativeInterval
Creates aRelativeIntervalfrom a start and an end instants, and using a chonology.- Parameters:
startInstant- start of this interval, as milliseconds from 1970-01-01T00:00:00Z.endInstant- end of this interval, as milliseconds from 1970-01-01T00:00:00Z.chronology- the chronology.- Returns:
- a relative interval
- Throws:
IllegalArgumentException- if the end is before the start
-
createRelativeInterval
Creates aRelativeIntervalfrom a start and an end instants. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
startInstant- start of this interval, null means nowendInstant- end of this interval, null means now- Returns:
- a relative interval
- Throws:
IllegalArgumentException- if the end is before the start
-
createAbsoluteInterval
AbsoluteInterval createAbsoluteInterval(AbsoluteInstant startInstant, AbsoluteInstant endInstant) throws AbsoluteIntervalTypeNotRegisteredException Creates anAbsoluteIntervalfrom a start and an end instants. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
startInstant- start of this interval, null means nowendInstant- end of this interval, null means now- Returns:
- an absolute interval
- Throws:
IllegalArgumentException- if the end is before the startAbsoluteIntervalTypeNotRegisteredException
-
createAbsoluteInterval
AbsoluteInterval createAbsoluteInterval(AbsoluteInstant startInstant, AbsoluteInstant endInstant, Chronology chronology) throws AbsoluteIntervalTypeNotRegisteredException Creates anAbsoluteIntervalfrom a start and an end instants and a chronology.- Parameters:
startInstant- start of this intervalendInstant- end of this intervalchronology- the chronology.- Returns:
- an absolute interval
- Throws:
IllegalArgumentException- if the end is before the startAbsoluteIntervalTypeNotRegisteredException- if there is not the necessaryAbsoluteIntervalType.
-
createAbsoluteInterval
AbsoluteInterval createAbsoluteInterval(AbsoluteInstant startAbsoluteInstant, int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis) throws AbsoluteIntervalTypeNotRegisteredException Creates anAbsoluteIntervalfrom a start instant and an increment of the time fields. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
startAbsoluteInstant- start of this intervalyears- the years to increment the instant.months- the months to increment the instant.weeks- the weeks to increment the instant.days- the days to increment the instant.hours- the hours to increment the instant.minutes- the minutes to increment the instant.seconds- the seconds to increment the instant.millis- the milliseconds to increment the instant.- Returns:
- an absolute instant
- Throws:
IllegalArgumentException- if the end is before the startAbsoluteIntervalTypeNotRegisteredException- if there is not the necessaryAbsoluteIntervalType.
-
createAbsoluteInterval
AbsoluteInterval createAbsoluteInterval(AbsoluteInstant startAbsoluteInstant, int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, Chronology chronology) throws AbsoluteIntervalTypeNotRegisteredException Creates anAbsoluteIntervalfrom a start instant and an increment of the time fields and a chronology. The seconds instant is defined by all the individual fields.- Parameters:
startAbsoluteInstant- start of this intervalyears- the years to increment the instant.months- the months to increment the instant.weeks- the weeks to increment the instant.days- the days to increment the instant.hours- the hours to increment the instant.minutes- the minutes to increment the instant.seconds- the seconds to increment the instant.millis- the milliseconds to increment the instant.chronology- the chronology- Returns:
- an absolute instant
- Throws:
IllegalArgumentException- if the end is before the startAbsoluteIntervalTypeNotRegisteredException- if there is not the necessaryAbsoluteIntervalType.
-
createAbsoluteInterval
AbsoluteInterval createAbsoluteInterval(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis) throws AbsoluteIntervalTypeNotRegisteredException Creates anAbsoluteIntervalfrom individual fields. The start interval is the time 0. It uses the chronology defined by thesetDefaultChronology(int)method.- Parameters:
years- the years of the end instant.months- the months of the end instant.weeks- the weeks of the end instant.days- the days of the end instant.hours- the hours of the end instant.minutes- the minutes of the end instant.seconds- the seconds of the end instant.millis- the milliseconds of the end instant.- Returns:
- an absolute instant
- Throws:
AbsoluteIntervalTypeNotRegisteredException- if there is not the necessaryAbsoluteIntervalType.
-
createAbsoluteInterval
AbsoluteInterval createAbsoluteInterval(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis, Chronology chronology) throws AbsoluteIntervalTypeNotRegisteredException Creates anAbsoluteIntervalfrom individual fields and a chronology. The start interval is the time 0.- Parameters:
years- the years of the end instant.months- the months of the end instant.weeks- the weeks of the end instant.days- the days of the end instant.hours- the hours of the end instant.minutes- the minutes of the end instant.seconds- the seconds of the end instant.millis- the milliseconds of the end instant.chronology- the chronology- Returns:
- an absolute instant
- Throws:
AbsoluteIntervalTypeNotRegisteredException- if there is not the necessaryAbsoluteIntervalType.
-
addRelativeInstantPattern
Add a time pattern that is used to parse a relative instant- Parameters:
relativeInstantPattern- the pattern tor parse the instant
-
parseRelativeInstant
Creates a relative instant from a string. It tries to parse the string using the patterns added with theaddRelativeInstantPattern(String)method.- Parameters:
relativeInstantString- the relative instant like a string- Returns:
- the relative instant or
null.
-
createTimeAnimation
Creates a time animation object.- Parameters:
renderer-- Returns:
-