GridSafeDocumentation/SafeRupiOGFUsageRecordTable/

OGF Usage Records are stored in database tables. Grid-SAFE's OGF usage record parser is used to parse records uploaded to SafeRupi in a form consistent with the RUPI specification. The parser is highly configurable. It's OGF documentation page describes how it may be modified to suit particular needs.

Additional Configuration

In addition to the the parser's configuration, the way usage records are parsed can be further modified with the following service configuration properties. Each configuration property may optionally specify the table name where the usage records will eventually be stored (by adding .table-name to the end of the property's name). If it is present, the property only applies to records that will end up in that table. If it isn't, the configuration property applies to all usage records parsed, regardless of which table they will finally end up in. This effect is exclusive, not additive. In other words, specifying a configuration property with a table name overrides the values specified in the same configuration property without a table name. The two values are not combined in any way.

The configuration properties are as follows:

policies

No Default Value (an empty list)

Defines a comma separated list of AccountingPolicy classes. Each policy in the list will be applied to accounting properties generated from a parsed usage record.

unique-properties

Default Value = recordId

A comma separated list of accounting property names that can be used to uniquely identify a record. The default value refers to the value of the OGF Usage Record recordId attribute, part of the RecordIdentity element.

The Publishing Process

An OGF usage record is parsed using the Grid-SAFE's OGF usage record parser which generates a set of zero or more accounting properties. The accounting properties are then given to zero or more accounting policies which examine the accounting properties, alter them and perhaps add more. The final set of accounting properties are then persisted to the database.

For each uploaded record the system will look for an existing record with the same set of unique properties. If such a record already exists then the uploaded record is assumed to be a duplicate and is not stored in the database.

Examples

Consider the following set of configuration properties:

policies = uk.ac.ed.epcc.safe.accounting.policy.AliasPropertyPolicy,com.example.NormalPolicy
unique-properties = recordId,StartTime

policies.SpecialRecords = com.example.SpecialPolicy

With the above example, usage records are checked for equality based on their recordId attribute value and their StartTime element value. If two usage records have the same value for both of these fields, will be considered identical. All usage records parsed are then processed using the AliasPropertyPolicy and NormalPolicy, unless they will end up in the SpecialRecords table. If that is their final destination, they be processed using the SpecialPolicy policy instead.

 

Grid-SAFE was funded by JISC and is maintained, developed, and managed by EPCC at the University of Edinburgh