|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.knowcenter.wag.egov.egiz.framework.VerificationFilter
public class VerificationFilter
This filter transforms an arbitrary input pdf into an ordered List of SignatureHolders for verification.
The pdf document is parsed and the signature blocks (textual, binary, etc.) are extracted as verifyable SignatureHolder objects in the order they appear in the document.
Field Summary | |
---|---|
static byte[] |
EGIZ_DICT_NAME
|
static byte[] |
EGIZ_KZ_NAME
|
Constructor Summary | |
---|---|
VerificationFilter()
Default constructor. |
Method Summary | |
---|---|
protected void |
checkKZ(PdfASID kz)
Checks, if the given KZ is recognized by this application or logs a warning if it isn't. |
protected boolean |
containsEGIZDict(byte[] pdf,
FooterParseResult block)
Tells, if the given incremental update block contains a binary signature. |
protected PdfASID |
extractKZFromEGIZBlock(byte[] pdf,
FooterParseResult block)
Extracts the PDF AS ID of the egiz block. |
List |
extractSignaturesFromPdf(byte[] pdf)
Extracts the List of SignatureHolders from the given PDF document. |
List |
extractSignaturesFromPlainText(String raw_text)
Extracts the List of SignatureHolders from the given plain text document. |
static void |
main(String[] args)
|
protected static void |
printFoundHolders(String list_caption,
List found_holders,
PrintStream writer)
|
static String |
restoreKZ(byte[] pdf,
ArrayParseResult kz_apr)
Restores the Kennzeichnung String from an Array. |
protected void |
unrollLinearization(List blocks)
Removes the linearization footer from the list of update blocks. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[] EGIZ_DICT_NAME
public static final byte[] EGIZ_KZ_NAME
Constructor Detail |
---|
public VerificationFilter()
Method Detail |
---|
public List extractSignaturesFromPdf(byte[] pdf) throws PresentableException
pdf
- The PDF document.
PresentableException
protected void checkKZ(PdfASID kz)
kz
- The Kennzeichnung.protected void unrollLinearization(List blocks)
blocks
- The list of FooterParseResult objects in \prev order.public List extractSignaturesFromPlainText(String raw_text) throws PDFDocumentException, SignatureException, SignatureTypesException, NormalizeException
Note that this can only extract text signatures.
raw_text
- The plain text document.
SignatureException
PDFDocumentException
SignatureTypesException
NormalizeException
protected boolean containsEGIZDict(byte[] pdf, FooterParseResult block)
According to definition, if a block is a binary block, it must/cannot contain other signatures than this one.
block
- The incremental update block.
protected PdfASID extractKZFromEGIZBlock(byte[] pdf, FooterParseResult block) throws PDFDocumentException, InvalidIDException
pdf
- The pdf.block
- The IU block.
PDFDocumentException
- Forwarded exception.
InvalidIDException
- Forwarded exception.public static String restoreKZ(byte[] pdf, ArrayParseResult kz_apr) throws PDFDocumentException
pdf
- The PDF.kz_apr
- The Array, as parsed from the EGIZ Dict.
PDFDocumentException
- Forwarded exception.protected static void printFoundHolders(String list_caption, List found_holders, PrintStream writer)
public static void main(String[] args) throws IOException, PresentableException
IOException
PresentableException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |