Class XMLDocumentAnalyzer
java.lang.Object
eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
eu.europa.esig.dss.xades.validation.XMLDocumentAnalyzer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DocumentThe root element of the document to validateThis variable contains the list ofXAdESPathsadapted to the specific signature schema.Fields inherited from class eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
certificateVerifier, containerContents, detachedContents, detachedEvidenceRecordDocuments, document, manifestFile, signingCertificateSource -
Constructor Summary
ConstructorsConstructorDescriptionXMLDocumentAnalyzer(DSSDocument dssDocument) The default constructor for XMLDocumentValidator. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddXAdESPathsHolder(XAdESPath xadesPathsHolder) This adds aXAdESPaths.protected List<AdvancedSignature> This method build a list of signatures to be extracted from a documentvoidRemoves all elements from the list of query holders.getOriginalDocuments(AdvancedSignature advancedSignature) This method returns the signed document(s) without their signature(s)Returns the root element of the validating documentReturns an instance of a corresponding to the formatSignaturePolicyValidatorLoaderThis getter returns theXAdESPathsbooleanisSupported(DSSDocument dssDocument) Checks if the document is supported by the current validatorvoidsetDisableXSWProtection(boolean disableXSWProtection) NOT RECOMMENDED : This parameter allows disabling protection against XML Signature wrapping attacks (XSW).Methods inherited from class eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
addReference, appendCounterSignatures, appendExternalEvidenceRecords, appendExternalEvidenceRecords, buildDetachedEvidenceRecords, buildDetachedTimestamps, buildEvidenceRecord, coversSignature, createValidationContext, fromDocument, getAllEvidenceRecords, getAllSignatures, getDetachedEvidenceRecords, getDetachedTimestamps, getDocument, getEvidenceRecord, getEvidenceRecordScopes, getOriginalDocuments, getSignatureById, getSignaturePolicyProvider, getSignatures, getTimestampedReferences, getTimestampReaders, getTokenIdentifierProvider, getValidationData, getValidationData, getValidationTime, instantiateValidationDataContainer, isTimestampCoveredByEvidenceRecord, prepareDetachedEvidenceRecordValidationContext, prepareDetachedTimestampValidationContext, prepareSignatureForVerification, prepareSignatureValidationContext, prepareValidationContext, processSignaturesValidation, setCertificateVerifier, setContainerContents, setDetachedContents, setDetachedEvidenceRecordDocuments, setDetachedEvidenceRecords, setManifestFile, setSignaturePolicyProvider, setSigningCertificateSource, setTokenIdentifierProvider, setValidationContextExecutor, setValidationTime, validate, validateContext, validateSignaturePolicy
-
Field Details
-
xadesPathsHolders
-
rootElement
The root element of the document to validate
-
-
Constructor Details
-
XMLDocumentAnalyzer
The default constructor for XMLDocumentValidator. The created instance is initialised with defaultXAdESPaths.- Parameters:
dssDocument- The instance ofDSSDocumentto validate
-
-
Method Details
-
isSupported
Description copied from interface:DocumentAnalyzerChecks if the document is supported by the current validator- Parameters:
dssDocument-DSSDocumentto check- Returns:
- TRUE if the document is supported, FALSE otherwise
-
setDisableXSWProtection
public void setDisableXSWProtection(boolean disableXSWProtection) NOT RECOMMENDED : This parameter allows disabling protection against XML Signature wrapping attacks (XSW). It disables the research by XPath expression for defined Type attributes.- Parameters:
disableXSWProtection- true to disable the protection
-
buildSignatures
Description copied from class:DefaultDocumentAnalyzerThis method build a list of signatures to be extracted from a document- Overrides:
buildSignaturesin classDefaultDocumentAnalyzer- Returns:
- a list of
AdvancedSignatures
-
getOriginalDocuments
Description copied from interface:DocumentAnalyzerThis method returns the signed document(s) without their signature(s)- Parameters:
advancedSignature-AdvancedSignatureto find signer documents for- Returns:
- list of
DSSDocuments
-
getXAdESPathsHolder
-
addXAdESPathsHolder
-
clearQueryHolders
public void clearQueryHolders()Removes all elements from the list of query holders. The list will be empty after this call returns. -
getRootElement
-
getSignaturePolicyValidatorLoader
Description copied from class:DefaultDocumentAnalyzerReturns an instance of a corresponding to the formatSignaturePolicyValidatorLoader- Overrides:
getSignaturePolicyValidatorLoaderin classDefaultDocumentAnalyzer- Returns:
SignaturePolicyValidatorLoader
-