annotate docs/ProjectSpecificationDocument.tex @ 707:f5de8699e2b6

Completed Linking for pre-Test questions. Need some formatting on layout.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Thu, 09 Apr 2015 10:44:13 +0100
parents 375410a5571d
children 6062bbcc29b8
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.
nicholas@9 36 \end{itemize}
nicholas@9 37
nicholas@9 38 \subsection{Elements}
nicholas@9 39 None
nicholas@9 40
n@698 41 \section{AudioHolder tag}
nicholas@9 42
n@698 43 There should be one audioHolder tag, inside which each audioElement is specified as children. The audioHolder tag can help to generalise certain objects.
nicholas@9 44
nicholas@9 45 \subsection{Attributes}
nicholas@9 46 \begin{itemize}
n@698 47 \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 48 \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@698 49 \item \texttt{sampleRateExplicit} - Optional, DEPRECATED. A true/false to determine if the sample rate given in the attribute \texttt{sampleRate} must be matched by the system. If the web audio API does not match, a browser alert is called and the rest of the interface loading is discarded. Media files are also not downloaded until this check can be corrected.
nicholas@9 50 \end{itemize}
nicholas@9 51
nicholas@9 52 \subsection{Elements}
n@698 53 Contain the audioElements tags.
nicholas@9 54
n@698 55 \section{audioElements tag}
nicholas@9 56
n@698 57 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 58
nicholas@9 59 \subsection{Attributes}
nicholas@9 60 \begin{itemize}
n@698 61 \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 62 \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 63 \end{itemize}
nicholas@9 64
n@698 65 \section {CommentQuestion tag}
n@698 66
n@698 67 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 68
n@698 69 \subsection{Attributes}
n@698 70 None.
n@698 71
n@698 72 \subsection{Elements}
n@698 73 The question to be presented.
n@698 74
n@698 75 \section {PreTest tag and PostTest tag}
n@698 76
n@698 77 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 78
n@698 79 \subsection{Attributes}
n@698 80 None.
n@698 81
n@698 82 \subsection{Elements}
n@698 83 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 84
n@698 85 \subsubsection{Statement}
n@698 86
n@698 87 The statement tag simply prints the included string verbatim on a 'pop-up' window with a next button.
n@698 88
n@698 89 \subsubsection{Question}
n@698 90
n@707 91 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 92
n@698 93 \subsubsection{Resource}
n@698 94
n@698 95 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 96
nicholas@9 97 \section{Example}
nicholas@9 98
nicholas@11 99 Here is an example XML structure
nicholas@9 100
nicholas@11 101 \begin{lstlisting}
nicholas@11 102 <?xml version="1.0" encoding="utf-8"?>
nicholas@11 103 <BrowserEvalProjectDocument>
nicholas@11 104 <setup interface="APE" projectReturn="null" />
n@698 105 <AudioHolder hostURL="example_eval/" sampleRate="44100"
nicholas@11 106 sampleRateExplicit="true">
n@699 107 <audioElements url="0.wav" ID="0"/>
n@698 108 <audioElements url="1.wav"/>
n@698 109 <audioElements url="2.wav"/>
n@698 110 <audioElements url="3.wav"/>
n@698 111 <audioElements url="4.wav"/>
n@698 112 <audioElements url="5.wav"/>
n@698 113 <audioElements url="6.wav"/>
n@698 114 <audioElements url="7.wav"/>
n@698 115 <audioElements url="8.wav"/>
n@698 116 <audioElements url="9.wav"/>
n@698 117 <audioElements url="10.wav"/>
n@698 118 </AudioHolder>
n@698 119 <CommentQuestion>What is your mixing experiance</CommentQuestion>
n@698 120 <PreTest>
n@698 121 <statement>Please listen to all mixes</statement>
n@698 122 </PreTest>
n@698 123 <PostTest>
n@698 124 <statement>Thank you for taking this listening test.</statement>
n@698 125 <question>Please enter your name.</question>
n@698 126 </PostTest>
nicholas@9 127 </BrowserEvalProjectDocument>
nicholas@11 128 \end{lstlisting}
nicholas@11 129
nicholas@9 130
nicholas@9 131
nicholas@9 132 \end{document}