Class XMLDocumentValidator

    • Field Detail

      • xPathQueryHolders

        protected List<XPathQueryHolder> xPathQueryHolders
        This variable contains the list of XPathQueryHolder adapted to the specific signature schema.
      • rootElement

        protected Document rootElement
    • Constructor Detail

      • XMLDocumentValidator

        public XMLDocumentValidator​(DSSDocument dssDocument)
        The default constructor for XMLDocumentValidator. The created instance is initialised with default XPathQueryHolder and XAdES111XPathQueryHolder.
        Parameters:
        dssDocument - The instance of DSSDocument to validate
    • Method Detail

      • getSignatures

        public List<AdvancedSignature> getSignatures()
        Description copied from interface: DocumentValidator
        Retrieves the signatures found in the document
        Returns:
        a list of AdvancedSignatures for validation purposes
      • getSignatureById

        public AdvancedSignature getSignatureById​(String signatureId)
                                           throws DSSException
        Retrieves a signature based on its Id
        Parameters:
        signatureId - the given Id
        Returns:
        the corresponding XAdESSignature
        Throws:
        DSSException - in case no Id is provided, or in case no signature was found for the given Id
      • getOriginalDocuments

        public List<DSSDocument> getOriginalDocuments​(String signatureId)
                                               throws DSSException
        Description copied from interface: DocumentValidator
        This method returns the signed document(s) without their signature(s)
        Parameters:
        signatureId - the DSS ID of the signature to extract original signer data for
        Throws:
        DSSException
      • getXPathQueryHolder

        public List<XPathQueryHolder> getXPathQueryHolder()
        This getter returns the XPathQueryHolder
        Returns:
      • addXPathQueryHolder

        public void addXPathQueryHolder​(XPathQueryHolder xPathQueryHolder)
        This adds a XPathQueryHolder. This is useful when the signature follows a particular schema.
        Parameters:
        xPathQueryHolder -
      • clearQueryHolders

        public void clearQueryHolders()
        Removes all of the elements from the list of query holders. The list will be empty after this call returns.
      • getRootElement

        public Document getRootElement()
        Returns: