Pre-defined Sample Data Field Format Synopsis  
 
The following table provides a definition and brief synopsis of each of the fields that comprise the pre-defined Pollstar100 Sample Data record, as well as the order in which each field should appear within the record.  
 
 
Votes
Hits
Ratings
Description
Resource
Resource URL
Date  
Pollstar100 Data
The number of votes this item has received
The number of hits this item has received
a pathname to the ratings data set relating to this item
A meaningful description of this item
A resource relating to this item
A resource URL to link to when this items resource is clicked
A timestamp for this item
a pathname to the ratings data set relating to this item
 
 
 
 
Pre-defined Sample Data Field Format Detail  
 
Sample Data is organised as a set of comma separated records that are held in a text file. The first two fields (fields 1-2) are dynamically updated by the Pollstar100 Service. It is recommended to leave these fields empty although designers may if they wish supply their own initial values or change current values at any time. The remaining fields (fields 3-8) all contain information that is provided by the designer. Each field corresponds to a specific Panel in the end-user interface. The designer optionally assigns values to these fields in order to provide dynamic data for the end-user interface.  
 
 
Field 1: Votes  
This field is used to record the number of votes received by an item in the Sample Data set. The field is updated by the Pollstar100 Client when the end-user casts a vote via either the Votes Panel or by selecting an item using the radio buttons and Vote Control pushbutton. If you are implementing the Best Of Breed And Specific Rating model then this field should be left blank as it will be updated by the Pollstar100 Application.  
 
 
Field 2: Hits  
This field is used to record the number of hits received by users on a specific item in the Sample Data set. The field is updated by the Pollstar100 Client when the end-user clicks on an item in either the Descriptions Panel or in the Resources Panel or both. The number of hits received for each specific Sample Data item is displayed in the end-user interface via the Hits Panel.  
 
 
Field 3: Ratings  
This field only has relevance to those designers that wish to implement the Best Of Breed And Specific Rating model. Use this field to provide an absolute or partial webserver pathname to the relevant Ratings Sample Data File for each specific item in the top-level Sample Data set. The data contained in this file is used to calculate a rating for the corresponding Sample Data item and will be displayed in end-user interface via the Ratings Panel. Note: Partial pathnames should be relative to the location of the Pollstar100 Service on the webserver.  
 
 
Field 4: Item Descriptions  
This field is used to provide a meaningful description or name of the Sample Data item. Data for this field can be either plaintext, html text, or -for those developers wishing to provide large Descriptions data- an absolute or partial URL to an external text file. Sample Data item Descriptions are displayed in the end-user interface via the Descriptions Panel. Note: Partial URLs for external text files should be relative to the location of the HTML document that embeds the Pollstar100 Application.  
 
 
Field 5: Resource  
This field is used to provide an absolute or partial URL to an external JPG or SWF resource such as a thumbnail or perhaps even a Flash Movieclip relating to an item in the Sample Data set. Images containing alpha channel information will need to be saved in SWF format. Sample Data item Resources are displayed in the end-user interface via the Resources Panel. Note: Partial URLs should be relative to the location of the HTML document that embeds the Pollstar100 Application.  
 
 
Field 6: Resource URL  
This field is used to provide a URL to link to when the end-user clicks on an item in the Resources Panel.  
 
 
Field 7: Date  
This field is used to provide a timestamp relating to an item in the Sample Data set. The format for this field is: hh.mm.ss.mm.dd.yyyy
 
You can specify the format that the date will actually be displayed in via the Time Format Property. Sample Data item timestamps are displayed in the end-user interface via the The Dates Panel.  
 
 
Field 8: Pollstar100 Sample Datafile  
This field only has relevance to those designers that wish to implement the Best Of Breed And Specific Rating model. Use this field to provide an absolute or partial webserver pathname to the relevant Ratings Sample Data File for each specific item in the top-level Sample Data set. The data contained in this file will be used to instantiate the corresponding child Pollstar100 Application and will be displayed in end-user interface via the The Pollstars Panel. Note: Partial pathnames should be relative to the location of the Pollstar100 Service on the webserver.  
 
 
 
 
Omitting Sample Field Values  
 
Each of the above fields corresponds to a column of Sample Data that can then be displayed in the Pollstar100 Client Application. If a designer intends not to make use of a particular column of Sample Data in the Client then there is no need to provide values for the corresponding field in the Sample Data file. Nevertheless, the field itself must exist, so that the order of subsequent fields in the record is preserved. For example the following represents three lines of Sample Data with the Ratings, Resource, Resource URL and Pollstar100 Sample Datafile field values omitted:  
 
 
0
0, , Item11, , ,09.00.00.01.01.06,   
00, , Item12, , ,09.00.00.01.02.06,   
00, , Item13, , ,09.00.00.01.03.06,  
   
 
 
 
 
 
Recognised Sample Data Record Format  
 
The Pollstar100 Service parses Sample Data records accordingly:  
 
·Any record contained within a Sample Data file that starts with a semi-colon will be treated as a comment and ignored.  
·Any record contained within a Sample Data file that contains only white space will be ignored.  
·Any quotes surrounding a Sample Data field value will be treated as part of the value and preserved.  
·Any leading or trailing white space surrounding a Sample Data field value will be stripped away.  
 
Also Note: Since Sample Data records are comma separated; commas should not be used as part of a Sample Data field value. However if this is absolutely necessary, it is a simple enough task to edit the Pollstar100 Service file and change the Sample Data file FIELD_DELIMITER
definition on line 27.  
 
 
 
 
 
Extending The Sample Data Set  
 
Designers may extend the pre-defined Sample Data set by appending their own custom fields to the end of the pre-defined Sample Data set. In other words, custom defined fields must start at Field 9 in the Sample Data set. For more information on how to provide a Pollstar100 Application with custom Sample Data see the following section:  
 
Using Generic Components To Extend the UI  
 
 
Also, see the following examples that make use of an extended Sample Data set:  
 
Example One  
Example Two  
Example Four  
 
 
 
 
Limits  
 
The following limits are imposed on the Sample Data set:  
 
·Maximum Record Size: 2048 bytes  
This limit may be overcome by editing the Pollstar100 Service file and changing the MAX_RECORD_LENGTH definition on line 35.  
 
·Maximum Number Of Record Fields: 9999  
This limit may not be overcome.