You can access the semantic status of invalid signatures (those returning {@code false} here) via {@link #getStatus(Signature) getStatus}.
1819202122232425262728
public void validate(Object obj, Errors e) { ValidationUtils.rejectIfEmpty(e, "title", "title.empty"); PhotoUpload pu = (PhotoUpload) obj; if (pu.getFile() == null || pu.getFile().isEmpty()) { if (!pu.validSignature()) { e.rejectValue("signature", "signature.mismatch"); } } }
136137138139140141142143144145146
throw new SemanticWarning(lf, err); } final Function function = funcEnum.getFunction(); if (!function.validSignature(sig)) { final Map<Signature, SemanticStatus> map = function.getStatus(sig); final String lf = term.toBELLongForm(); final String err = format(SEMANTIC_TERM_FAILURE, lf); throw new SemanticWarning(null, err, sig, map); }
188189190191192193194195196197198