|
1 | 1 |
|
2 | 2 | package ru.javaops.masterjava.xml.schema; |
3 | 3 |
|
| 4 | +import javax.xml.bind.annotation.*; |
4 | 5 | import java.util.ArrayList; |
5 | 6 | import java.util.List; |
6 | | -import javax.xml.bind.annotation.XmlAccessType; |
7 | | -import javax.xml.bind.annotation.XmlAccessorType; |
8 | | -import javax.xml.bind.annotation.XmlElement; |
9 | | -import javax.xml.bind.annotation.XmlRootElement; |
10 | | -import javax.xml.bind.annotation.XmlType; |
11 | 7 |
|
12 | 8 |
|
13 | 9 | /** |
|
19 | 15 | * <complexType> |
20 | 16 | * <complexContent> |
21 | 17 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
22 | | - * <all> |
| 18 | + * <sequence> |
| 19 | + * <element name="Projects"> |
| 20 | + * <complexType> |
| 21 | + * <complexContent> |
| 22 | + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 23 | + * <sequence maxOccurs="unbounded"> |
| 24 | + * <element ref="{http://javaops.ru}Project"/> |
| 25 | + * </sequence> |
| 26 | + * </restriction> |
| 27 | + * </complexContent> |
| 28 | + * </complexType> |
| 29 | + * </element> |
23 | 30 | * <element name="Cities"> |
24 | 31 | * <complexType> |
25 | 32 | * <complexContent> |
|
42 | 49 | * </complexContent> |
43 | 50 | * </complexType> |
44 | 51 | * </element> |
45 | | - * </all> |
| 52 | + * </sequence> |
46 | 53 | * </restriction> |
47 | 54 | * </complexContent> |
48 | 55 | * </complexType> |
|
52 | 59 | */ |
53 | 60 | @XmlAccessorType(XmlAccessType.FIELD) |
54 | 61 | @XmlType(name = "", propOrder = { |
55 | | - |
| 62 | + "projects", |
| 63 | + "cities", |
| 64 | + "users" |
56 | 65 | }) |
57 | 66 | @XmlRootElement(name = "Payload", namespace = "http://javaops.ru") |
58 | 67 | public class Payload { |
59 | 68 |
|
| 69 | + @XmlElement(name = "Projects", namespace = "http://javaops.ru", required = true) |
| 70 | + protected Payload.Projects projects; |
60 | 71 | @XmlElement(name = "Cities", namespace = "http://javaops.ru", required = true) |
61 | 72 | protected Payload.Cities cities; |
62 | 73 | @XmlElement(name = "Users", namespace = "http://javaops.ru", required = true) |
63 | 74 | protected Payload.Users users; |
64 | 75 |
|
| 76 | + /** |
| 77 | + * Gets the value of the projects property. |
| 78 | + * |
| 79 | + * @return |
| 80 | + * possible object is |
| 81 | + * {@link Payload.Projects } |
| 82 | + * |
| 83 | + */ |
| 84 | + public Payload.Projects getProjects() { |
| 85 | + return projects; |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Sets the value of the projects property. |
| 90 | + * |
| 91 | + * @param value |
| 92 | + * allowed object is |
| 93 | + * {@link Payload.Projects } |
| 94 | + * |
| 95 | + */ |
| 96 | + public void setProjects(Payload.Projects value) { |
| 97 | + this.projects = value; |
| 98 | + } |
| 99 | + |
65 | 100 | /** |
66 | 101 | * Gets the value of the cities property. |
67 | 102 | * |
@@ -171,6 +206,66 @@ public List<CityType> getCity() { |
171 | 206 | } |
172 | 207 |
|
173 | 208 |
|
| 209 | + /** |
| 210 | + * <p>Java class for anonymous complex type. |
| 211 | + * |
| 212 | + * <p>The following schema fragment specifies the expected content contained within this class. |
| 213 | + * |
| 214 | + * <pre> |
| 215 | + * <complexType> |
| 216 | + * <complexContent> |
| 217 | + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 218 | + * <sequence maxOccurs="unbounded"> |
| 219 | + * <element ref="{http://javaops.ru}Project"/> |
| 220 | + * </sequence> |
| 221 | + * </restriction> |
| 222 | + * </complexContent> |
| 223 | + * </complexType> |
| 224 | + * </pre> |
| 225 | + * |
| 226 | + * |
| 227 | + */ |
| 228 | + @XmlAccessorType(XmlAccessType.FIELD) |
| 229 | + @XmlType(name = "", propOrder = { |
| 230 | + "project" |
| 231 | + }) |
| 232 | + public static class Projects { |
| 233 | + |
| 234 | + @XmlElement(name = "Project", namespace = "http://javaops.ru", required = true) |
| 235 | + protected List<Project> project; |
| 236 | + |
| 237 | + /** |
| 238 | + * Gets the value of the project property. |
| 239 | + * |
| 240 | + * <p> |
| 241 | + * This accessor method returns a reference to the live list, |
| 242 | + * not a snapshot. Therefore any modification you make to the |
| 243 | + * returned list will be present inside the JAXB object. |
| 244 | + * This is why there is not a <CODE>set</CODE> method for the project property. |
| 245 | + * |
| 246 | + * <p> |
| 247 | + * For example, to add a new item, do as follows: |
| 248 | + * <pre> |
| 249 | + * getProject().add(newItem); |
| 250 | + * </pre> |
| 251 | + * |
| 252 | + * |
| 253 | + * <p> |
| 254 | + * Objects of the following type(s) are allowed in the list |
| 255 | + * {@link Project } |
| 256 | + * |
| 257 | + * |
| 258 | + */ |
| 259 | + public List<Project> getProject() { |
| 260 | + if (project == null) { |
| 261 | + project = new ArrayList<Project>(); |
| 262 | + } |
| 263 | + return this.project; |
| 264 | + } |
| 265 | + |
| 266 | + } |
| 267 | + |
| 268 | + |
174 | 269 | /** |
175 | 270 | * <p>Java class for anonymous complex type. |
176 | 271 | * |
|
0 commit comments