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.
# Print these fields fields: ITEMID,SUBJECTID,SESSIONID,TIME,SWITCH,A,B,q1This 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.
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,item05Only 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,doeOnly 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,SES06Only 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
fields.TIME.label: Time/sThis 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 labelThe '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_namewhere 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_patternSee 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 .
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/yyyyThis 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.