annotate docs/ProjectSpecificationDocument.tex @ 711:6062bbcc29b8

Updated Setup and Results XML to indicate future progress RE: Davids' Email.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Fri, 10 Apr 2015 10:16:52 +0100
parents f5de8699e2b6
children fef9e8337cfd
rev   line source
nicholas@9 1 \documentclass{article}
nicholas@9 2
nicholas@9 3 \usepackage[margin=2cm]{geometry}
nicholas@11 4 \usepackage{listings}
nicholas@9 5
nicholas@9 6 \begin{document}
nicholas@9 7
nicholas@9 8 \large APE Browser Tool - Project Specification Document
nicholas@9 9
nicholas@9 10 \section{Document}
nicholas@9 11
nicholas@9 12 An XML file containing all project information to load and execute the project on the client. Certain interfaces are optional, however others are mandatory. This guide should reflect the changes in the XML project and keep track of the versions. Hopwfully this can remain simple!
nicholas@9 13
nicholas@9 14 \section{Root}
nicholas@9 15
nicholas@9 16 The XML root must be \texttt{<BrowserEvalProjectDocument>}. This should be sufficiently identifiable in both itself and in the JavaScript decoding as it will create an object called the root name.
nicholas@9 17
nicholas@9 18 There must also be a \texttt{<version>} tag which has the attribute \texttt{id} containing a numerical representation of the version. Currently everything in this document can be assumed to be version 1. If future updates or corrections are made post delivery this should give the flexibility to ensure past projects still work.
nicholas@9 19
nicholas@9 20 The root will also contain the following tags: setup and tracks.
nicholas@9 21
nicholas@9 22 \section{Setup tag}
nicholas@9 23
nicholas@9 24 The setup tag specifies certain global test settings including: the interface type to use, the project return location and any other setup instructions.
nicholas@9 25
nicholas@9 26 An example of this tag could be:
nicholas@9 27
nicholas@9 28 \texttt{<setup interface="APE" projectReturn="http://project.return.url/goes/here" />}
nicholas@9 29
n@698 30 The setup should not have any element or any children.
nicholas@9 31
nicholas@9 32 \subsection{Attributes}
nicholas@9 33 \begin{itemize}
n@698 34 \item \texttt{interface} - Mandatory, String. Defaults to APE, otherwise use to load any of the available interfaces. Currently only valid string is APE.
n@698 35 \item \texttt{projectReturn} - Mandatory, String. Specify the URL to return the test results. If null client will generate XML locally and prompt user to return the file.
n@711 36 \item \texttt{randomiseOrder} - Optional, default to false. Specify if the order of the tests can be randomised.
n@711 37 \item \texttt{collectMetrics} - Optional, Boolean. Default to false. Determine if the test metrics should be collected. These include how long each test session took etc. The full metrics list can be modified in the 'metrics' tag.
nicholas@9 38 \end{itemize}
nicholas@9 39
nicholas@9 40 \subsection{Elements}
nicholas@9 41 None
nicholas@9 42
n@698 43 \section{AudioHolder tag}
nicholas@9 44
n@711 45 There should be one audioHolder tag per test session, inside which each audioElement is specified as children. The audioHolder tag can help to generalise certain objects. Each audioHolder instance specifies a separate listening test to be paged, each with their own specific requirements.
nicholas@9 46
nicholas@9 47 \subsection{Attributes}
nicholas@9 48 \begin{itemize}
n@711 49 \item \texttt{id} - Mandatory, String. Give an ID string or number to identify the test in the result.
n@698 50 \item \texttt{hostURL} - Optional, String. If all tracks are hosted from the same folder on a server, you can put in the lead here. For instance, if loading http://test.com/tracks/track1.wav and http://test.com/tracks/track2.wav, this could equal http://test.com/tracks/ and the url attribute in the track tag can be track1.wav or track2.wav. Equally http://test.com/ and then using tracks/track1.wav and tracks/track2.wav is valid.
n@698 51 \item \texttt{sampleRate} - Optional, Number. If your test requires a specific sample rate, this should be set to the desired sample rate in Hertz. This does not set the browser to the correct sample rate, but forces the browser to check the sample rate matches. If this is undefined, no sample rate matching will occur.
n@711 52 \item \texttt{randomiseOrder} - Optional, Boolean String. Defaults to false. Determine if the track order should be randomised. Must be true or false.
n@711 53 \item \texttt{repeatCount} - Optional, Number. Defaults to 0 (ie: no repeats). The number of times a test should be repeated.
nicholas@9 54 \end{itemize}
nicholas@9 55
nicholas@9 56 \subsection{Elements}
n@711 57 Contain the audioElements tags and the interfaceSetup tag.
nicholas@9 58
n@698 59 \section{audioElements tag}
nicholas@9 60
n@698 61 This must reside as children in the audioHolder tag. There must be one audioElement tag per sound sample to load into the test.
nicholas@9 62
nicholas@9 63 \subsection{Attributes}
nicholas@9 64 \begin{itemize}
n@698 65 \item \texttt{url} - Mandatory, String. Contain the full URL to the track. If the Tracks tag hostURL is set, concatenate this tag with the hostURL attribute to obtain the full URL.
n@698 66 \item \texttt{ID} - Optional, Number. Give the track a specific ID for the return. This will help if using multiple projects to spread a test across multiple sessions and/or locations, where each test will not use all the samples. If one audioElement is given the ID 3, the next audioElement (assuming it does not have an ID set itself) will have the ID of 4. This continues until the next audioElement with the ID attribute set is reached.
nicholas@9 67 \end{itemize}
nicholas@9 68
n@711 69 \section{interfaceSetup}
n@711 70
n@711 71 This is contained within the audioHolder tag and outlines test instance specific requirements. These include the following children tags: title - question title at the top of the page, scaleMin - minimum scale value text, scaleMax - maximum scale value text, scaleMid - halfway scale value text. There is also a preTest tag here allowing for specific questions/statements to be presented before running this specific test.
n@711 72
n@698 73 \section {CommentQuestion tag}
n@698 74
n@698 75 This is a 1st level tag (same level as AudioHolder and setup). This allows another question and comment box to be presented on the page. The results of these are passed back in the results XML with both the comment and the question.
n@698 76
n@698 77 \subsection{Attributes}
n@698 78 None.
n@698 79
n@698 80 \subsection{Elements}
n@698 81 The question to be presented.
n@698 82
n@698 83 \section {PreTest tag and PostTest tag}
n@698 84
n@698 85 These are 1st level tags. The PreTest tag allows for the specifying of pre test instructions and questions. These appear as a pop-up style window with next buttons and other automatic GUI. The postTest tag allows for specifying post test instructions, questions and resources. These appear as a pop-up style window after the submit button is pressed.
n@698 86
n@698 87 \subsection{Attributes}
n@698 88 None.
n@698 89
n@698 90 \subsection{Elements}
n@698 91 Takes the \texttt{statement} and \texttt{question} tags. The order these are presented in the XML define the order they appear on the screen.
n@698 92
n@698 93 \subsubsection{Statement}
n@698 94
n@698 95 The statement tag simply prints the included string verbatim on a 'pop-up' window with a next button.
n@698 96
n@698 97 \subsubsection{Question}
n@698 98
n@707 99 This allows for a question to be asked pre/post the test. This is added to the response XML in the same location as the other common/global questions. The response includes both the question asked and the response. This takes two attributes, id and mandatory. ID is a mandatory field. The same ID will be used in the results so it is important it is properly entered. Mandatory is optional. True means the field must be entered before continuing.
n@698 100
n@698 101 \subsubsection{Resource}
n@698 102
n@698 103 The resource tag is only available in the postTest tag. This allows for the linking to some external resource via the href attribute.
n@698 104
n@711 105 \section{Metric tag}
n@711 106 A 1st level tag, metrics must be declared in the setup tag. This takes a set of children 'metricEnable' to define which metrics to collect and present.
n@711 107
n@711 108 \subsection{metricEnable tag}
n@711 109 This takes a single attribute to determine which metric to enable for collection. Some of these are a global, per track or per test instance.
n@711 110 \begin{itemize}
n@711 111 \item testTimer - Return the global test timer and test instance timers. Measures the time between the first start and final submit.
n@711 112 \item elementTimer - Return the total time each audioElement in each test was listened too. Measures time between successive clicks on the track changer
n@711 113 \item elementTracker - Return the initial position of each track
n@711 114 \item elementTrackerFull - Return an enumerated pair of time and position. Track the entire movement of each element position. NOTE: Will override the elementTracker option above and throw an error into the browser console.
n@711 115 \item elementFlagListenedTo - Return a boolean per elementck to see if the element was listened to
n@711 116 \item elementFlagMoved - Return a boolean per element to see if the element slider was moved.
n@711 117 \item elementFlagComments - Return a boolean per element to see if the element has comments.
n@711 118 \end{itemize}
n@711 119
nicholas@9 120 \section{Example}
nicholas@9 121
nicholas@11 122 Here is an example XML structure
nicholas@9 123
nicholas@11 124 \begin{lstlisting}
nicholas@11 125 <?xml version="1.0" encoding="utf-8"?>
nicholas@11 126 <BrowserEvalProjectDocument>
nicholas@11 127 <setup interface="APE" projectReturn="null" />
n@698 128 <AudioHolder hostURL="example_eval/" sampleRate="44100"
nicholas@11 129 sampleRateExplicit="true">
n@699 130 <audioElements url="0.wav" ID="0"/>
n@698 131 <audioElements url="1.wav"/>
n@698 132 <audioElements url="2.wav"/>
n@698 133 <audioElements url="3.wav"/>
n@698 134 <audioElements url="4.wav"/>
n@698 135 <audioElements url="5.wav"/>
n@698 136 <audioElements url="6.wav"/>
n@698 137 <audioElements url="7.wav"/>
n@698 138 <audioElements url="8.wav"/>
n@698 139 <audioElements url="9.wav"/>
n@698 140 <audioElements url="10.wav"/>
n@698 141 </AudioHolder>
n@698 142 <CommentQuestion>What is your mixing experiance</CommentQuestion>
n@698 143 <PreTest>
n@698 144 <statement>Please listen to all mixes</statement>
n@698 145 </PreTest>
n@698 146 <PostTest>
n@698 147 <statement>Thank you for taking this listening test.</statement>
n@698 148 <question>Please enter your name.</question>
n@698 149 </PostTest>
nicholas@9 150 </BrowserEvalProjectDocument>
nicholas@11 151 \end{lstlisting}
nicholas@11 152
nicholas@9 153
nicholas@9 154
nicholas@9 155 \end{document}