aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundKey.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundKey.java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundKey.java96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundKey.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundKey.java
new file mode 100644
index 0000000..67cc417
--- /dev/null
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/FoundKey.java
@@ -0,0 +1,96 @@
+/**
+ * <copyright> Copyright (c) 2006 by Know-Center, Graz, Austria </copyright>
+ *
+ * This software is the confidential and proprietary information of Know-Center,
+ * Graz, Austria. You shall not disclose such Confidential Information and shall
+ * use it only in accordance with the terms of the license agreement you entered
+ * into with Know-Center.
+ *
+ * KNOW-CENTER MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
+ * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT. KNOW-CENTER SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
+ * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
+ * DERIVATIVES.
+ *
+ * $Id: FoundKey.java,v 1.1 2006/08/25 17:07:21 wprinz Exp $
+ */
+package at.knowcenter.wag.egov.egiz.framework;
+
+/**
+ * Holds the information of one found key.
+ * @author wprinz
+ */
+public class FoundKey
+{
+ /**
+ * The type of the key.
+ */
+ public String key = null;
+
+ /**
+ * The caption of the key.
+ */
+ public String caption = null;
+
+ /**
+ * The start index of the caption in the text.
+ */
+ public int start_index = -1;
+
+ /**
+ *
+ * @param key The type of the key.
+ * @param caption The caption of the key.
+ * @param start_index The start index of the caption in the text.
+ */
+ public FoundKey(String key, String caption, int start_index)
+ {
+ this.key = key;
+ this.caption = caption;
+ this.start_index = start_index;
+ }
+
+ /**
+ * Returns the key.
+ * @return Returns the key.
+ */
+ public String getKey()
+ {
+ return this.key;
+ }
+
+ /**
+ * Returns the start_index.
+ * @return Returns the start_index.
+ */
+ public int getStartIndex()
+ {
+ return this.start_index;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return this.key + "(" + this.caption + ")@" + this.start_index;
+ }
+
+ /**
+ * Tells, if this FoundKey is semantically equal to the other FoundKey.
+ *
+ * <p>
+ * Two FoundKeys are semantically equal if their key and caption are the same.
+ * </p>
+ *
+ * @param other_found_key
+ * The other FoundKey.
+ * @return Returns true if the two keys are semantically equal.
+ */
+ public boolean isSemanticallyEqual(FoundKey other_found_key)
+ {
+ return this.key.equals(other_found_key.key) && this.caption.equals(other_found_key.caption);
+ }
+
+}