at.gv.egiz.pdfas.impl.vfilter.helper
Class VerificationFilterHelper

java.lang.Object
  extended byat.gv.egiz.pdfas.impl.vfilter.helper.VerificationFilterHelper

public final class VerificationFilterHelper
extends Object

Contains helpful methods used by the VerificationFilter.

Author:
wprinz

Constructor Summary
VerificationFilterHelper()
           
 
Method Summary
static TextPartition findLastTextPartition(List partitions)
          Finds the last text partition in the given list of partitions.
static int getEndOfPartition(Partition partition)
          Determines the end of the given partiton.
static List partition(PdfDataSource pdf, List blocks)
          Partitions the list of Incremental Update blocks into text and binary partitions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerificationFilterHelper

public VerificationFilterHelper()
Method Detail

partition

public static List partition(PdfDataSource pdf,
                             List blocks)
                      throws VerificationFilterException
Partitions the list of Incremental Update blocks into text and binary partitions.

A partition is a sequence of Incremental Update blocks of the same type.

An Incremental Update block is considered to have the type "binary" if it contains an egiz dictionary. A block not containing an egiz dictionary is considert to have the type "text".

Parameters:
pdf - The PDF.
blocks - The Incremental Update blocks.
Returns:
Returns the partitioning of the blocks.
Throws:
VerificationFilterException - Thrown if something goes wrong.

getEndOfPartition

public static int getEndOfPartition(Partition partition)
Determines the end of the given partiton.

Parameters:
partition - The partition.
Returns:
Returns the end index of the given partition.

findLastTextPartition

public static TextPartition findLastTextPartition(List partitions)
Finds the last text partition in the given list of partitions.

Parameters:
partitions - The partitions.
Returns:
Returns the last TextPartition.


Copyright © 2006-2010. All Rights Reserved.