core.xsd 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <schema
  3. xmlns="http://www.w3.org/2001/XMLSchema"
  4. xml:lang="EN"
  5. targetNamespace="http://msqr.us/xsd/ieat"
  6. jaxb:version="1.0"
  7. xmlns:eat="http://msqr.us/xsd/ieat"
  8. xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  9. xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
  10. jaxb:extensionBindingPrefixes="xjc"
  11. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  12. elementFormDefault="qualified"
  13. attributeFormDefault="unqualified">
  14. <complexType name="base">
  15. <simpleContent>
  16. <extension base="string">
  17. <attribute name="baseId" type="int"/>
  18. </extension>
  19. </simpleContent>
  20. </complexType>
  21. <complexType name="course">
  22. <simpleContent>
  23. <extension base="string">
  24. <attribute name="courseId" type="int"/>
  25. </extension>
  26. </simpleContent>
  27. </complexType>
  28. <complexType name="difficulty">
  29. <simpleContent>
  30. <extension base="string">
  31. <attribute name="difficultyId" type="int"/>
  32. </extension>
  33. </simpleContent>
  34. </complexType>
  35. <complexType name="ethnicity">
  36. <simpleContent>
  37. <extension base="string">
  38. <attribute name="ethnicityId" type="int"/>
  39. </extension>
  40. </simpleContent>
  41. </complexType>
  42. <complexType name="ingredient">
  43. <sequence>
  44. <element name="name" type="string"/>
  45. <element name="description" type="string" minOccurs="0"/>
  46. </sequence>
  47. <attribute name="ingredientId" type="int"/>
  48. </complexType>
  49. <complexType name="meal">
  50. <sequence>
  51. <element name="name" type="string"/>
  52. <element name="recipe" type="eat:meal-recipe" maxOccurs="unbounded"/>
  53. <element name="owner" type="eat:user" minOccurs="0"/>
  54. </sequence>
  55. <attribute name="mealId" type="long"/>
  56. </complexType>
  57. <complexType name="meal-recipe">
  58. <sequence>
  59. <element name="recipe" type="eat:recipe"/>
  60. <element name="course" type="eat:course"/>
  61. </sequence>
  62. <attribute name="quantity" type="double" use="optional" default="1.0"/>
  63. </complexType>
  64. <complexType name="prep-time">
  65. <simpleContent>
  66. <extension base="string">
  67. <attribute name="prepTimeId" type="int"/>
  68. </extension>
  69. </simpleContent>
  70. </complexType>
  71. <complexType name="recipe">
  72. <sequence>
  73. <element name="name" type="string"/>
  74. <element name="excerpt" type="string" minOccurs="0"/>
  75. <element name="source" type="string" minOccurs="0"/>
  76. <element name="directions" type="string" minOccurs="0"/>
  77. <element name="image" type="string" minOccurs="0">
  78. <annotation>
  79. <documentation>
  80. The URL of an image file to display with the recipe.
  81. </documentation>
  82. </annotation>
  83. </element>
  84. <element name="base" type="eat:base" minOccurs="0"/>
  85. <element name="course" type="eat:course" minOccurs="0"/>
  86. <element name="ethnicity" type="eat:ethnicity" minOccurs="0"/>
  87. <element name="difficulty" type="eat:difficulty" minOccurs="0"/>
  88. <element name="owner" type="eat:user" minOccurs="0"/>
  89. <element name="prep-time" type="eat:prep-time" minOccurs="0"/>
  90. <element name="system" type="eat:system"/>
  91. <element name="ingredient" type="eat:recipe-ingredient" minOccurs="0" maxOccurs="unbounded"/>
  92. <element name="related-recipe" type="eat:related-recipe" minOccurs="0" maxOccurs="unbounded"/>
  93. <element name="step" type="eat:recipe-step" minOccurs="0" maxOccurs="unbounded"/>
  94. <element name="comment" type="eat:recipe-comment" minOccurs="0" maxOccurs="unbounded"/>
  95. <element name="rating" type="eat:recipe-rating" minOccurs="0" maxOccurs="unbounded"/>
  96. </sequence>
  97. <attribute name="recipeId" type="long"/>
  98. <attribute name="servingSize" type="int"/>
  99. <attribute name="createdDate" type="dateTime"/>
  100. <attribute name="modifiedDate" type="dateTime" use="optional"/>
  101. </complexType>
  102. <complexType name="recipe-comment">
  103. <simpleContent>
  104. <extension base="string">
  105. <attribute name="commentId" type="long"/>
  106. <attribute name="createdDate" type="dateTime"/>
  107. <attribute name="userId" type="int"/>
  108. </extension>
  109. </simpleContent>
  110. </complexType>
  111. <complexType name="recipe-ingredient">
  112. <sequence>
  113. <element name="unit" type="eat:unit" minOccurs="0"/>
  114. <!-- Removing choice for backwards compatibility with HJAXB1 -->
  115. <!--choice minOccurs="1" maxOccurs="1"-->
  116. <element name="ingredient" type="eat:ingredient" minOccurs="0"/>
  117. <element name="recipe" type="eat:recipe" minOccurs="0"/>
  118. <!--/choice-->
  119. </sequence>
  120. <attribute name="quantity" type="double"/>
  121. <attribute name="qualifier" type="string" use="optional"/>
  122. <attribute name="optional" type="boolean"/>
  123. </complexType>
  124. <complexType name="recipe-rating">
  125. <attribute name="ratingId" type="long"/>
  126. <attribute name="rating" type="short"/>
  127. <attribute name="createdDate" type="dateTime"/>
  128. <attribute name="userId" type="int"/>
  129. </complexType>
  130. <complexType name="recipe-step">
  131. <simpleContent>
  132. <extension base="string"/>
  133. </simpleContent>
  134. </complexType>
  135. <complexType name="related-recipe">
  136. <sequence>
  137. <element name="kind" type="eat:relation-kind"/>
  138. <element name="recipe" type="eat:recipe"/>
  139. </sequence>
  140. </complexType>
  141. <complexType name="relation-kind">
  142. <simpleContent>
  143. <extension base="string">
  144. <attribute name="relationKindId" type="int"/>
  145. </extension>
  146. </simpleContent>
  147. </complexType>
  148. <complexType name="system">
  149. <simpleContent>
  150. <extension base="string">
  151. <attribute name="systemId" type="int"/>
  152. </extension>
  153. </simpleContent>
  154. </complexType>
  155. <complexType name="unit">
  156. <simpleContent>
  157. <extension base="string">
  158. <attribute name="unitId" type="int"/>
  159. <attribute name="abbreviation" type="string"/>
  160. <attribute name="systemId" type="int"/>
  161. <attribute name="toMetric" type="double" use="optional"/>
  162. <attribute name="toImperial" type="double" use="optional"/>
  163. <attribute name="toUS" type="double" use="optional"/>
  164. <attribute name="mass" type="boolean" use="optional" default="false"/>
  165. </extension>
  166. </simpleContent>
  167. </complexType>
  168. <complexType name="user">
  169. <sequence>
  170. <element name="name" type="string"/>
  171. <element name="email" type="string"/>
  172. <element name="password" type="string"/>
  173. </sequence>
  174. <attribute name="accessLevel" type="int"/>
  175. <attribute name="country" type="string"/>
  176. <attribute name="createdDate" type="dateTime"/>
  177. <attribute name="userId" type="int"/>
  178. <attribute name="language" type="string"/>
  179. <attribute name="lastLoginDate" type="dateTime"/>
  180. <attribute name="login" type="string"/>
  181. </complexType>
  182. </schema>