diff options
Diffstat (limited to 'src/main/java/at/knowcenter/wag')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java | 22 | ||||
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/pdf/TextualSignature.java | 3 |
2 files changed, 22 insertions, 3 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java index 9e7d1b6..da5a8dc 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java @@ -65,6 +65,7 @@ import at.knowcenter.wag.exactparser.parsing.results.ObjectParseResult; * </p>
*
* @author wprinz
+ * @author amavriqi
*/
public class VerificationFilter
{
@@ -177,8 +178,18 @@ public class VerificationFilter }
else
{
+ // FIXME make better
+ //amavriqi: skip checking for old sigs becouse of performance issues
+ String old_text_sigs = SettingsReader.getInstance().getSetting("check_old_textual_sigs", "false");
+
+ //amavriqi: if old textual signatures not checked for then
+ // no need to check Incremental Block 0
+ if(old_text_sigs.equalsIgnoreCase("false") && (prev_end == 0))
+ {
+ continue;
+ }
logger_.debug("Extracting text for: " + prev_end + " to " + bpr.next_index);
-
+
Verificator verificator = new TextualVerificator_1_0_0();
List text_holders = verificator.parseBlock(pdf, bpr, prev_end);
logger_.debug("text_holders = " + text_holders.size());
@@ -190,6 +201,9 @@ public class VerificationFilter current_block_contains_signature = true;
}
+ // FIXME make better
+ //amavriqi: only if old textual signatures are checked for
+ if(old_text_sigs.equalsIgnoreCase("true")){
if (prev_end == 0)
{
String rest_text = null;
@@ -200,6 +214,10 @@ public class VerificationFilter }
else
{
+ //a.m.
+ logger_.debug("Incemental block" + prev_end + " and there are " + text_holders.size() + " text holders");
+ logger_.debug("Checking for older textual Signatures");
+ logger_.debug("Extracting text to " + bpr.next_index);
rest_text = PdfAS.extractNormalizedTextTextual(pdf, bpr.next_index);
}
@@ -212,7 +230,7 @@ public class VerificationFilter holders.add(0, old_holders.get(0));
}
}
-
+ }
if (!text_holders.isEmpty())
{
List actual_text_holders = throwOutBinHolders(text_holders);
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/TextualSignature.java b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/TextualSignature.java index 1a3b56b..a52d6dd 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/TextualSignature.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/TextualSignature.java @@ -156,8 +156,9 @@ public class TextualSignature // stripper.setStartPage(4);
// stripper.setEndPage(4);
+ logger_.debug("TextualSignator extractTextTextual: Begin stripping text");
String text = stripper.getText(doc);
-
+ logger_.debug("TextualSignator extractTextTextual: Stripping text ended");
doc.close();
//logger_.debug("TextualSignator extractTextTextual="+text);
return text;
|