* DDMSVersions have the same attribute XML namespace (e.g. XLink, ISM, NTK, GML after DDMS 2.0).
* @throws InvalidDDMSException if any required information is missing or malformed
*/
protected void validate(DDMSVersion version) throws InvalidDDMSException {
if (!version.isAtLeast("4.0.1") && !isEmpty())
throw new InvalidDDMSException("Notice attributes must not be used until DDMS 4.0.1 or later.");
if (!Util.isEmpty(getNoticeType()))
ISMVocabulary.validateEnumeration(ISMVocabulary.CVE_NOTICE_TYPE, getNoticeType());
if (!Util.isEmpty(getNoticeReason()) && getNoticeReason().length() > MAX_LENGTH)
throw new InvalidDDMSException("The noticeReason attribute must be shorter than " + MAX_LENGTH
+ " characters.");
if (!Util.isEmpty(getUnregisteredNoticeType()) && getUnregisteredNoticeType().length() > MAX_LENGTH)
throw new InvalidDDMSException("The unregisteredNoticeType attribute must be shorter than " + MAX_LENGTH
+ " characters.");
if (getNoticeDate() != null && !getNoticeDate().getXMLSchemaType().equals(DatatypeConstants.DATE))
throw new InvalidDDMSException("The noticeDate attribute must be in the xs:date format (YYYY-MM-DD).");
super.validate(version);
}