at.knowcenter.wag.egov.egiz.framework.verificators
Class BinaryVerificator_1_0_0

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.framework.verificators.BinaryVerificator_1_0_0
All Implemented Interfaces:
Verificator

public class BinaryVerificator_1_0_0
extends Object
implements Verificator

The BinaryVerificator parses the EGIT Dictionary and extracts the signature holder from it.

Author:
wprinz

Field Summary
static byte[] EGIZ_BYTE_RANGE_NAME
          The /ByteRange key in the EGIZ Dict.
static byte[] EGIZ_CERT_NAME
          The /Cert key in the EGIZ Dict.
static byte[] EGIZ_ENCODINGS_NAME
          The /encodings key in the EGIZ Dict.
static byte[] EGIZ_KZ_NAME
          The /ID key in the EGIZ Dict.
static byte[] EGIZ_ODS_NAME
          The /ODS key in the EGIZ Dict.
static byte[] EGIZ_REPLACES_NAME
          The /replaces key in the EGIZ Dict.
static PdfASID MY_ID
          The Pdf-AS ID of this Verificator.
 
Constructor Summary
BinaryVerificator_1_0_0()
          Default constructor.
 
Method Summary
protected  void checkIndex(int name_index)
          Throws an excaption, if the index is lower than 0.
protected  ParseResult getRequiredValueOfKey(byte[] pdf, DictionaryParseResult egiz_dict, byte[] name)
          Retrieves the value of the key from the dictionary.
protected  ParseResult getValueOfKey(byte[] pdf, DictionaryParseResult egiz_dict, byte[] name)
          Retrieves the value of the key from the dictionary.
 List parseBlock(byte[] pdf, FooterParseResult block, int start_of_whole_block)
          Parses the given document/Block for signatures of this type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MY_ID

public static final PdfASID MY_ID
The Pdf-AS ID of this Verificator.


EGIZ_ODS_NAME

public static final byte[] EGIZ_ODS_NAME
The /ODS key in the EGIZ Dict.


EGIZ_KZ_NAME

public static final byte[] EGIZ_KZ_NAME
The /ID key in the EGIZ Dict.


EGIZ_BYTE_RANGE_NAME

public static final byte[] EGIZ_BYTE_RANGE_NAME
The /ByteRange key in the EGIZ Dict.


EGIZ_REPLACES_NAME

public static final byte[] EGIZ_REPLACES_NAME
The /replaces key in the EGIZ Dict.


EGIZ_ENCODINGS_NAME

public static final byte[] EGIZ_ENCODINGS_NAME
The /encodings key in the EGIZ Dict.


EGIZ_CERT_NAME

public static final byte[] EGIZ_CERT_NAME
The /Cert key in the EGIZ Dict.

Constructor Detail

BinaryVerificator_1_0_0

public BinaryVerificator_1_0_0()
Default constructor.

Method Detail

parseBlock

public List parseBlock(byte[] pdf,
                       FooterParseResult block,
                       int start_of_whole_block)
                throws PresentableException
Description copied from interface: Verificator
Parses the given document/Block for signatures of this type.

Specified by:
parseBlock in interface Verificator
Parameters:
pdf - The whole pdf document. A Verificator must only access the document up to its given block (block.next_index) and must not modify any byte in the pdf array.
block - The incremental update block.
start_of_whole_block - The start of the incremental update block (the end of the previous block) - If 0, this is the first block (the original Document).
Returns:
Returns the List of SignatureHolder objects found for this block.
Throws:
PresentableException
See Also:
Verificator.parseBlock(byte[], at.knowcenter.wag.exactparser.parsing.results.FooterParseResult, int)

getRequiredValueOfKey

protected ParseResult getRequiredValueOfKey(byte[] pdf,
                                            DictionaryParseResult egiz_dict,
                                            byte[] name)
                                     throws PDFDocumentException
Retrieves the value of the key from the dictionary.

Parameters:
pdf - The PDF.
egiz_dict - The dictionary.
name - The name of the key.
Returns:
Returns the value of the key. An exception is thrown if the key doesn't exist.
Throws:
PDFDocumentException - Thrown, if the key doesn't exist in the dictionary.

checkIndex

protected void checkIndex(int name_index)
                   throws PDFDocumentException
Throws an excaption, if the index is lower than 0.

Parameters:
name_index - The index.
Throws:
PDFDocumentException - Thrown, if the index is lower than 0.

getValueOfKey

protected ParseResult getValueOfKey(byte[] pdf,
                                    DictionaryParseResult egiz_dict,
                                    byte[] name)
Retrieves the value of the key from the dictionary.

Parameters:
pdf - The PDF.
egiz_dict - The dictionary.
name - The name of the key.
Returns:
Returns the key's value, or null if the dictionary didn't contain that key.


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.