Class DateTimeRange

java.lang.Object
org.projecthusky.communication.xd.storedquery.DateTimeRange

public class DateTimeRange extends Object
This class represents a date and time range
  • Constructor Details

    • DateTimeRange

      public DateTimeRange(DateTimeRangeAttributes name, ZonedDateTime from, ZonedDateTime to)
      Constructs a new DateTimeRange
      Parameters:
      name - The XDS metadata attribute to which this DateTimeRange belongs to (CreationTime, ServiceStartTime, ServiceStopTime)
      from - The point in time where this range starts
      to - The point in time where this range ends
  • Method Details

    • getFrom

      public ZonedDateTime getFrom()
      Gets the point in time where this range starts
      Returns:
      the starting point
    • getFromAsUsFormattedString

      public String getFromAsUsFormattedString()
      Gets the point in time where this range starts
      Returns:
      the start point
    • getOhtDateTimeRange

      public org.openehealth.ipf.commons.ihe.xds.core.metadata.TimeRange getOhtDateTimeRange()
      Gets the wrapped OHT DateTimeRange Object
      Returns:
      the DateTimeRange
    • getTo

      public ZonedDateTime getTo()
      Gets the point in time where this range ends
      Returns:
      the end point
    • getToAsUsFormattedString

      public String getToAsUsFormattedString()
      Gets the point in time where this range ends
      Returns:
      the end point
    • setFrom

      public void setFrom(ZonedDateTime from, org.openehealth.ipf.commons.ihe.xds.core.metadata.Timestamp.Precision precision)
      Sets the point in time where this range starts
      Parameters:
      from - the starting point
    • setTo

      public void setTo(ZonedDateTime to, org.openehealth.ipf.commons.ihe.xds.core.metadata.Timestamp.Precision precision)
      Sets the point in time where this range ends
      Parameters:
      to - the end point
    • getDateTimeRangeAttribute

      public DateTimeRangeAttributes getDateTimeRangeAttribute()