@Override public CalendarDate getCalendarDateEnd() { return calendarDateRange == null ? null : calendarDateRange.getEnd(); }
@Override public CalendarDate getCalendarDateEnd() { return (dateRange == null) ? null : dateRange.getEnd(); }
@Override public CalendarDate getCalendarDateEnd() { return (dateRange == null) ? null : dateRange.getEnd(); }
@Override public CalendarDate getCalendarDateEnd() { return (dateRange == null) ? null : dateRange.getEnd(); }
@Override public CalendarDate getCalendarDateEnd() { if (dateRangeMax == null) makeRanges(); return (dateRangeMax == null) ? null : dateRangeMax.getEnd(); }
@Override public CalendarDate getCalendarDateEnd() { if (dateRangeMax == null) makeRanges(); return (dateRangeMax == null) ? null : dateRangeMax.getEnd(); }
public CalendarDate getCalendarDateEnd() { if (dateRangeMax == null) makeRanges(); return (dateRangeMax == null) ? null : dateRangeMax.getEnd(); }
public CalendarDate getCalendarDateEnd() { if (dateRangeMax == null) makeTimeRanges(); return (dateRangeMax == null) ? null : dateRangeMax.getEnd(); }
public CalendarDate getCalendarDateEnd() { if (dateRangeMax == null) makeRanges(); return (dateRangeMax == null) ? null : dateRangeMax.getEnd(); }
public CalendarDate getCalendarDateEnd() { if (dateRangeMax == null) makeRanges(); return (dateRangeMax == null) ? null : dateRangeMax.getEnd(); }
public CalendarDateRange intersect(CalendarDateRange clip) { DateTime cs = clip.getStart().getDateTime(); DateTime s = startDt.isBefore(cs) ? cs : startDt; // later one DateTime ce = clip.getEnd().getDateTime(); DateTime e = endDt.isBefore(ce) ? endDt : ce; // earlier one return CalendarDateRange.of(CalendarDate.of(cal, s), CalendarDate.of(cal, e)); }
public CalendarDateRange intersect(CalendarDateRange clip) { DateTime cs = clip.getStart().getDateTime(); DateTime s = startDt.isBefore(cs) ? cs : startDt; // later one DateTime ce = clip.getEnd().getDateTime(); DateTime e = endDt.isBefore(ce) ? endDt : ce; // earlier one return CalendarDateRange.of(CalendarDate.of(cal, s), CalendarDate.of(cal, e)); }
public CalendarDateRange extend(CalendarDateRange other) { DateTime cs = other.getStart().getDateTime(); DateTime s = startDt.isBefore(cs) ? startDt : cs; // earlier one DateTime ce = other.getEnd().getDateTime(); DateTime e = endDt.isBefore(ce) ? ce : endDt; // later one return CalendarDateRange.of(CalendarDate.of(cal, s), CalendarDate.of(cal, e)); }
public CalendarDateRange extend(CalendarDateRange other) { DateTime cs = other.getStart().getDateTime(); DateTime s = startDt.isBefore(cs) ? startDt : cs; // earlier one DateTime ce = other.getEnd().getDateTime(); DateTime e = endDt.isBefore(ce) ? ce : endDt; // later one return CalendarDateRange.of(CalendarDate.of(cal, s), CalendarDate.of(cal, e)); }
public CalendarDateRange intersect(CalendarDateRange clip) { DateTime cs = clip.getStart().getDateTime(); DateTime s = startDt.isBefore(cs) ? cs : startDt; // later one DateTime ce = clip.getEnd().getDateTime(); DateTime e = endDt.isBefore(ce) ? endDt : ce; // earlier one return CalendarDateRange.of(CalendarDate.of(cal, s), CalendarDate.of(cal, e)); }
public CalendarDateRange extend(CalendarDateRange other) { DateTime cs = other.getStart().getDateTime(); DateTime s = startDt.isBefore(cs) ? startDt : cs; // earlier one DateTime ce = other.getEnd().getDateTime(); DateTime e = endDt.isBefore(ce) ? ce : endDt; // later one return CalendarDateRange.of(CalendarDate.of(cal, s), CalendarDate.of(cal, e)); }
public Optional<CoverageCoordAxisBuilder> subset(CalendarDateRange dateRange, int stride) { double min = axis.convert(dateRange.getStart()); double max = axis.convert(dateRange.getEnd()); return subsetValues(min, max, stride); }
private Range makeTimeRange(CalendarDateRange dateRange, CoordinateAxis1DTime timeAxis, int stride_time) throws InvalidRangeException { Range timeRange = null; if ((dateRange != null) && (timeAxis != null)) { int startIndex = timeAxis.findTimeIndexFromCalendarDate(dateRange.getStart()); int endIndex = timeAxis.findTimeIndexFromCalendarDate(dateRange.getEnd()); if (startIndex < 0) throw new InvalidRangeException("start time=" + dateRange.getStart() + " must be >= " + timeAxis.getCalendarDate(0)); if (endIndex < 0) throw new InvalidRangeException("end time=" + dateRange.getEnd() + " must be >= " + timeAxis.getCalendarDate(0)); if (stride_time <= 1) stride_time = 1; timeRange = new Range(startIndex, endIndex, stride_time); } return timeRange; }
@Override public CalendarDateRange makeCalendarDateRange(ucar.nc2.time.Calendar cal) { CoordinateTimeAbstract firstCoord = getTimeCoordinate(0); CoordinateTimeAbstract lastCoord = getTimeCoordinate(nruns-1); CalendarDateRange firstRange = firstCoord.makeCalendarDateRange(cal); CalendarDateRange lastRange = lastCoord.makeCalendarDateRange(cal); return CalendarDateRange.of(firstRange.getStart(), lastRange.getEnd()); }
CdmrFeatureProto.CalendarDateRange.Builder encodeDateRange(CalendarDateRange dateRange) { CdmrFeatureProto.CalendarDateRange.Builder builder = CdmrFeatureProto.CalendarDateRange.newBuilder(); builder.setStart(dateRange.getStart().getMillis()); builder.setEnd(dateRange.getEnd().getMillis()); Calendar cal = dateRange.getStart().getCalendar(); builder.setCalendar(convertCalendar(cal)); return builder; }