GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: 5 External Classes Up: 7 < Previous: 3 GAT Application API   Contents

Subsections


4 GAT Application Utility API

This section defines the accessible and class constants associated with each . Note that data is an implementation and language-specific detail and is thus not part of the API.

GATObject

Description

of all in the GAT API.

.

1

This no arguments constructor creates an of an GATObject.

2

Destroys this GATObject.

3 Equals

The Equals implements an equivalence relation indicating whether some other is "equal to" this one. It is defined as a relation with the following properties:

  • It is reflexive, for any reference value x, x.equals(x) should return True.
  • It is symmetric, for any reference values x and y, x.equals(y) should return True if and only if y.equals(x) returns True.
  • It is transitive, for any reference values x, y, and z, if x.equals(y) returns True and y.equals(z) returns True, then x.equals(z) should return True.

In addition, for any non-null reference value x, x.equals(null) should return False.

The Equals for this returns True if and only two reference values x and y refer to the same in memory, in other words if x == y is True.

Inputs:

GATObject -- object -- GATObject to test for equality.

Outputs:

Bool -- equal -- Boolean indicating equality.

GATContextGATObject

Description

An of this is the primary GAT state object.

.

4

This creates an of a GATContext.

5

Destroys this GATContext object.

6 AddPreferences

The given GATPreferences are used as default preferences if for GATObjects created with this GATContext.

Inputs:

GATPreferences -- preferences -- Default GATPreferences for GATObjects created with this GATContext.

7 RemovePreferences

Remove the GATPreferences used as default preferences if for GATObjects created with this GATContext.

8 GetPreferences

Return the GATPreferences that are used as default preferences if for GATObjects created with this GATContext.

Outputs:

GATPreferences -- preferences -- Default GATPreferences for GATObjects created with this GATContext.

9 Clone

Clone is used to clone a specified context, copying all and security information. The new GATContext is completely independent from the original one, which may be destroyed with no effect on the new one.

Outputs:

GATContext -- context -- New GATContext.

10 ServiceActions

The ServiceActions call is used to allow the GAT Engine to service asynchronous actions, such as GATRequests and GATMetricEvents. In a single-threaded application it is likely that a timeout would be supplied, in a multi-threaded application one thread may be used for the GAT by using this call and no timeout.

The use of the ServiceActions MAY be language specific. For instance, some languages are naturally threaded, and this functionality may be provided by native means. As the timeout SHOULD be honored by all adaptors, the API user SHOULD treat that as a request that the implementation will attempt to honour.

Inputs:

GATTimePeriod -- timeout -- this may be a 0 timeout to indicate no timeout at all, or a specific time length.

11 AddSecurityContext

Adds the passed GATSecurityContext.

Inputs:

GATSecurityContext -- securityContext -- Instance to add.

12 RemoveSecurityContext

Removes the passed GATSecurityContext.

Inputs:

GATSecurityContext -- securityContext -- Instance to remove.

13 GetSecurityContexts

Gets the List of GATSecurityContexts associated with this GATContext.

Outputs:

List of GATSecurityContexts -- securityContexts -- GATSecurityContexts associated with this GATContext.

14 GetSecurityContextsByType

Gets a List of GATSecurityContexts of the specified type associated with this GATContext.

Inputs:

Integer -- type -- GATSecurityContext type.

Outputs:

List of GATSecurityContexts -- securityContexts -- GATSecurityContexts of the specified type associated with this GATContext.

15 GetStatus

Gets the GATStatus of the last operation associated with this GATContext. Note that in languages supporting exceptions, this MAY also have been thrown as an exception by that operation.

Outputs:

GATStatus -- status -- GATStatus of last GAT operation associated with this context.

GATSecurityContextGATObject

Description

A container for security information. Each context has a type associated with it. The type indicates if the GATSecurityContext corresponds to a ``password'' GATSecurityContext or a ``certificate'' GATSecurityContext.

Currently we provide additional auxiliary to create a context based upon password information or upon credentials stored in a file. GATContexts based upon these mechanisms can be used by adaptors to create further contexts containing opaque data objects, e.g. GSSAPI credentials.

.

16

Creates a new security context of a specific type. The type indicates the means by which this allows ``secure'' communications to be established. The allowed values for this type are the various variables of this established for this purpose.

Inputs:

Integer -- type -- Integer indication of the type of this .

17 Equals

Tests this GATSecurityContext for equality with the passed GATObject.

If the given GATObject is not a GATSecurityContext, then this immediately returns False.

For two GATSecurityContexts to be considered equal requires that they must be acquired over the same mechanisms and must refer to the same name.

Inputs:

GATObject -- object -- GATObject to test for equality.

Outputs:

Bool -- equal -- Boolean indicating equality.

18

Destroys a security context.

19 SetPasswordAuthenticate

Makes this a ``Password'' type security context and stores the username and password in the context.

Inputs:

String -- name -- Username associated with password.
String -- password -- Password.

20 GetPasswordAuthenticate

If this is a ``Password'' type security context get the username and password from the context.

Outputs:

String -- name -- Username associated with password.
String -- password -- Password.

21 SetCertificateAuthenticate

Makes this a ``Certificate'' type security context and stores the information about the location of keyfile and certificate file in the context.

Inputs:

String -- keyfile -- Keyfile, containing valid absolute or relative local path to keyfile. A relative path will be converted to an absolute path based upon the current working directory.
String -- certificate -- Certificate, containing valid absolute or local path to certificate file. A relative path will be converted to an absolute path based upon the current working directory.
String -- passphrase -- Passphrase (OPTIONAL)

22 GetCertificateAuthenticate

If this is a ``Certificate'' type security context get the information about the location of keyfile and certificate file stored in the context.

Outputs:

String -- keyfile -- Keyfile, containing valid absolute or relative local path to keyfile. A relative path will be converted to an absolute path based upon the current working directory.
String -- certificate -- Certificate, containing valid absolute or local path to certificate file. A relative path will be converted to an absolute path based upon the current working directory.
String -- passphrase -- Passphrase

23 SetRemoteAuthenticate

Makes this a ``Remote'' type security context and stores the information about the location of remote credential server in the context.

Inputs:

GATLocation -- location -- Location (URL) for remote credential server.
String -- name -- Username associated with the credential.
String -- passphrase -- Passphrase associated with the credential.

24 GetRemoteAuthenticate

If this is a ``Remote'' type security context get the information about the location of remote credential server stored in the context.

Inputs:

GATLocation -- location -- Location (URL) for remote credential server.
String -- name -- Username associated with credential.
String -- passphrase -- Passphrase associates with credential.

25 GetType

Gets the type associated with this .

Outputs:

Integer - Type associated with this .

26 Clone

Clone is used to clone a specified GATSecurityContext , copying all and security information. The new GATSecurityContext is completely independent from the original one, which may be destroyed with no effect on the new one. This method is used when cloning a GATContext.

Outputs:

GATSecurityContext -- secContext -- New GATSecurityContext.

Class Constants

GAT_Password

-- Integer constant used to specify the type of an of this

GAT_Certificate

-- Integer constant used to specify the type of an of this

GAT_Remote

-- Integer constant used to specify the type of an of this .

GAT<T>CredentialService

Description

Classes binding to specific values of the parameter <T> provide methods to return specific security objects, given an of a GATSecurityContext. For example a GATGSICredentialService provides mechanisms to get GSI credentials, a GATSSLCredentialService provides access to an SSL security object.

.

27

Constructs a GAT<T>CredentialService .

Inputs:

GATContext -- context -- GATContext

28 GetFullCredentialList

Gets a List of credentials of type <T> from the security contexts associated with the GATContext.

Outputs:

List of <T> objects -- credential_list -- List of credential objects

29 GetCredentialList

Gets a List of credentials of type <T> from a given security context associated with the GATContext. It is an error if passed GATSecurityContext is not associated with the GATContext used in the constructor of this GAT<T>CredentialService .

Inputs:

SecurityContext -- context -- A security context to get the <T> credential objects from.

Outputs:

List of <T> objects -- credential_list -- List of credential objects

GATSelfGATObject

Description

This corresponds to the current GAT job. There is only ever one of this , which is obtained by the GetInstance method. This object can be used to change various properties of this job, such as whether it is checkpointable or not, and what metrics or events it can report. It can also provide the GATJob associated with this job, which may then be advertised.

.

30 GetInstance

This class level operation returns the GATSelf object. While the GATSelf is not associated with any particular GATContext, this operation requires one to allow implementations to maintain thread-safety.

Inputs:

GATContext -- context -- GATContext for thread safety.

Outputs:

GATSelf -- self -- The GATSelf

31 AddRequestListener

Add a listener for specific GATRequests. If this is an information request listener, an application monitoring this application may see this as a new entry in the list of available metrics. If this is a command request, it must be ``checkpoint'', and this application will now appear as checkpointable.

Inputs:

GATRequestListener -- listener -- an objectthe GATRequestListener interface.
Integer -- type -- corresponding to the type of GATRequest served by this listener -- command or information.
GATTable -- Parameters -- contains further information describing this request type. In the case of an information request this must provide the ``Metric Parameters'', ``Metric measurement type'', ``Metric data type'' and ``Metric unit'' as detailed in the GATMetric class.
String -- name -- Name for the GATRequest.

32 RemoveRequestListener

Remove the request listener. If it was an information request listener, it will no longer be available to monitoring clients. If it was a checkpoint command listener the application will no longer be marked as checkpointable.

Inputs:

String -- name -- Name for the GATRequestListener to be removed.

33 GetJob

Gets a GATJob which is associated with this job. This can then be advertised to allow other jobs to manipulate this one.

Inputs:

GATContext -- context -- GATContext to be used for that GATJob.

Outputs:

GATJob -- job -- a GATJob associated with this job.

Class Constants

GAT_CommandRequest

-- Integer constant used to specify that a GATRequestListener is for command requests.

GAT_InformationRequest

-- Integer constant used to specify that a GATRequestListener is for information requests.

GATLocationGATObject

Description

An of this represents the location of an abstract or physical resource. The location of an abstract or physical resource is represented by a URI as defined by the standards

  • RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax
  • RFC 2732: Format for Literal IPv6 Addresses in URLs.
One should refer to these standards to determine the allowed forms for URIs. This provides a means to create a GATLocation from a ``URI in String form,'' for accessing the various components of the contained URI, and various other utility .

.

34

Constructs a GATLocation by parsing the given String as a URI.

This constructor parses the given String exactly as specified by the grammar in RFC 2396, Appendix A, except IPv6 addresses are permitted for the host component. An IPv6 address must be enclosed in square brackets (`[' and `]') as specified by RFC 2732. The IPv6 address itself must parse according to RFC 2373. IPv6 addresses are further constrained to describe no more than sixteen bytes of address information, a constraint implicit in RFC 2373 but not expressible in the grammar.

Inputs:

String -- uri -- URI for the Location.

35 Equals

Tests this GATLocation for equality with the passed GATObject.

If the given GATObject is not a GATLocation, then this immediately returns False.

For two GATLocations to be considered equal requires that either both are opaque or both are hierarchical. Their schemes must either both be undefined or else be equal without regard to case, and similarly for their fragments.

For two opaque GATLocations to be considered equal, their scheme-specific parts must be equal.

For two hierarchical GATLocations to be considered equal, their paths must be equal and their queries must either both be undefined or else be equal. Their authorities must either both be undefined, or both be registry-based, or both be server-based. If their authorities are defined and are registry-based, then they must be equal. If their authorities are defined and are server-based, then their hosts must be equal without regard to case, their port numbers must be equal, and their user-information components must be equal.

When testing the user-information, path, query, fragment, authority, or scheme-specific parts of two GATLocations for equality, the raw forms rather than the encoded forms of these components are compared and the hexadecimal digits of escaped octets are compared without regard to case.

Inputs:

GATObject -- object -- The GATObject to test for equality.

Outputs:

Bool -- equal -- Boolean indicating equality.

36

Destroys this GATLocation object.

37 GetAuthority

Returns the decoded authority component of this GATLocation.

A sequence of escaped octets is decoded by replacing it with the sequence of characters that it represents in the UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the effect of de-quoting any quoted US-ASCII characters as well as that of decoding any encoded non-US-ASCII characters. If a decoding error occurs when decoding the escaped octets then the erroneous octets are replaced by `\\uFFFD', the Unicode replacement character.

The String returned by this is equal to that returned by the GetRawAuthority except that all sequences of escaped octets are decoded.

Outputs:

String -- authority -- Decoded authority component of this GATLocation, or null if authority is undefined.

38 GetRawAuthority

Returns the raw authority component of this GATLocation.

The authority component of a GATLocation, if defined, only contains the commercial-at character (`@') and characters in the unreserved, punct, escaped, and other categories. If the authority is server-based then it is further constrained to have valid user-information, host, and port components.

Outputs:

String -- rawAuthority -- Raw authority component of this GATLocation, or null if authority is undefined.

39 GetFragment

Returns the decoded fragment component of this GATLocation.

A sequence of escaped octets is decoded by replacing it with the sequence of characters that it represents in the UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the effect of de-quoting any quoted US-ASCII characters as well as that of decoding any encoded non-US-ASCII characters. If a decoding error occurs when decoding the escaped octets then the erroneous octets are replaced by `\\uFFFD', the Unicode replacement character.

The String returned by this is equal to that returned by the GetRawFragment except that all sequences of escaped octets are decoded.

Outputs:

String -- ragment -- The decoded fragment component of this GATLocation, or null if fragment is undefined.

40 GetRawFragment

Returns the raw fragment component of this GATLocation.

The fragment component of a GATLocation, if defined, only contains legal URI characters.

Outputs:

String -- rawFragment -- Raw fragment component of this GATLocation, or null if fragment is undefined.

41 GetHost

Returns the host component of this GATLocation.

The host component of a GATLocation, if defined, will have one of the following forms:

  • A domain name consisting of one or more labels separated by period characters (`.'), optionally followed by a period character. Each label consists of alphanum characters as well as hyphen characters (`-'), though hyphens never occur as the first or last characters in a label. The last, or only, label in a domain name begins with an alpha character.
  • A dotted-quad IPv4 address of the form digit+.digit+.digit+.digit+, where no digit sequence is longer than three characters and no sequence has a value larger than 255.

  • An IPv6 address enclosed in square brackets (`[' and `]') and consisting of hexadecimal digits, colon characters (`:'), and possibly an embedded IPv4 address. The full syntax of IPv6 addresses is specified in RFC 2373: IPv6 Addressing Architecture.
The host component of a GATLocation cannot contain escaped octets, hence this does not perform any decoding.

Outputs:

String -- host -- Host component of this GATLocation, or null if host is undefined.

42 GetPath

Returns the decoded path component of this GATLocation.

A sequence of escaped octets is decoded by replacing it with the sequence of characters that it represents in the UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the effect of de-quoting any quoted US-ASCII characters as well as that of decoding any encoded non-US-ASCII characters. If a decoding error occurs when decoding the escaped octets then the erroneous octets are replaced by `\\uFFFD', the Unicode replacement character.

The String returned by this is equal to that returned by the GetRawPath except that all sequences of escaped octets are decoded.

Outputs:

String -- path -- Decoded path component of this GATLocation, or null if path is undefined.

43 GetRawPath

Returns the raw path component of this GATLocation.

The path component of a URI, if defined, only contains the slash character (`/'), the commercial-at character (`@'), and characters in the unreserved, punct, escaped, and other categories.

Outputs:

String -- rawPath -- Raw path component of this GATLocation, or null if path is undefined.

44 GetPort

Returns the port number of this GATLocation.

The port component of a URI, if defined, is a non-negative integer.

Outputs:

Integer -- port -- Port component of this URI, or -1 if the port is undefined.

45 GetQuery

Returns the decoded query component of this GATLocation.

A sequence of escaped octets is decoded by replacing it with the sequence of characters that it represents in the UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the effect of de-quoting any quoted US-ASCII characters as well as that of decoding any encoded non-US-ASCII characters. If a decoding error occurs when decoding the escaped octets then the erroneous octets are replaced by `\\uFFFD', the Unicode replacement character.

The String returned by this is equal to that returned by the GetRawQuery except that all sequences of escaped octets are decoded.

Outputs:

String -- query -- Decoded query component of this GATLocation, or null if query is undefined.

46 GetRawQuery

Returns the raw query component of this GATLocation.

The query component of a URI, if defined, only contains legal URI characters.

Outputs:

String -- rawQuery -- Raw query component of this GATLocation, or null if query is undefined.

47 GetScheme

Returns the scheme component of this GATLocation.

The scheme component of a URI, if defined, only contains characters in the alphanum category and in the String "-.+". A scheme always starts with an alpha character.

The scheme component of a URI cannot contain escaped octets, hence this does not perform any decoding.

Outputs:

String -- scheme -- Scheme component of this GATLocation, or null if scheme is undefined.

48 GetSchemeSpecificPart

Returns the decoded scheme-specific part of this GATLocation.

A sequence of escaped octets is decoded by replacing it with the sequence of characters that it represents in the UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the effect of de-quoting any quoted US-ASCII characters as well as that of decoding any encoded non-US-ASCII characters. If a decoding error occurs when decoding the escaped octets then the erroneous octets are replaced by `\\uFFFD', the Unicode replacement character.

The String returned by this is equal to that returned by the GetRawSchemeSpecificPart except that all sequences of escaped octets are decoded.

Outputs:

String -- Decoded scheme-specific component of this GATLocation (never null),

49 GetRawSchemeSpecificPart

Returns the raw scheme-specific part of this GATLocation. The scheme-specific part is never undefined, though it may be empty.

The scheme-specific part of a URI only contains legal URI characters.

Outputs:

String -- Raw scheme-specific component of this GATLocation (never null).

50 GetUserInfo

Returns the decoded user-information component of this GATLocation.

A sequence of escaped octets is decoded by replacing it with the sequence of characters that it represents in the UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the effect of de-quoting any quoted US-ASCII characters as well as that of decoding any encoded non-US-ASCII characters. If a decoding error occurs when decoding the escaped octets then the erroneous octets are replaced by `\\uFFFD', the Unicode replacement character.

The String returned by this is equal to that returned by the GetRawUserInfo except that all sequences of escaped octets are decoded.

Outputs:

String -- Decoded user-information component of this GATLocation, or null if it is undefined.

51 GetRawUserInfo

Returns the raw user-information component of this GATLocation.

The user-information component of a URI, if defined, only contains characters in the unreserved, punct, escaped, and other categories.

Outputs:

String -- Raw user-information component of this GATLocation, or null if it is undefined.

52 ToString

Returns the content of this GATLocation as a String.

A String equivalent to the input string given to the GATLocation constructor, or to the String computed from the originally-given components, as appropriate, is returned.

Outputs:

String -- stringLocation -- The string form of this GATLocation.

53 Clone

Returns a deep clone of this GATLocation.

Outputs:

GATLocation -- clone -- A clone of this GATLocation.

GATPreferencesGATObject

Description

An of this represents the user's preferences for selecting adaptors. Currently this is a place holder for the user preferences, the structure of which is in development; the matching algorithm outlined in the Match is used by the GAT implementation to determine which capability provider is used to satisfy a GAT API .

.

54

Creates a new GATPreferences .

55

Destroys this GATPreferences .

56 Add

This adds a name/value pair in which the name is a String and the value is a String to this GATPreferences .

Inputs:

String -- name -- Name of the attribute to add.
String -- value -- Value of the attribute to add.

57 Remove

Removes the name/value pair with the passed name from this GATPreferences .

Inputs:

String -- name -- Name of the name/value to remove.

58 Set

Sets the given GATTable of name/value pairs as preferences.

Input:

GATTable -- preferences -- Table of name/value pairs to be used as preferences.

59 Get

Gets the current preferences as name/value pairs in a GATTable.

Output:

GATTable -- preferences -- Table of name/value pairs containing the current preferences.

60 Match

Matches the GATPreferences against another GATPreferences expressing criteria. For Match to return true, all keys present in the criteria table must be present in the original and must match: a string-valued value in the original table is matched by a regular expression in the criteria table, and a numeric-valued value in the original table by a string holding an arithmetical expression (e.g., "$ < 5 $") in the criteria table.

Inputs:

GATPreferences -- criteria -- Matching criteria.

Outputs:

Bool -- match -- True if the GATPreferences matches the given criteria.

61 Clone

Clone is used to clone this GATPreferences , copying the GATTable. The new GATPreferences is completely independent from the original one, which may be destroyed with no effect on the new one. This method is used when cloning a GATContext.

Outputs:

GATPreferences -- preferences -- Cloned GATPreferences.

GATStatusGATObject

Description

An of this represents an error or an information message from a GAT operation or from an underlying adaptor. of this are used to provide an audit trail which the application user can use to trace the sequence of events which happened in any particular GAT operation; this may then be used by the application, adaptor or service developers or providers to debug problems.

Since the GAT Engine and adaptors may do several independent operations each of which may have associated errors or status messages, a GATStatus forms a node in a tree of GATStatus , rather than the more normal parent-child process of a try-catch type error mechanism.

Use cases

The application discovers that the last GAT operation had an error. It gets the status object, and tracks through the tree of child-errors printing out information to the user indented as per what depth it has in the tree.

Application invokes GATContext.GetStatus to get the GATStatus object, S, from the last GAT operation.

Application gets the messages associated with S by invoking S.GetMessages, and prints them out.

Application gets the status code associated with S by invoking S.GetStatusCode and prints that out.

Application invokes S.GetChildren and, for each child, C, invokes C.GetMessages, C.GetStatusCode and C.GetChildren as above, indenting the messages depending on depth in the tree.

.

62

Constructs an of this with the passed message.

Inputs:

String -- message -- Message associated with this GATStatus.

63

Destroys this GATStatus .

64 SetStatusCode

Sets the status code of this GATStatus.

Inputs:

Integer -- code -- Status code for this GATStatus.

65 GetStatusCode

Gets the status code of this GATStatus.

Outputs:

Integer -- code -- Status code for this GATStatus.

66 AddChild

Adds a child GATStatus to this one.

Inputs:

GATStatus -- child -- Child GATStatus .

67 GetChildren

Gets the child GATStatus of this one.

Outputs:

List of GATStatus objects -- children -- Child GATStatus .

68 AddMessage

Adds a message to this GATStatus.

Outputs:

String -- message -- Message for this GATStatus.

69 GetMessages

Returns the List of messages associated with this GATStatus.

Outputs:

List of Strings -- messages -- Messages associated with this GATStatus.

70 GetParent

Returns the parent GATStatus of this GATStatus.

Outputs:

GATStatus -- parent -- Parent GATStatus of this GATStatus.

GATTimeGATObject

Description

An of this represents a point in time.

.

71

This constructs a GATTime corresponding to the passed time.

Inputs:

Integer -- time -- Number of milliseconds after January 1, 1970, 00:00:00 GMT.

72

Destroys this GATTime .

73 Equals

Tests this GATTime for equality with the passed GATObject.

If the given GATObject is not a GATTime, then this immediately returns False.

If the passed GATObject is a GATTime, then it is deemed equal if it has a numerically equivalent time to the passed GATTime .

Inputs:

GATObject -- object -- GATObject to test for equality.

Outputs:

Bool -- equal -- Boolean indicating equality.

74 GetTime

This returns the time as the number of milliseconds after January 1, 1970, 00:00:00 GMT, an Integer

Outputs:

Integer -- duration -- Number of milliseconds after January 1, 1970, 00:00:00 GMT.

GATTimePeriodGATObject

Description

An of this represents a time duration, a length of time with uncertain start point.

.

75

This constructs a GATTimePeriod corresponding to the passed duration.

Inputs:

Integer -- duration -- Number of milliseconds this period of time lasts.

76

Destroys this GATTimePeriod.

77 Equals

Tests this GATTimePeriod for equality with the passed GATObject.

If the given GATObject is not a GATTimePeriod, then this immediately returns False.

If the passed GATObject is a GATTimePeriod, then it is deemed equal if it has a numerically equivalent time duration to the passed GATTimePeriod .

Inputs:

GATObject -- object -- GATObject to test for equality.

Outputs:

Bool -- equal -- Boolean indicating equality.

78 GetDuration

This returns the number of milliseconds this time period lasts, an Integer

Outputs:

Integer -- duration -- Number of milliseconds this time period lasts.

GATTable

Description

An of the GATTable maps keys to values. Any non-null of String can be used as a key, any String, primitive type (such as Integers and Floats) or GATObject can be used as a values. We call these ``valid types'' in this section. Apart from GATObjects and Strings, the other valid types are language dependend, and will be defined in the language specific GAT API specifications.

79 Note:

For some languages, native equivalents of GATTables may exist (e.g. hashtables in Perl). For specific language bindings, these native equivalents MAY be used instead of the GATTable class.

.

80

This constructs an of the GATTable.

81 Equals

Tests this GATTable for equality with the passed Object.

If the given Object is not a GATTable, then this immediately returns False.

For two GATTable to be considered as equal they must have a map from the set of keys in the first GATTable to the set of keys in the second GATTable such that Equals() when evaluated on the pairs of keys generated by this map returns True. In addition, the values for the key pairs generated by this map must be equal as determined by the Equals() on each value. In addition the same must be True exchanging the roles of the passed GATTable and the called GATTable.

Inputs:

GATObject -- object -- The Object to test for equality.

Outputs:

Bool -- equal -- Boolean indicating equality.

82

Destroys this GATTable.

83 Add

Maps the specified key to the specified value in this GATTable.

Inputs:

String -- key -- Key to add to the GATTable .
Valid Type -- value -- Value to map to the passed key in the GATTable .

84 Get

Returns the value to which the specified key is mapped in this GATTable.

Inputs:

String -- key -- Key to get the value for in this GATTable .

Outputs:

Valid Type -- value -- Value to which the key is mapped in this GATTable .

85 Remove

Removes the specified key is from this GATTable.

Inputs:

String -- key -- Key to get the value for in this GATTable .

86 GetType

Returns the data tyoe for the value of the specified key is maped in this GATTable. The realization of that MAY be different, dependend on implementation language.

Inputs:

String -- key -- Key to get the value type for in this GATTable .

Outputs:

Integer -- type -- Class constant describing the value type to which the key is mapped in this GATTable .

87 GetKeys

Returns a list of keys from GATTable.

Outputs:

List of Strings -- keys -- List containing all keys used in that GATTable .


next up previous contents
Next: 5 External Classes Up: 7 < Previous: 3 GAT Application API   Contents
Andre Merzky 2004-05-20