Results processing configuration

The output of the ResPrint tool can be customized with command line options and config files. When ResPrint starts, it loads the default results processing options from file '/usr/GuineaPig/lib/results.properties'. Then it loads the file 'results.properties' from the current directory if it finds one. Then an additional config file is loaded if one in provided with the ResPrint's -f option.

The config files allow you to configure which fields are printed and which order. The format used to print the values of a field can be customized with some built-in variations or with additional plug-in modules. Also simple filtering of item results is possible.

Empty lines and comment lines (lines beginning with a hash ("#") character) are ignored.

Fields to print and their order

The fields parameter lists the field IDs of the information about an item and their order. The selection of fields is provided as a comma-separated list of field IDs, for example:
   # Print these fields
   fields:   ITEMID,SUBJECTID,SESSIONID,TIME,SWITCH,A,B,q1
This would print the item ID, subject ID, session ID, item duration, number of sample switches, parameters A and B and the answer to question q1.

The fields are either built-in fields, parameter fields or answer fields. Built-in fields include such fields as item ID, item duration, etc. Parameter fields are the parameters of an item, such as 'A' or 'B' or 'Ref'. Answer fields are the answers given for the questions specified in the UI config file.

Built-in fields

Here is the list of built-in fields:
ITEMID
The item's item ID (a string).
SUBJECTID
The subject ID of the subject that gave the answers (a string).
SESSIONID
The session ID of the session during which this item was presented (a string).
ITEMSTART
The date and time when item was presented to the subject (a java's Date object).
TIME
The duration of the item (in seconds), how much time the subject used to grade the samples. If answering timed out, TIMEOUT is printed. (A java's Number object or a string (TIMEOUT)).
SWITCH
Number of sample switches during testing this item (an integer).
SESSIONSTART
The time when this session started (a java's Date object).
SESSIONEND
The time when this session ended (a java's Date object).
MCLL
The MCL level of this item's session (a GP's Volume object).

Test item filtering

With the filtering parameters or the ResPrint's filtering options you can select only a subset of all item results to be printed. If several filters are specified, the intersection of the sets defined by different filters is used (filters are 'and'ed together).

Select items: the items property is a comma-separated list of item IDs to print.

   # print only items item01, item03 and item05
   items:   item01,item03,item05
Only answers with given item IDs are printed.

Select subjects: the subjects property is a comma-separated list of subject IDs to print.

   # print only answers given by subjects with subject IDs john, jane and doe.
   subjects:   john,jane,doe
Only answers with subject IDs given are printed.

Select sessions: the sessions property is a comma-separated list of session IDs to print.

   # print only answers from sessions SES04, SES05, SES06.
   sessions:   SES04,SES05,SES06
Only answers with session IDs given are printed.

If a filter is not defined for items, all items are included in printing. The same goes for subjects and sessions filters.

You can use several types of filters, for example:

   # print only answers for item01, item03 and item05 given during
   # sessions SES04, SES05 and SES06.
   items:      item01,item03,item05
   sessions:   SES04,SES05,SES06

Field customization

The format of all the fields can be customized. Properties for fields are searched from parameters that look like this:
   fields.TIME.label:    Time/s
This example sets the label for the built-in TIME field. To choose a label 'System A' for item parameter A you would do it in the same fashion:
   fields.A.label:    System A

All fields have some standard properties. In the following, the FIELDID is the field ID name you want to customize.

The field label is the string that is shown in the header in the place of this field. Use property label to set it:

   fields.FIELDID.label:     field label
The 'field label' is shown in the header. If label is not specified, the field's ID is used as the label also.

The format used to display the field's contents can be specified. You'll need to provide a java class name of a formatter object with the format property:

   fields.FIELDID.format.class:    java_class_name
where java_class_name is the class name of the object you want to use for formatting. The formatter object must be a subclass of java's Format class. By default GP includes support for the most common format classes: numeric values and dates.

Formatters usually (numbers, dates) has a pattern that can be customized to change the output of the formatter. It is usually set with the pattern property of the field's format properties:

   fields.FIELDID.format.pattern:    formatting_pattern
See the documentation of the formatter for info about its pattern specs. More information about built-in fields formatting will be added later.

Defaults for builtin fields can be found from /usr/GuineaPig/lib/results.properties .

Sub-fields

Sub-fields allows you to split the information form one field to multiple fields. For example, you can split the starting time of the item (ITEMSTART) to deparate time and date fields. The format of the field ID of a sub-field is quite simple. For example, to define a date sub-field of the ITEMSTART parameter, the ID could be:
   fields:    ITEMID,SUBJECTID,ITEMSTART/date,A,B,...
The slash ('/') marks that this is a sub-field ID. The value that is formatted is got from the ITEMSTART parameter, the field ID that is in the left side of the slash character. The right side is not important, you may use anything you want. To customize the format of the new sub-field, just customize it the same as with any other field, for example:
   # Subfield ITEMSTART/date (The date part of the ITEMSTART field)
   # 
   fields.ITEMSTART/date.format.class:   guinea.tools.resprint.GPSimpleDateFormat
   fields.ITEMSTART/date.format.pattern: dd/MM/yyyy
This would format the date 'Mon Jan 18 14:42:59 EET 1999' as '18/01/1999'. With more sub-fields you could split the day, month, year to each their own fields.
· Results Processing Index · Document index ·