org.n52.oxf.valueDomains.time
Class TimePeriod
java.lang.Object
org.n52.oxf.valueDomains.time.TimePeriod
- All Implemented Interfaces:
- ITime, ITimePeriod
public class TimePeriod
- extends Object
- implements ITimePeriod
Represents a TimePeriod specified in OGC WCS spec 1.0.0 and consists of the TimePositions start and end and
the TimeResolution resolution.
Valid example time period strings:
1998-11-01/2005-11-02
1998-11-01/2005-11-02/P1Y
- Author:
- Theodor Foerster
Fields inherited from interface org.n52.oxf.ows.capabilities.ITime |
NOT_SET |
PERIOD_PATTERN
public static String PERIOD_PATTERN
TimePeriod
public TimePeriod(String begin,
String end)
- constructs a TimePeriod without a resolution. The default resolution has to be set explicitly.
TimePeriod
public TimePeriod(ITimePosition currentStart,
ITimePosition currentEnd,
ITimeResolution currentResolution)
- Parameters:
currentStart
- currentEnd
- currentResolution
-
TimePeriod
public TimePeriod(String period)
- Parameters:
period
-
TimePeriod
public TimePeriod(ITimePosition currentStart,
ITimePosition currentEnd)
- Parameters:
currentStart
- currentEnd
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
getStart
public ITimePosition getStart()
- Specified by:
getStart
in interface ITimePeriod
getEnd
public ITimePosition getEnd()
- Specified by:
getEnd
in interface ITimePeriod
getResolution
public ITimeResolution getResolution()
- Specified by:
getResolution
in interface ITimePeriod
setDefaultResolution
public void setDefaultResolution(String resolution)
- Sets a default resolution iff the resolution has not been set yet in any other method.
isResolutionSet
public boolean isResolutionSet()
toISO8601Format
public String toISO8601Format()
- Specified by:
toISO8601Format
in interface ITime
toString
public String toString()
- Specified by:
toString
in interface ITime
- Overrides:
toString
in class Object
- Returns:
- a String representation of this ITime object.
contains
public boolean contains(ITimePeriod timePeriod)
- proofs whether timePeriod is contained in this TimePeriod.
- Specified by:
contains
in interface ITimePeriod
contains
public boolean contains(ITimePosition timePos)
- proofs whether timePosition is contained in this TimePeriod.
- Specified by:
contains
in interface ITimePeriod
Copyright © 2012-2013 52north.org. All Rights Reserved.