at.knowcenter.wag.egov.egiz.sig
Class SignatureBlock

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.sig.SignatureBlock

public class SignatureBlock
extends Object

This method is to analyse a signature block string. It searches for configured signature types while compairing defined key words with the text.

Author:
wlackner

Constructor Summary
SignatureBlock(List signatureTypes)
          The default constructor to analyse a signature block string.
 
Method Summary
 int getEndIndex()
           
 SignatureObject getSignatureObject()
           
 int getStartIndex()
           
 String getType()
           
 boolean separateBlockFromRawText(String rawText, boolean old_style)
          This method is the base method to analyse a raw text separating a signature block string from the raw text.
 String toString()
          The standard toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SignatureBlock

public SignatureBlock(List signatureTypes)
The default constructor to analyse a signature block string. It uses a predefined signature type list to assign the text block to signature type. The analyse method have to be call separately --> separateBlockFromRawText()

Parameters:
signatureTypes -
Method Detail

separateBlockFromRawText

public boolean separateBlockFromRawText(String rawText,
                                        boolean old_style)
This method is the base method to analyse a raw text separating a signature block string from the raw text. It searches for corresponding signature types from back to front in the raw text. Therefore a revert list of multiple signations can be extracted calling this method more than one times. The method extracts the start and end postition of a found signature block and extracts all keys used in that block. If all required fields are found a successful separation is done and can be access calling the method getStartIndex, getEndIndex, getType, getSignatureObject.

Parameters:
rawText - the raw text to separate a signature block from
Returns:
true if a separation has done successful false if no signature block can be found

getEndIndex

public int getEndIndex()
Returns:
Returns the endIndex.

getSignatureObject

public SignatureObject getSignatureObject()
                                   throws SignatureException
Returns:
Returns the signatureObject of the separated signature block.
Throws:
SignatureException

getStartIndex

public int getStartIndex()
Returns:
Returns the startIndex.

getType

public String getType()
Returns:
Returns the type.

toString

public String toString()
The standard toString method. Used for interal tests only.

Overrides:
toString in class Object


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