org.n52.oxf.valueDomains.time
Class TemporalValueDomain

java.lang.Object
  extended by org.n52.oxf.valueDomains.time.TemporalValueDomain
All Implemented Interfaces:
IDiscreteValueDomain<ITime>, IValueDomain<ITime>

public class TemporalValueDomain
extends Object
implements IDiscreteValueDomain<ITime>

This class is a ValueDomain for ITime objects. These objects could be instances of TimePosition or TimePeriod.

Author:
Arne Broering

Constructor Summary
TemporalValueDomain(ITime time)
           
TemporalValueDomain(ITime[] possibleValues)
           
TemporalValueDomain(List<ITime> timeList)
           
 
Method Summary
 void add(ITime time)
          adds an ITime object to the timeList.
 void add(String timeString)
          adds an ITime object to the timeList.
 boolean containsValue(ITime time)
          proofs whether the overgiven ITime object is contained in this TemporalValueDomain.
 String getDomainDescription()
           
 List<ITime> getPossibleValues()
           
 boolean isEmpty()
           
 ITime produceValue(String... stringArray)
          builds from the first element of the stringArray an ITime object.
 String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporalValueDomain

public TemporalValueDomain(ITime time)

TemporalValueDomain

public TemporalValueDomain(List<ITime> timeList)

TemporalValueDomain

public TemporalValueDomain(ITime[] possibleValues)
Method Detail

add

public void add(ITime time)
adds an ITime object to the timeList.

Parameters:
time -

add

public void add(String timeString)
adds an ITime object to the timeList. This object will be generated from the timeString which has to bee ISO8601 compliant.

Parameters:
timeString - ISO8601 compliant timeString.

isEmpty

public boolean isEmpty()

getPossibleValues

public List<ITime> getPossibleValues()
Specified by:
getPossibleValues in interface IDiscreteValueDomain<ITime>
Returns:
the List of all possible ITime objects.

containsValue

public boolean containsValue(ITime time)
proofs whether the overgiven ITime object is contained in this TemporalValueDomain. (It also proofs if time is contained in TimePeriods which are contained in this TemporalValueDomain.

Specified by:
containsValue in interface IValueDomain<ITime>
Returns:
if the value t is part of this value domain.

getDomainDescription

public String getDomainDescription()
Specified by:
getDomainDescription in interface IValueDomain<ITime>
Returns:
plain text description of this valueDomain.

toXML

public String toXML()
Specified by:
toXML in interface IValueDomain<ITime>
Returns:
a XML representation of this ValueDomain.

produceValue

public ITime produceValue(String... stringArray)
builds from the first element of the stringArray an ITime object. The string must be ISO8601 compliant.

Specified by:
produceValue in interface IValueDomain<ITime>


Copyright © 2012-2013 52north.org. All Rights Reserved.