You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openvibe-scenario-v2.xsd 7.1KB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Base scenario schema for OpenViBE XML scenario -->
  3. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  4. <!-- Types definitions -->
  5. <!-- Identifier Type -->
  6. <xs:simpleType name="IdentifierType">
  7. <xs:restriction base="xs:string"/>
  8. </xs:simpleType>
  9. <!-- Name Type -->
  10. <xs:simpleType name="NameType">
  11. <xs:restriction base="xs:string"/>
  12. </xs:simpleType>
  13. <!-- ParameterType (settings value, attributes values) -->
  14. <xs:simpleType name="ParameterType">
  15. <xs:restriction base="xs:string"/>
  16. </xs:simpleType>
  17. <!-- Index Type -->
  18. <xs:simpleType name="IndexType">
  19. <xs:restriction base="xs:integer"/>
  20. </xs:simpleType>
  21. <!-- Scenario structure -->
  22. <!-- Root node -->
  23. <xs:element name="OpenViBE-Scenario">
  24. <xs:complexType>
  25. <xs:all>
  26. <!-- Fixed format version number to implement a fallback validation mechanism -->
  27. <xs:element name="FormatVersion" type="xs:string" fixed="2"/>
  28. <!-- Version of the entity used to generate the scenario -->
  29. <xs:element name="CreatorVersion" type="xs:string"/>
  30. <!-- Name of the entity used to generate the scenario -->
  31. <xs:element name="Creator" type="xs:string"/>
  32. <xs:element minOccurs="0" ref="Boxes"/>
  33. <xs:element minOccurs="0" ref="Links"/>
  34. <xs:element minOccurs="0" ref="Comments"/>
  35. <xs:element minOccurs="0" ref="Settings"/>
  36. <xs:element minOccurs="0" ref="Inputs"/>
  37. <xs:element minOccurs="0" ref="Outputs"/>
  38. <xs:element minOccurs="0" ref="Attributes"/>
  39. <xs:element minOccurs="0" ref="Metadata"/>
  40. </xs:all>
  41. </xs:complexType>
  42. </xs:element>
  43. <!-- Boxes -->
  44. <xs:element name="Boxes">
  45. <xs:complexType>
  46. <xs:sequence>
  47. <xs:element minOccurs="0" maxOccurs="unbounded" ref="Box"/>
  48. </xs:sequence>
  49. </xs:complexType>
  50. </xs:element>
  51. <xs:element name="Box">
  52. <xs:complexType>
  53. <xs:all>
  54. <xs:element name="Identifier" type="IdentifierType"/>
  55. <xs:element name="Name" type="NameType"/>
  56. <xs:element name="AlgorithmClassIdentifier" type="IdentifierType"/>
  57. <xs:element minOccurs="0" ref="Settings"/>
  58. <xs:element minOccurs="0" ref="Inputs"/>
  59. <xs:element minOccurs="0" ref="Outputs"/>
  60. <xs:element minOccurs="0" ref="Attributes"/>
  61. </xs:all>
  62. </xs:complexType>
  63. </xs:element>
  64. <!-- Links -->
  65. <xs:element name="Links">
  66. <xs:complexType>
  67. <xs:sequence>
  68. <xs:element minOccurs="0" maxOccurs="unbounded" ref="Link"/>
  69. </xs:sequence>
  70. </xs:complexType>
  71. </xs:element>
  72. <xs:element name="Link">
  73. <xs:complexType>
  74. <xs:all>
  75. <xs:element name="Identifier" type="IdentifierType"/>
  76. <xs:element ref="Source"/>
  77. <xs:element ref="Target"/>
  78. <xs:element minOccurs="0" ref="Attributes"/>
  79. </xs:all>
  80. </xs:complexType>
  81. </xs:element>
  82. <xs:element name="Source">
  83. <xs:complexType mixed="true">
  84. <xs:sequence>
  85. <xs:element name="BoxIdentifier" type="IdentifierType"/>
  86. <xs:choice>
  87. <xs:element name="BoxOutputIndex" type="IndexType"/>
  88. <xs:element name="BoxOutputIdentifier" type="IdentifierType"/>
  89. </xs:choice>
  90. </xs:sequence>
  91. </xs:complexType>
  92. </xs:element>
  93. <xs:element name="Target">
  94. <xs:complexType>
  95. <xs:sequence>
  96. <xs:element name="BoxIdentifier" type="IdentifierType"/>
  97. <xs:choice>
  98. <xs:element name="BoxInputIndex" type="IndexType"/>
  99. <xs:element name="BoxInputIdentifier" type="IdentifierType"/>
  100. </xs:choice>
  101. </xs:sequence>
  102. </xs:complexType>
  103. </xs:element>
  104. <!-- Comments -->
  105. <xs:element name="Comments">
  106. <xs:complexType>
  107. <xs:sequence>
  108. <xs:element minOccurs="0" maxOccurs="unbounded" ref="Comment"/>
  109. </xs:sequence>
  110. </xs:complexType>
  111. </xs:element>
  112. <xs:element name="Comment">
  113. <xs:complexType>
  114. <xs:all>
  115. <xs:element name="Identifier" type="IdentifierType"/>
  116. <xs:element name="Text" type="xs:string"/>
  117. <xs:element minOccurs="0" ref="Attributes"/>
  118. </xs:all>
  119. </xs:complexType>
  120. </xs:element>
  121. <!-- Settings -->
  122. <xs:element name="Settings">
  123. <xs:complexType>
  124. <xs:sequence>
  125. <xs:element minOccurs="0" maxOccurs="unbounded" ref="Setting"/>
  126. </xs:sequence>
  127. </xs:complexType>
  128. </xs:element>
  129. <xs:element name="Setting">
  130. <xs:complexType>
  131. <xs:all>
  132. <xs:element minOccurs="0" name="Identifier" type="IdentifierType"/>
  133. <xs:element name="TypeIdentifier" type="IdentifierType"/>
  134. <xs:element name="Name" type="NameType"/>
  135. <xs:element name="DefaultValue" type="ParameterType"/>
  136. <xs:element minOccurs="0" name="Value" type="ParameterType"/>
  137. <xs:element minOccurs="0" name="Modifiability" type="xs:boolean"/>
  138. </xs:all>
  139. </xs:complexType>
  140. </xs:element>
  141. <!-- Inputs -->
  142. <xs:element name="Inputs">
  143. <xs:complexType>
  144. <xs:sequence>
  145. <xs:element minOccurs="0" maxOccurs="unbounded" ref="Input"/>
  146. </xs:sequence>
  147. </xs:complexType>
  148. </xs:element>
  149. <xs:element name="Input">
  150. <xs:complexType>
  151. <xs:sequence>
  152. <xs:element minOccurs="0" name="Identifier" type="IdentifierType"/>
  153. <xs:element name="TypeIdentifier" type="IdentifierType"/>
  154. <xs:element name="Name" type="NameType"/>
  155. <xs:element minOccurs="0" name="LinkedBoxIdentifier" type="IdentifierType"/>
  156. <xs:choice>
  157. <xs:element minOccurs="0" name="LinkedBoxInputIndex" type="IndexType"/>
  158. <xs:element minOccurs="0" name="LinkedBoxInputIdentifier" type="IdentifierType"/>
  159. </xs:choice>
  160. </xs:sequence>
  161. </xs:complexType>
  162. </xs:element>
  163. <!-- Outputs -->
  164. <xs:element name="Outputs">
  165. <xs:complexType>
  166. <xs:sequence>
  167. <xs:element minOccurs="0" maxOccurs="unbounded" ref="Output"/>
  168. </xs:sequence>
  169. </xs:complexType>
  170. </xs:element>
  171. <xs:element name="Output">
  172. <xs:complexType>
  173. <xs:sequence>
  174. <xs:element minOccurs="0" name="Identifier" type="IdentifierType"/>
  175. <xs:element name="TypeIdentifier" type="IdentifierType"/>
  176. <xs:element name="Name" type="NameType"/>
  177. <xs:element minOccurs="0" name="LinkedBoxIdentifier" type="IdentifierType"/>
  178. <xs:choice>
  179. <xs:element minOccurs="0" name="LinkedBoxOutputIndex" type="IndexType"/>
  180. <xs:element minOccurs="0" name="LinkedBoxOutputIdentifier" type="IdentifierType"/>
  181. </xs:choice>
  182. </xs:sequence>
  183. </xs:complexType>
  184. </xs:element>
  185. <!-- Attributes -->
  186. <xs:element name="Attributes">
  187. <xs:complexType>
  188. <xs:sequence>
  189. <xs:element minOccurs="0" maxOccurs="unbounded" ref="Attribute"/>
  190. </xs:sequence>
  191. </xs:complexType>
  192. </xs:element>
  193. <xs:element name="Attribute">
  194. <xs:complexType>
  195. <xs:all>
  196. <xs:element name="Identifier" type="IdentifierType"/>
  197. <xs:element name="Value" type="ParameterType"/>
  198. </xs:all>
  199. </xs:complexType>
  200. </xs:element>
  201. <!-- Metadata -->
  202. <xs:element name="Metadata">
  203. <xs:complexType>
  204. <xs:sequence>
  205. <xs:element minOccurs="0" maxOccurs="unbounded" ref="Entry"/>
  206. </xs:sequence>
  207. </xs:complexType>
  208. </xs:element>
  209. <xs:element name="Entry">
  210. <xs:complexType>
  211. <xs:sequence>
  212. <xs:element name="Identifier" type="IdentifierType"/>
  213. <xs:element name="Type" type="IdentifierType"/>
  214. <xs:element name="Data" type="xs:string"/>
  215. </xs:sequence>
  216. </xs:complexType>
  217. </xs:element>
  218. </xs:schema>