public static CompositePartialTime makeComposite(PartialTime pt, Time t) { CompositePartialTime cp = null; StandardTemporalType tlt = t.getStandardTemporalType(); if (tlt != null) { switch (tlt) { case TIME_OF_DAY: cp = new CompositePartialTime(pt, null, null, t); break; case PART_OF_YEAR: case QUARTER_OF_YEAR: case SEASON_OF_YEAR: cp = new CompositePartialTime(pt, t, null, null); break; case DAYS_OF_WEEK: cp = new CompositePartialTime(pt, null, t, null); break; } } return cp; }
public static CompositePartialTime makeComposite(PartialTime pt, Time t) { CompositePartialTime cp = null; StandardTemporalType tlt = t.getStandardTemporalType(); if (tlt != null) { switch (tlt) { case TIME_OF_DAY: cp = new CompositePartialTime(pt, null, null, t); break; case PART_OF_YEAR: case QUARTER_OF_YEAR: case SEASON_OF_YEAR: cp = new CompositePartialTime(pt, t, null, null); break; case DAYS_OF_WEEK: cp = new CompositePartialTime(pt, null, t, null); break; } } return cp; }
public Duration getGranularity() { StandardTemporalType tlt = getStandardTemporalType(); if (tlt != null) { return tlt.getGranularity(); } Partial p = this.getJodaTimePartial(); return Duration.getDuration(JodaTimeUtils.getJodaTimePeriod(p)); }
public TimexType getTimexType() { if (getStandardTemporalType() != null) { return getStandardTemporalType().getTimexType(); } return (hasTime()) ? TimexType.TIME : TimexType.DATE; }
@Override public TimexType getTimexType() { if (getStandardTemporalType() != null) { return getStandardTemporalType().getTimexType(); } return (hasTime()) ? TimexType.TIME : TimexType.DATE; }
@Override public Duration getGranularity() { StandardTemporalType tlt = getStandardTemporalType(); if (tlt != null) { return tlt.getGranularity(); } Partial p = this.getJodaTimePartial(); return Duration.getDuration(JodaTimeUtils.getJodaTimePeriod(p)); }
public static CompositePartialTime makeComposite(PartialTime pt, Time t) { CompositePartialTime cp = null; StandardTemporalType tlt = t.getStandardTemporalType(); if (tlt != null) { switch (tlt) { case TIME_OF_DAY: cp = new CompositePartialTime(pt, null, null, t); break; case PART_OF_YEAR: case QUARTER_OF_YEAR: case SEASON_OF_YEAR: cp = new CompositePartialTime(pt, t, null, null); break; case DAYS_OF_WEEK: cp = new CompositePartialTime(pt, null, t, null); break; } } return cp; }
@Override public TimexType getTimexType() { if (getStandardTemporalType() != null) { return getStandardTemporalType().getTimexType(); } return (hasTime()) ? TimexType.TIME : TimexType.DATE; }
@Override public Duration getGranularity() { StandardTemporalType tlt = getStandardTemporalType(); if (tlt != null) { return tlt.getGranularity(); } Partial p = this.getJodaTimePartial(); return Duration.getDuration(JodaTimeUtils.getJodaTimePeriod(p)); }