Tabnine Logo
CalendarDateRange.of
Code IndexAdd Tabnine to your IDE (free)

How to use
of
method
in
ucar.nc2.time.CalendarDateRange

Best Java code snippets using ucar.nc2.time.CalendarDateRange.of (Showing top 20 results out of 315)

origin: edu.ucar/netcdf

/**
 * get time coverage as CalendarDateRange
 *
 * @return time coverage, or null if none
 */
public CalendarDateRange getCalendarDateCoverage() {
 return CalendarDateRange.of(tc);
}
origin: Unidata/thredds

/**
 * @return TimeCoverage element as CalendarDateRange
 */
public CalendarDateRange getCalendarDateCoverage() {
 return timeCoverage == null ? null : CalendarDateRange.of(timeCoverage);
}
origin: edu.ucar/netcdf

/**
 * @return TimeCoverage element as CalendarDateRange
 */
public CalendarDateRange getCalendarDateCoverage() {
 return timeCoverage == null ? null : CalendarDateRange.of(timeCoverage);
}
origin: edu.ucar/netcdf

/**
 * Get calendar date range
 * @return calendar date range
 */
public CalendarDateRange getCalendarDateRange() {
 List<CalendarDate> cd = getCalendarDates();
 int last = cd.size();
 return (last > 0) ? CalendarDateRange.of(cd.get(0), cd.get(last-1)) : null;
}
origin: edu.ucar/cdm

@Override
public StationTimeSeriesFeature subset(DateRange dateRange) throws IOException {
 if (dateRange == null) return this;
 return new StationFeatureSubset(this, CalendarDateRange.of(dateRange));
}
origin: edu.ucar/netcdf

public CalendarDateRange getDateRangeForOffset(double offset) {
 State localState;
 synchronized (lock) {
  localState = state;
 }
 List<CalendarDate> runs = localState.lite.getRunDates();
 int n = runs.size();
 return CalendarDateRange.of(FmrcInv.makeOffsetDate(runs.get(0), offset), FmrcInv.makeOffsetDate(runs.get(n-1), offset));
}
origin: edu.ucar/netcdf

@Override
public CalendarDateRange getCalendarDateRange() {
 if (timeTaxis != null)
  return timeTaxis.getCalendarDateRange();
 else if (getRunTimeAxis() != null) {
  List<CalendarDate>  cd = makeCalendarDates2D();
  int last = cd.size();
  return (last > 0) ? CalendarDateRange.of(cd.get(0), cd.get(last-1)) : null;
 } else
  return null;
}
origin: edu.ucar/cdm

public CalendarDateRange getDateRangeForOffset(double offset) {
 State localState;
 synchronized (lock) {
  localState = state;
 }
 List<CalendarDate> runs = localState.lite.getRunDates();
 int n = runs.size();
 return CalendarDateRange.of(FmrcInv.makeOffsetDate(runs.get(0), offset), FmrcInv.makeOffsetDate(runs.get(n-1), offset));
}
origin: Unidata/thredds

public CalendarDateRange getDateRangeForOffset(double offset) {
 State localState;
 synchronized (lock) {
  localState = state;
 }
 List<CalendarDate> runs = localState.lite.getRunDates();
 int n = runs.size();
 return CalendarDateRange.of(FmrcInv.makeOffsetDate(runs.get(0), offset), FmrcInv.makeOffsetDate(runs.get(n-1), offset));
}
origin: Unidata/thredds

public CalendarDateRange getCalendarDateRange(CalendarDateUnit timeUnit) {
 if (nobs == 0) return null;
 if (dateRange != null) return dateRange;
 if (timeUnit != null && minTime <= maxTime) {
  dateRange = CalendarDateRange.of(timeUnit.makeCalendarDate(minTime), timeUnit.makeCalendarDate(maxTime));
 }
 return dateRange;
}
origin: edu.ucar/netcdf

public CalendarDateRange getCalendarDateRange() {
 if (!calcBounds) return null;
 if (timeUnit == null) return null;
 return CalendarDateRange.of(timeUnit.makeCalendarDate(minTime), timeUnit.makeCalendarDate(maxTime));
}
origin: Unidata/thredds

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));
}
origin: edu.ucar/netcdf

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));
}
origin: edu.ucar/cdm

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));
}
origin: edu.ucar/cdm

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));
}
origin: Unidata/thredds

@Override
public CalendarDateRange makeCalendarDateRange(ucar.nc2.time.Calendar cal) {
 CalendarDateUnit cdu = CalendarDateUnit.withCalendar(cal, periodName + " since " + refDate.toString());
 CalendarDate start = cdu.makeCalendarDate(timeUnit.getValue() * offsetSorted.get(0));
 CalendarDate end = cdu.makeCalendarDate(timeUnit.getValue() * offsetSorted.get(getSize() - 1));
 return CalendarDateRange.of(start, end);
}
origin: edu.ucar/cdm

/**
 * Does not handle non-standard calendars
 * @deprecated
 */
static public CalendarDateRange of(DateRange dr) {
 if (dr == null) return null;
 return CalendarDateRange.of( dr.getStart().getDate(), dr.getEnd().getDate());
}
origin: Unidata/thredds

/**
 * Make calendar date range, using the first and last ending bounds
 * @param cal  optional calendar, may be null
 * @return  calendar date range
 */
@Override
public CalendarDateRange makeCalendarDateRange(ucar.nc2.time.Calendar cal) {
 CalendarDateUnit cdu = CalendarDateUnit.of(cal, timeUnit.getField(), refDate);
 CalendarDate start = cdu.makeCalendarDate( timeUnit.getValue() * timeIntervals.get(0).getBounds2());
 CalendarDate end = cdu.makeCalendarDate(timeUnit.getValue() * timeIntervals.get(getSize()-1).getBounds2());
 return CalendarDateRange.of(start, end);
}
origin: Unidata/thredds

CalendarDateRange decodeDateRange(CdmrFeatureProto.CalendarDateRange proto) {
 ucar.nc2.time.Calendar cal = convertCalendar(proto.getCalendar());
 CalendarDate start = CalendarDate.of(cal, proto.getStart());
 CalendarDate end = CalendarDate.of(cal, proto.getEnd());
 return CalendarDateRange.of(start, end);
}
origin: Unidata/thredds

private BufrStationDataset(NetcdfDataset ncfile, BufrCdmIndex index) {
 super(ncfile, FeatureType.STATION);
 this.index = index;
  // create the list of data variables
 munger = new Munge();
 obs = (SequenceDS) ncfile.findVariable(BufrIosp2.obsRecord);
 this.dataVariables = munger.makeDataVariables(index, obs);
 BufrStationCollection bufrCollection = new BufrStationCollection(ncfile.getLocation());
 setPointFeatureCollection(bufrCollection);
 CalendarDateRange dateRange = CalendarDateRange.of(CalendarDate.of(index.start), CalendarDate.of(index.end));
 setDateRange(dateRange);
}
ucar.nc2.timeCalendarDateRangeof

Javadoc

Does not handle non-standard calendars

Popular methods of CalendarDateRange

  • extend
  • getEnd
  • getStart
  • getDurationInSecs
  • getResolution
  • includes
  • intersects
  • toDateRange
    Does not handle non-standard calendars
  • <init>
  • getDuration
  • intersect
  • equals
  • intersect,
  • equals,
  • hashCode,
  • isPoint

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JList (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now