/** * Convenience setter which sets the value using a {@link Calendar} object. * * Note: Sets fields using precision up to the millisecond, including timezone offset * * @param theCalendar The calendar object from which to retrieve values * @since 1.1 */ public void setValue(Calendar theCalendar) throws DataTypeException { setValue((String)null); getDetail().setValue(theCalendar); }
/** * Returns the minute as an integer. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public int getMinute() throws DataTypeException { return getDetail().getMinute(); }
private CommonTS getDetail() throws DataTypeException { if (myDetail == null) { myDetail = new CommonTS(getValue()); } return myDetail; }
/** * Return the value as a calendar object * @since 1.1 * @throws DataTypeException If the current underlying string representation can not be parsed into a valid date/time */ public Calendar getValueAsCalendar() throws DataTypeException { return getDetail().getValueAsCalendar(); }
private CommonTS getDetail() throws DataTypeException { if (myDetail == null) { myDetail = new CommonTS(getValue()); } return myDetail; }
/** * Convenience setter which sets the value using a {@link Calendar} object. * * Note: Sets fields using precision up to the second * * @param theCalendar The calendar object from which to retrieve values * @since 1.1 */ public void setValueToSecond(Calendar theCalendar) throws DataTypeException { setValue((String)null); getDetail().setValueToSecond(theCalendar); }
/** * Returns the hour as an integer. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public int getHour() throws DataTypeException { return getDetail().getHour(); }
private static boolean isEmpty(Visitable v) throws HL7Exception { if (v == null) return true; if (v instanceof TSComponentOne) { TSComponentOne tsc1 = (TSComponentOne) v; return tsc1.getValue() == null || tsc1.getValue().isEmpty(); } if (v instanceof Composite && v.getClass().getName().endsWith(".TS")) { Composite ts = (Composite)v; return isEmpty(ts.getComponent(0)); } return v.isEmpty(); }
/** * Convenience setter which sets the value using a {@link Calendar} object. * * Note: Sets fields using precision up to the minute * * @param theCalendar The calendar object from which to retrieve values * @since 1.1 */ public void setValueToMinute(Calendar theCalendar) throws DataTypeException { setValue((String)null); getDetail().setValueToMinute(theCalendar); }
/** * Returns the minute as an integer. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public int getMinute() throws DataTypeException { return getDetail().getMinute(); }
/** * Convenience setter which sets the value using a {@link Calendar} object. * * Note: Sets fields using precision up to the minute * * @param theCalendar The calendar object from which to retrieve values * @since 1.1 */ public void setValueToMinute(Calendar theCalendar) throws DataTypeException { setValue((String)null); getDetail().setValueToMinute(theCalendar); }
/** * Returns the fractional second value as a float. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public float getFractSecond() throws DataTypeException { return getDetail().getFractSecond(); }
/** * Convenience setter which sets the value using a {@link Date} object. * * Note: Sets fields using precision up to the second * * @param theDate The date object from which to retrieve values * @since 1.1 */ public void setValueToSecond(Date theDate) throws DataTypeException { setValue((String)null); getDetail().setValueToSecond(theDate); }
/** * Return the value as a calendar object * @since 1.1 * @throws DataTypeException If the current underlying string representation can not be parsed into a valid date/time */ public Calendar getValueAsCalendar() throws DataTypeException { return getDetail().getValueAsCalendar(); }
/** * Convenience setter which sets the value using a {@link Calendar} object. * * Note: Sets fields using precision up to the second * * @param theCalendar The calendar object from which to retrieve values * @since 1.1 */ public void setValueToSecond(Calendar theCalendar) throws DataTypeException { setValue((String)null); getDetail().setValueToSecond(theCalendar); }
/** * Return the value as a date object * Note: Sets fields using precision up to the second * * @since 1.1 * @throws DataTypeException If the current underlying string representation can not be parsed into a valid date/time */ public Date getValueAsDate() throws DataTypeException { return getDetail().getValueAsDate(); }
/** * Convenience setter which sets the value using a {@link Calendar} object. * * Note: Sets fields using precision up to the millisecond, including timezone offset * * @param theCalendar The calendar object from which to retrieve values * @since 1.1 */ public void setValue(Calendar theCalendar) throws DataTypeException { setValue((String)null); getDetail().setValue(theCalendar); }
/** * @see CommonTS#setDatePrecision(int, int, int) * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public void setDatePrecision(int yr, int mnth, int dy) throws DataTypeException { getDetail().setDatePrecision(yr,mnth,dy); }
/** * Convenience setter which sets the value using a {@link Date} object. * * Note: Sets fields using precision up to the second * * @param theDate The date object from which to retrieve values * @since 1.1 */ public void setValueToSecond(Date theDate) throws DataTypeException { setValue((String)null); getDetail().setValueToSecond(theDate); }
/** * Returns the year as an integer. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public int getYear() throws DataTypeException { return getDetail().getYear(); }