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

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

public class SignatureTypeDefinition
extends Object
implements Serializable

See Also:
Serialized Form

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.
 Map getKeyCaptionMap()
           
 Map getKeyValueMap()
           
 Vector getRevertSortedCaptions()
           
 Vector getRevertSortedKeys()
           
protected  String getSettingsKeyBase()
           
 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.
 SignatureFieldDefinition readFieldDefinition(String field_name)
          Gets the field definition of the given Field.
protected  void readFieldDefinitions()
           
 String toString()
          The standard toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

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.

Overrides:
toString in class Object

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.

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-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.