final Dur dur = new Duration(null, duration).getDuration(); triggerDate = dur.getTime(previousTrigger); return triggerDate;
/** * @param aList a list of parameters for this component * @param duration a duration value */ public Duration(final ParameterList aList, final TemporalAmount duration) { super(DURATION, aList, new Factory()); setDuration(duration); }
public Property createProperty(final String name, final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Duration(parameters, value); }
/** Return a value based on this value plus a duration. * * @param val * @return BwDateTime * @throws CalFacadeException */ public BwDateTime addDuration(final BwDuration val) throws CalFacadeException { return addDuration(val.makeDuration().getDuration()); }
public void setDisplayAlarmDuration(Dur dur) { VAlarm alarm = getDisplayAlarm(); if(alarm==null) { return; } Duration duration = (Duration) alarm.getProperties().getProperty( Property.DURATION); if (dur == null) { if (duration != null) { alarm.getProperties().remove(duration); } return; } if (duration == null) { duration = new Duration(); alarm.getProperties().add(duration); } duration.setDuration(dur); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component */ public Duration(final ParameterList aList, final String aValue) { super(DURATION, aList, new Factory()); setValue(aValue); }
String durVal = duration.getValue(); if (!durVal.equals(ev.getDuration())) { chg.changed(PropertyInfoIndex.DURATION, ev.getDuration(), durVal); Dur dur = duration.getDuration();
public Property createProperty() { return new Duration(); } }
public Dur getDisplayAlarmDuration() { VAlarm alarm = getDisplayAlarm(); if(alarm==null) { return null; } Duration dur = (Duration) alarm.getProperties().getProperty(Property.DURATION); if(dur!=null) { return dur.getDuration(); } else { return null; } }
public void setDisplayAlarmDuration(Dur dur) { VAlarm alarm = getDisplayAlarm(); if(alarm==null) { return; } Duration duration = (Duration) alarm.getProperties().getProperty( Property.DURATION); if (dur == null) { if (duration != null) { alarm.getProperties().remove(duration); } return; } if (duration == null) { duration = new Duration(); alarm.getProperties().add(duration); } duration.setDuration(dur); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component */ public Duration(final ParameterList aList, final String aValue) { super(DURATION, aList, PropertyFactoryImpl.getInstance()); setValue(aValue); }
/** * Get the duration for an event. If the DURATION property * exist, use that. Else, calculate duration from DTSTART and * DTEND. * @param event The event. * @return duration for event */ public static Dur getDuration(VEvent event) { Duration duration = (Duration) event.getProperties().getProperty(Property.DURATION); if (duration != null) { return duration.getDuration(); } DtStart dtstart = event.getStartDate(); if (dtstart == null) { return null; } DtEnd dtend = (DtEnd) event.getProperties().getProperty(Property.DTEND); if (dtend == null) { return null; } return new Duration(dtstart.getDate(), dtend.getDate()).getDuration(); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Duration(parameters, value); }
public Dur getDisplayAlarmDuration() { VAlarm alarm = getDisplayAlarm(); if(alarm==null) { return null; } Duration dur = (Duration) alarm.getProperties().getProperty(Property.DURATION); if(dur!=null) { return dur.getDuration(); } else { return null; } }
duration.setDuration(dur); event.getProperties().remove(dtend); duration = new Duration(dur); event.getProperties().add(duration);
/** * @param aList a list of parameters for this component * @param duration a duration value */ public Duration(final ParameterList aList, final Dur duration) { super(DURATION, aList, PropertyFactoryImpl.getInstance()); setDuration(duration); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component */ public Duration(final ParameterList aList, final String aValue) { super(DURATION, aList, PropertyFactoryImpl.getInstance()); setValue(aValue); }
/** * Get the duration for an event. If the DURATION property * exist, use that. Else, calculate duration from DTSTART and * DTEND. * @param event The event. * @return duration for event */ public static Dur getDuration(VEvent event) { Duration duration = (Duration) event.getProperties().getProperty(Property.DURATION); if (duration != null) { return duration.getDuration(); } DtStart dtstart = event.getStartDate(); if (dtstart == null) { return null; } DtEnd dtend = (DtEnd) event.getProperties().getProperty(Property.DTEND); if (dtend == null) { return null; } return new Duration(dtstart.getDate(), dtend.getDate()).getDuration(); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Duration(parameters, value); }