class DateType extends AbstractSimpleProperty
{

    private Calendar dateValue;

    /**
     * Property Date type constructor (namespaceURI is given)
     * 
     * @param metadata
     *            The metadata to attach to this property
     * @param namespaceURI
     *            the namespace URI to associate to this property
     * @param prefix
     *            The prefix to set for this property
     * @param propertyName
     *            The local Name of this property
     * @param value
     *            The value to set for this property
     */
    public DateType(XMPMetadata metadata, String namespaceURI, String prefix, String propertyName, Object value)
    {
        super(metadata, namespaceURI, prefix, propertyName, value);
    }

    /**
     * Set property value
     *
     * @param value the new Calendar element value
     */
    private void setValueFromCalendar(Calendar value)
    {
        dateValue = value;
    }

    /**
     * return the property value
     * 
     * @return boolean
     */
    @Override
    public Calendar getValue()
    {
        return dateValue;
    }

    /**
     * Check if the value has a type which can be understood
     * 
     * @param value
     *            Object value to check
     * @return True if types are compatibles
     */
    private boolean isGoodType(Object value)
    {<FILL_FUNCTION_BODY>}

    /**
     * Set value of this property
     * 
     * @param value
     *            The value to set
     */
    @Override
    public void setValue(Object value)
    {
        if (!isGoodType(value))
        {
            if (value == null)
            {
                throw new IllegalArgumentException(
                        "Value null is not allowed for the Date type");
            }
            throw new IllegalArgumentException(
                    "Value given is not allowed for the Date type: " 
                            + value.getClass() + ", value: " + value);
        }
        else
        {
            // if string object
            if (value instanceof String)
            {
                setValueFromString((String) value);
            }
            else
            {
                // if Calendar
                setValueFromCalendar((Calendar) value);
            }

        }

    }

    @Override
    public String getStringValue()
    {
        return DateConverter.toISO8601(dateValue);
    }

    /**
     * Set the property value with a String
     * 
     * @param value
     *            The String value
     */
    private void setValueFromString(String value)
    {
        try
        {
            setValueFromCalendar(DateConverter.toCalendar(value));
        }
        catch (IOException e)
        {
            // SHOULD NEVER HAPPEN
            // STRING HAS BEEN CHECKED BEFORE
            throw new IllegalArgumentException(e);
        }

    }

}

        if (value instanceof Calendar)
        {
            return true;
        }
        else if (value instanceof String)
        {
            try
            {
                DateConverter.toCalendar((String) value);
                return true;
            }
            catch (IOException e)
            {
                return false;
            }
        }
        return false;
    
<methods>public void <init>(org.apache.xmpbox.XMPMetadata, java.lang.String, java.lang.String, java.lang.String, java.lang.Object) ,public final java.lang.String getNamespace() ,public java.lang.String getPrefix() ,public java.lang.Object getRawValue() ,public abstract java.lang.String getStringValue() ,public abstract java.lang.Object getValue() ,public abstract void setValue(java.lang.Object) ,public java.lang.String toString() <variables>private final non-sealed java.lang.String namespace,private final non-sealed java.lang.String prefix,private final non-sealed java.lang.Object rawValue