diff options
author | knowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-06-29 13:34:25 +0000 |
---|---|---|
committer | knowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-06-29 13:34:25 +0000 |
commit | 57e6d642bd6d1ab7bece6e9710c82d03e211084d (patch) | |
tree | 92c7e1af53b94d0773a5e27900610e893d5de179 /src/main/java/at/knowcenter/wag/egov | |
parent | b99002587331ff5974838c241a68fed1b7cf2ff3 (diff) | |
download | pdf-as-3-57e6d642bd6d1ab7bece6e9710c82d03e211084d.tar.gz pdf-as-3-57e6d642bd6d1ab7bece6e9710c82d03e211084d.tar.bz2 pdf-as-3-57e6d642bd6d1ab7bece6e9710c82d03e211084d.zip |
minor changes regarding performance speed during verification
-a new key added in config to control verification of old textual signatures
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@126 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov')
-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;
|