Codota Logo
CalendarDateRange.of
Code IndexAdd Codota 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)

  • Common ways to obtain CalendarDateRange
private void myMethod () {
CalendarDateRange c =
  • Codota IconCalendarDate start;CalendarDateRange.of(start, start)
  • Codota IconCoordinateAxis1DTime coordinateAxis1DTime;coordinateAxis1DTime.getCalendarDateRange()
  • Codota IconFeatureDatasetPoint featureDatasetPoint;featureDatasetPoint.getCalendarDateRange()
  • Smart code suggestions by Codota
}
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 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: 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

  • Start an intent from android
  • setScale (BigDecimal)
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now