changeset 2822:394b5e20d78f

#209. Added minNumberPlays and maxNumberPlays to specifications
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Tue, 09 May 2017 13:21:34 +0100
parents 058f270e6d4d
children 25027b8665a2
files js/specification.js xml/test-schema.xsd
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/js/specification.js	Fri May 05 09:35:06 2017 +0100
+++ b/js/specification.js	Tue May 09 13:21:34 2017 +0100
@@ -17,6 +17,8 @@
     this.preSilence = undefined;
     this.postSilence = undefined;
     this.playOne = undefined;
+    this.minNumberPlays = undefined;
+    this.maxNumberPlays = undefined;
 
     // nodes
     this.metrics = undefined;
@@ -548,6 +550,8 @@
         this.restrictMovement = undefined;
         this.position = undefined;
         this.commentBoxPrefix = "Comment on track";
+        this.minNumberPlays = undefined;
+        this.maxNumberPlays = undefined;
         this.audioElements = [];
         this.commentQuestions = [];
         this.schema = schemaRoot.getAllElementsByName("page")[0];
@@ -809,6 +813,8 @@
             this.stopTime = undefined;
             this.sampleRate = undefined;
             this.image = undefined;
+            this.minNumberPlays = undefined;
+            this.maxNumberPlays = undefined;
             this.alternatives = [];
             this.schema = schemaRoot.getAllElementsByName('audioelement')[0];
             this.parent = undefined;
--- a/xml/test-schema.xsd	Fri May 05 09:35:06 2017 +0100
+++ b/xml/test-schema.xsd	Tue May 09 13:21:34 2017 +0100
@@ -27,6 +27,9 @@
             </xs:simpleType>
         </xs:attribute>
 
+        <xs:attribute name="minNumberPlays" type="xs:nonNegativeInteger" default="0" />
+        <xs:attribute name="maxNumberPlays" type="xs:nonNegativeInteger" use="optional" />
+
         <xs:attribute name="playOne" type="xs:boolean" default="false" />
 
         <xs:attribute name="minWait" type="xs:nonNegativeInteger" default="0" />
@@ -67,6 +70,8 @@
                 <xs:attribute ref="preSilence" />
                 <xs:attribute ref="postSilence" />
                 <xs:attribute ref="playOne" />
+                <xs:attribute ref="minNumberPlays" />
+                <xs:attribute ref="maxNumberPlays" />
             </xs:complexType>
         </xs:element>
 
@@ -107,6 +112,8 @@
                 <xs:attribute ref="postSilence" />
                 <xs:attribute ref="playOne" />
                 <xs:attribute name="restrictMovement" type="xs:boolean" default="false" use="optional" />
+                <xs:attribute ref="minNumberPlays" />
+                <xs:attribute ref="maxNumberPlays" />
             </xs:complexType>
         </xs:element>
 
@@ -238,6 +245,8 @@
                     </xs:simpleType>
                 </xs:attribute>
                 <xs:attribute name="image" type="xs:anyURI" use="optional" />
+                <xs:attribute ref="minNumberPlays" />
+                <xs:attribute ref="maxNumberPlays" />
             </xs:complexType>
         </xs:element>