/** * Checks the presence of ... segment in the signature, what is the proof -B profile existence * * @return */ public boolean hasBProfile() { final int count = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_SIGNED_SIGNATURE_PROPERTIES); return count > 0; }
/** * Checks the presence of SigAndRefsTimeStamp segment in the signature, what is the proof -X profile existence * * @return true if the -X extension is present */ public boolean hasXProfile() { boolean signAndRefs = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_SIG_AND_REFS_TIMESTAMP) > 0; return signAndRefs; }
/** * Checks the presence of CertificateValues and RevocationValues segments in the signature, what is the proof -A profile existence * * @return true if -A extension is present */ public boolean hasAProfile() { final boolean archiveTimestamp = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_ARCHIVE_TIMESTAMP) > 0; final boolean archiveTimestamp141 = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_ARCHIVE_TIMESTAMP_141) > 0; final boolean archiveTimestampV2 = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_ARCHIVE_TIMESTAMP_V2) > 0; return archiveTimestamp || archiveTimestamp141 || archiveTimestampV2; }
/** * Checks the presence of SignatureTimeStamp segment in the signature, what is the proof -T profile existence * * @return */ public boolean hasTProfile() { final int count = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_SIGNATURE_TIMESTAMP); return count > 0; }
/** * Checks the presence of CompleteCertificateRefs & CompleteRevocationRefs segments in the signature, what is the proof -C profile existence * * @return */ public boolean hasCProfile() { final boolean certRefs = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_COMPLETE_CERTIFICATE_REFS) > 0; final boolean revocationRefs = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_COMPLETE_REVOCATION_REFS) > 0; return certRefs || revocationRefs; }
/** * Checks the presence of CertificateValues and RevocationValues segments in the signature, what is the proof -XL profile existence * * @return true if -XL extension is present */ public boolean hasXLProfile() { final boolean certValues = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_CERTIFICATE_VALUES) > 0; final boolean revocationValues = DSSXMLUtils.count(signatureElement, xPathQueryHolder.XPATH_COUNT_REVOCATION_VALUES) > 0; return certValues || revocationValues; }