aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/framework
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2006-12-07 20:13:50 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2006-12-07 20:13:50 +0000
commit548c8770e5ec6cb9bf73b7c341673d4077099a75 (patch)
treed7974be70545dc909a48dcb1ee5b7e2e8dac3082 /src/main/java/at/knowcenter/wag/egov/egiz/framework
parentcee0fc1da69c84e0f7fc5382ebea77f2e50f5e44 (diff)
downloadpdf-as-3-548c8770e5ec6cb9bf73b7c341673d4077099a75.tar.gz
pdf-as-3-548c8770e5ec6cb9bf73b7c341673d4077099a75.tar.bz2
pdf-as-3-548c8770e5ec6cb9bf73b7c341673d4077099a75.zip
knowcenter adjustments from 2006-12-01 merged
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@13 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/framework')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundBlock.java64
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/verificators/TextualVerificator_1_0_0.java2
2 files changed, 45 insertions, 21 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundBlock.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundBlock.java
index 53afa10..1173666 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundBlock.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundBlock.java
@@ -96,7 +96,7 @@ public class FoundBlock
/**
* Tells, if this block is semantically equal to the other block.
*
- * Two blocks are semantically equal, if all the required have the
+ * Two blocks are semantically equal, if all the required fields (except SIG_ID) have the
* same captions in the same order.
*
* @param other_block
@@ -106,25 +106,27 @@ public class FoundBlock
*/
public boolean isSemanticallyEqual(FoundBlock other_block)
{
- List this_keys = filterOutNonRequiredFoundKeys(this.found_keys);
- List other_keys = filterOutNonRequiredFoundKeys(other_block.found_keys);
+ return this.std.isSemanticallyEqual(other_block.std);
- if (this_keys.size() != other_keys.size())
- {
- return false;
- }
-
- for (int i = 0; i < this_keys.size(); i++)
- {
- FoundKey this_found_key = (FoundKey) this_keys.get(i);
- FoundKey other_found_key = (FoundKey) other_keys.get(i);
-
- if (!this_found_key.isSemanticallyEqual(other_found_key))
- {
- return false;
- }
- }
- return true;
+// List this_keys = filterOutNonRequiredFoundKeys(filterOutSIG_ID(this.found_keys));
+// List other_keys = filterOutNonRequiredFoundKeys(filterOutSIG_ID(other_block.found_keys));
+//
+// if (this_keys.size() != other_keys.size())
+// {
+// return false;
+// }
+//
+// for (int i = 0; i < this_keys.size(); i++)
+// {
+// FoundKey this_found_key = (FoundKey) this_keys.get(i);
+// FoundKey other_found_key = (FoundKey) other_keys.get(i);
+//
+// if (!this_found_key.isSemanticallyEqual(other_found_key))
+// {
+// return false;
+// }
+// }
+// return true;
}
/**
@@ -132,7 +134,7 @@ public class FoundBlock
*
* @param found_keys The List of found keys.
*
- * @return Rturns the subset List which contains only the required keys.
+ * @return Returns the subset List which contains only the required keys.
*/
protected static List filterOutNonRequiredFoundKeys (List found_keys)
{
@@ -150,6 +152,28 @@ public class FoundBlock
}
return required_found_keys;
}
+
+ /**
+ * Filters out a SIG_ID found key.
+ * @param found_keys The List of found keys.
+ * @return Returns the subset List which contains all keys but the SIG_ID.
+ */
+ protected static List filterOutSIG_ID (List found_keys)
+ {
+ List nonsigid_found_keys = new ArrayList(found_keys.size());
+ for (int i = 0; i < found_keys.size(); i++)
+ {
+ FoundKey this_found_key = (FoundKey) found_keys.get(i);
+
+ if (this_found_key.key.equals(SignatureTypes.SIG_ID))
+ {
+ continue;
+ }
+
+ nonsigid_found_keys.add(this_found_key);
+ }
+ return nonsigid_found_keys;
+ }
/**
* Tells, if this block is strictly semantically equal to the other block.
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/verificators/TextualVerificator_1_0_0.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/verificators/TextualVerificator_1_0_0.java
index bbcebef..fccdfd0 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/framework/verificators/TextualVerificator_1_0_0.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/verificators/TextualVerificator_1_0_0.java
@@ -13,7 +13,7 @@
* LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES.
*
- * $Id: TextualVerificator_1_0_0.java,v 1.4 2006/10/31 08:08:00 wprinz Exp $
+ * $Id: TextualVerificator_1_0_0.java,v 1.5 2006/11/28 07:45:09 wprinz Exp $
*/
package at.knowcenter.wag.egov.egiz.framework.verificators;