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

java.lang.Object
  extended byat.knowcenter.wag.egov.egiz.sig.SignatureTypeDefinition
All Implemented Interfaces:
Serializable

public class SignatureTypeDefinition
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
protected  List field_definitions_
          List of (visible) field definitions.
protected  List invisible_field_definitions
          List of invisible field definitions.
 
Constructor Summary
SignatureTypeDefinition(SettingsReader settings, String type)
          The constructor of the signature type definition.
 
Method Summary
 boolean contains(String key)
          This method checks if a given key is defined.
protected static List filterOutNonRequiredFoundKeys(List keys)
          Filters out all non required keys from the List of keys.
 String getCaptionFromKey(String key)
          Returns a caption to a given key
 String getDescription()
           
 List getFieldDefinitions()
          Returns the list of field definitions of this Signature profile.
 List getInvisibleFieldDefinitions()
          Returns the List of invisible field definitions, if any.
 Map getKeyCaptionMap()
           
 Map getKeyValueMap()
           
 Vector getRevertSortedCaptions()
           
 Vector getRevertSortedKeys()
           
protected  String getSettingsKeyBase()
           
protected static String getSettingsKeyBase(String type)
           
 Vector getSortedCaptions()
           
 Vector getSortedKeys()
           
 String getType()
           
 String getValueFromKey(String key)
          Returns a value to given key
 boolean isSemanticallyEqual(SignatureTypeDefinition other)
          Tells if this signature profile is semantically equal to the other signature profile.
 boolean isTextExtractable()
          Tells, if the signature type is text-extractable, which means that all required fields are visible.
 SignatureFieldDefinition readFieldDefinition(String field_name)
          Gets the field definition of the given Field.
protected  void readFieldDefinitions()
           
protected  void readInvisibleFieldDefinitions()
           
static String readPhLenStringFromSettings(SettingsReader settings, String profile, String field_name)
           
 String toString()
          The standard toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

field_definitions_

protected List field_definitions_
List of (visible) field definitions.


invisible_field_definitions

protected List invisible_field_definitions
List of invisible field definitions.

If empty, all definitions are visible.

Constructor Detail

SignatureTypeDefinition

public SignatureTypeDefinition(SettingsReader settings,
                               String type)
                        throws SignatureException
The constructor of the signature type definition. It reads the configured table definition of the signature block and load the type definition of a given type.

Parameters:
settings - a SettingsReader instance
type - the signature type to load
Throws:
SignatureException
See Also:
SettingsReader
Method Detail

readInvisibleFieldDefinitions

protected void readInvisibleFieldDefinitions()

getInvisibleFieldDefinitions

public List getInvisibleFieldDefinitions()
Returns the List of invisible field definitions, if any.

Invisible field definitions are the field definitions of required fields that are not explicitely specified in the signature profile.

Note that the concept of invisible fields can only be used by binary signatures.

Returns:
Returns the List of invisible field definitions, if any.

isTextExtractable

public boolean isTextExtractable()
Tells, if the signature type is text-extractable, which means that all required fields are visible.

Returns:
Returns true, if the signature type is text-extractable.

getKeyCaptionMap

public Map getKeyCaptionMap()
Returns:
Returns the keys.

getKeyValueMap

public Map getKeyValueMap()
Returns:
Returns the keyValueMap.

getCaptionFromKey

public String getCaptionFromKey(String key)
Returns a caption to a given key

Parameters:
key -
Returns:
the caption or null if the key is not found

getValueFromKey

public String getValueFromKey(String key)
Returns a value to given key

Parameters:
key -
Returns:
the value or null if the key is not found

getSortedKeys

public Vector getSortedKeys()
Returns:
Returns the sortedKeys.

getSortedCaptions

public Vector getSortedCaptions()
Returns:
Returns the sortedCaptions.

getRevertSortedCaptions

public Vector getRevertSortedCaptions()
Returns:
Returns the revertSortedCaptions.

getRevertSortedKeys

public Vector getRevertSortedKeys()
Returns:
Returns the revertSortedKeys.

contains

public boolean contains(String key)
This method checks if a given key is defined.

Parameters:
key - to find
Returns:
true if the key is find false otherwise

toString

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


getType

public String getType()
Returns:
Returns the signature type string.

getDescription

public String getDescription()
Returns:
Returns the signature type description.

getSettingsKeyBase

protected String getSettingsKeyBase()

readFieldDefinition

public SignatureFieldDefinition readFieldDefinition(String field_name)
Gets the field definition of the given Field.

Parameters:
field_name - The name of the field.
Returns:
Returns the field's definition.

getSettingsKeyBase

protected static String getSettingsKeyBase(String type)

readPhLenStringFromSettings

public static String readPhLenStringFromSettings(SettingsReader settings,
                                                 String profile,
                                                 String field_name)

readFieldDefinitions

protected void readFieldDefinitions()

getFieldDefinitions

public List getFieldDefinitions()
Returns the list of field definitions of this Signature profile.

Returns:
Returns the list of field definitions of this Signature profile.

isSemanticallyEqual

public boolean isSemanticallyEqual(SignatureTypeDefinition other)
Tells if this signature profile is semantically equal to the other signature profile.

One profile is semantically equal to another one if the captions and keys of both profiles are equal and have the same order.

Parameters:
other - The other signature profile.
Returns:
Returns true, if this profile is semantically equivalent to the other profile.

filterOutNonRequiredFoundKeys

protected static List filterOutNonRequiredFoundKeys(List keys)
Filters out all non required keys from the List of keys.

Parameters:
keys - The List of keys.
Returns:
Returns the subset List which contains only the required keys.


Copyright © 2006-2010. All Rights Reserved.