(chore) cleanup logging

This commit is contained in:
Andreas Penski (init) 2019-12-10 14:49:08 +01:00
parent 5e579dcd11
commit 0771f88f4d
3 changed files with 26 additions and 13 deletions

View file

@ -0,0 +1,23 @@
package de.kosit.validationtool.impl;
import de.kosit.validationtool.impl.tasks.CheckAction;
import de.kosit.validationtool.model.reportInput.DocumentIdentificationType;
/**
* Creates a document identification element for the report by using the generates hash.
*
* @author Andreas Penski
*/
class CreateDocumentIdentificationAction implements CheckAction {
@Override
public void check(final Bag transporter) {
final DocumentIdentificationType i = new DocumentIdentificationType();
final DocumentIdentificationType.DocumentHash h = new DocumentIdentificationType.DocumentHash();
h.setHashAlgorithm(transporter.getInput().getDigestAlgorithm());
h.setHashValue(transporter.getInput().getHashCode());
i.setDocumentHash(h);
i.setDocumentReference(transporter.getInput().getName());
transporter.getReportInput().setDocumentIdentification(i);
}
}