Node child = getXOMElement().getChild(i);
hasChildText = (hasChildText || (child instanceof Text && !Util.isEmpty(child.getValue().trim())));
}
boolean hasNestedElements = (!getLinks().isEmpty() || !getDetails().isEmpty());
if (hasChildText && hasNestedElements) {
throw new InvalidDDMSException(
"A ddms:revisionRecall element must not have both child text and nested elements.");
}
for (Link link : getLinks()) {
Util.requireDDMSValue("link security attributes", link.getSecurityAttributes());
link.getSecurityAttributes().requireClassification();
}
Util.requireDDMSValue("revision ID", getRevisionID());
if (!REVISION_TYPE_TYPES.contains(getRevisionType()))
throw new InvalidDDMSException("The revisionType attribute must be one of " + REVISION_TYPE_TYPES);
if (!Util.isEmpty(getXLinkAttributes().getType()) && !getXLinkAttributes().getType().equals(FIXED_TYPE))
throw new InvalidDDMSException("The type attribute must have a fixed value of \"" + FIXED_TYPE + "\".");
if (!Util.isEmpty(getNetwork()))
ISMVocabulary.requireValidNetwork(getNetwork());
if (getDDMSVersion().isAtLeast("5.0")) {
// Check for network is implicit in schema validation.
if (!Util.isEmpty(getOtherNetwork()))
throw new InvalidDDMSException("The otherNetwork attribute must not be used after DDMS 4.1.");
}
getSecurityAttributes().requireClassification();
super.validate();
}