PageRenderTime 26ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/docx4j-openxml-objects/src/main/java/org/docx4j/mce/AlternateContent.java

http://github.com/plutext/docx4j
Java | 609 lines | 178 code | 52 blank | 379 comment | 6 complexity | e6856dc2888729554cb513ba7be7d223 MD5 | raw file
Possible License(s): Apache-2.0
  1. package org.docx4j.mce;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import javax.xml.bind.Unmarshaller;
  5. import javax.xml.bind.annotation.XmlAccessType;
  6. import javax.xml.bind.annotation.XmlAccessorType;
  7. import javax.xml.bind.annotation.XmlAnyElement;
  8. import javax.xml.bind.annotation.XmlAttribute;
  9. import javax.xml.bind.annotation.XmlElement;
  10. import javax.xml.bind.annotation.XmlRootElement;
  11. import javax.xml.bind.annotation.XmlTransient;
  12. import javax.xml.bind.annotation.XmlType;
  13. import org.jvnet.jaxb2_commons.ppp.Child;
  14. /**
  15. * <p>Java class for anonymous complex type.
  16. *
  17. * <p>The following schema fragment specifies the expected content contained within this class.
  18. *
  19. * <pre>
  20. * &lt;complexType>
  21. * &lt;complexContent>
  22. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  23. * &lt;sequence>
  24. * &lt;element name="Choice" maxOccurs="unbounded" minOccurs="0">
  25. * &lt;complexType>
  26. * &lt;complexContent>
  27. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  28. * &lt;sequence>
  29. * &lt;any maxOccurs="unbounded" minOccurs="0"/>
  30. * &lt;/sequence>
  31. * &lt;attribute name="Requires" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
  32. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}Ignorable"/>
  33. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}MustUnderstand"/>
  34. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}ProcessContent"/>
  35. * &lt;/restriction>
  36. * &lt;/complexContent>
  37. * &lt;/complexType>
  38. * &lt;/element>
  39. * &lt;element name="Fallback" minOccurs="0">
  40. * &lt;complexType>
  41. * &lt;complexContent>
  42. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  43. * &lt;sequence>
  44. * &lt;any maxOccurs="unbounded" minOccurs="0"/>
  45. * &lt;/sequence>
  46. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}Ignorable"/>
  47. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}MustUnderstand"/>
  48. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}ProcessContent"/>
  49. * &lt;/restriction>
  50. * &lt;/complexContent>
  51. * &lt;/complexType>
  52. * &lt;/element>
  53. * &lt;/sequence>
  54. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}Ignorable"/>
  55. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}MustUnderstand"/>
  56. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}ProcessContent"/>
  57. * &lt;/restriction>
  58. * &lt;/complexContent>
  59. * &lt;/complexType>
  60. * </pre>
  61. *
  62. *
  63. */
  64. @XmlAccessorType(XmlAccessType.FIELD)
  65. @XmlType(name = "", propOrder = {
  66. "choice",
  67. "fallback"
  68. })
  69. @XmlRootElement(name = "AlternateContent")
  70. public class AlternateContent implements Child {
  71. @XmlElement(name = "Choice")
  72. protected List<AlternateContent.Choice> choice = new ArrayListMce<AlternateContent.Choice>(this);
  73. @XmlElement(name = "Fallback")
  74. protected AlternateContent.Fallback fallback;
  75. @XmlAttribute(name = "Ignorable", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  76. protected String ignorable;
  77. @XmlAttribute(name = "MustUnderstand", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  78. protected String mustUnderstand;
  79. @XmlAttribute(name = "ProcessContent", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  80. protected String processContent;
  81. /**
  82. * Gets the value of the choice property.
  83. *
  84. * <p>
  85. * This accessor method returns a reference to the live list,
  86. * not a snapshot. Therefore any modification you make to the
  87. * returned list will be present inside the JAXB object.
  88. * This is why there is not a <CODE>set</CODE> method for the choice property.
  89. *
  90. * <p>
  91. * For example, to add a new item, do as follows:
  92. * <pre>
  93. * getChoice().add(newItem);
  94. * </pre>
  95. *
  96. *
  97. * <p>
  98. * Objects of the following type(s) are allowed in the list
  99. * {@link AlternateContent.Choice }
  100. *
  101. *
  102. */
  103. public List<AlternateContent.Choice> getChoice() {
  104. if (choice == null) {
  105. choice = new ArrayListMce<AlternateContent.Choice>(this);
  106. }
  107. return this.choice;
  108. }
  109. /**
  110. * Gets the value of the fallback property.
  111. *
  112. * @return
  113. * possible object is
  114. * {@link AlternateContent.Fallback }
  115. *
  116. */
  117. public AlternateContent.Fallback getFallback() {
  118. return fallback;
  119. }
  120. /**
  121. * Sets the value of the fallback property.
  122. *
  123. * @param value
  124. * allowed object is
  125. * {@link AlternateContent.Fallback }
  126. *
  127. */
  128. public void setFallback(AlternateContent.Fallback value) {
  129. this.fallback = value;
  130. }
  131. /**
  132. * Gets the value of the ignorable property.
  133. *
  134. * @return
  135. * possible object is
  136. * {@link String }
  137. *
  138. */
  139. public String getIgnorable() {
  140. return ignorable;
  141. }
  142. /**
  143. * Sets the value of the ignorable property.
  144. *
  145. * @param value
  146. * allowed object is
  147. * {@link String }
  148. *
  149. */
  150. public void setIgnorable(String value) {
  151. this.ignorable = value;
  152. }
  153. /**
  154. * Gets the value of the mustUnderstand property.
  155. *
  156. * @return
  157. * possible object is
  158. * {@link String }
  159. *
  160. */
  161. public String getMustUnderstand() {
  162. return mustUnderstand;
  163. }
  164. /**
  165. * Sets the value of the mustUnderstand property.
  166. *
  167. * @param value
  168. * allowed object is
  169. * {@link String }
  170. *
  171. */
  172. public void setMustUnderstand(String value) {
  173. this.mustUnderstand = value;
  174. }
  175. /**
  176. * Gets the value of the processContent property.
  177. *
  178. * @return
  179. * possible object is
  180. * {@link String }
  181. *
  182. */
  183. public String getProcessContent() {
  184. return processContent;
  185. }
  186. /**
  187. * Sets the value of the processContent property.
  188. *
  189. * @param value
  190. * allowed object is
  191. * {@link String }
  192. *
  193. */
  194. public void setProcessContent(String value) {
  195. this.processContent = value;
  196. }
  197. @XmlTransient
  198. private Object parent;
  199. /**
  200. * Gets the parent object in the object tree representing the unmarshalled xml document.
  201. *
  202. * @return
  203. * The parent object.
  204. */
  205. public Object getParent() {
  206. return this.parent;
  207. }
  208. public void setParent(Object parent) {
  209. this.parent = parent;
  210. }
  211. /**
  212. * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
  213. *
  214. * @param parent
  215. * The parent object in the object tree.
  216. * @param unmarshaller
  217. * The unmarshaller that generated the instance.
  218. */
  219. public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
  220. setParent(parent);
  221. }
  222. /**
  223. * <p>Java class for anonymous complex type.
  224. *
  225. * <p>The following schema fragment specifies the expected content contained within this class.
  226. *
  227. * <pre>
  228. * &lt;complexType>
  229. * &lt;complexContent>
  230. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  231. * &lt;sequence>
  232. * &lt;any maxOccurs="unbounded" minOccurs="0"/>
  233. * &lt;/sequence>
  234. * &lt;attribute name="Requires" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
  235. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}Ignorable"/>
  236. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}MustUnderstand"/>
  237. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}ProcessContent"/>
  238. * &lt;/restriction>
  239. * &lt;/complexContent>
  240. * &lt;/complexType>
  241. * </pre>
  242. *
  243. *
  244. */
  245. @XmlAccessorType(XmlAccessType.FIELD)
  246. @XmlType(name = "", propOrder = {
  247. "any"
  248. })
  249. public static class Choice implements Child {
  250. @XmlAnyElement(lax = true)
  251. protected List<Object> any = new ArrayListMce<Object>(this);
  252. @XmlAttribute(name = "Requires", required = true)
  253. protected String requires;
  254. @XmlAttribute(name = "Ignorable", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  255. protected String ignorable;
  256. @XmlAttribute(name = "MustUnderstand", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  257. protected String mustUnderstand;
  258. @XmlAttribute(name = "ProcessContent", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  259. protected String processContent;
  260. /**
  261. * Gets the value of the any property.
  262. *
  263. * <p>
  264. * This accessor method returns a reference to the live list,
  265. * not a snapshot. Therefore any modification you make to the
  266. * returned list will be present inside the JAXB object.
  267. * This is why there is not a <CODE>set</CODE> method for the any property.
  268. *
  269. * <p>
  270. * For example, to add a new item, do as follows:
  271. * <pre>
  272. * getAny().add(newItem);
  273. * </pre>
  274. *
  275. *
  276. * <p>
  277. * Objects of the following type(s) are allowed in the list
  278. * {@link Object }
  279. *
  280. *
  281. */
  282. public List<Object> getAny() {
  283. if (any == null) {
  284. any = new ArrayListMce<Object>(this);
  285. }
  286. return this.any;
  287. }
  288. /**
  289. * Gets the value of the requires property.
  290. *
  291. * @return
  292. * possible object is
  293. * {@link String }
  294. *
  295. */
  296. public String getRequires() {
  297. return requires;
  298. }
  299. /**
  300. * Sets the value of the requires property.
  301. *
  302. * @param value
  303. * allowed object is
  304. * {@link String }
  305. *
  306. */
  307. public void setRequires(String value) {
  308. this.requires = value;
  309. }
  310. /**
  311. * Gets the value of the ignorable property.
  312. *
  313. * @return
  314. * possible object is
  315. * {@link String }
  316. *
  317. */
  318. public String getIgnorable() {
  319. return ignorable;
  320. }
  321. /**
  322. * Sets the value of the ignorable property.
  323. *
  324. * @param value
  325. * allowed object is
  326. * {@link String }
  327. *
  328. */
  329. public void setIgnorable(String value) {
  330. this.ignorable = value;
  331. }
  332. /**
  333. * Gets the value of the mustUnderstand property.
  334. *
  335. * @return
  336. * possible object is
  337. * {@link String }
  338. *
  339. */
  340. public String getMustUnderstand() {
  341. return mustUnderstand;
  342. }
  343. /**
  344. * Sets the value of the mustUnderstand property.
  345. *
  346. * @param value
  347. * allowed object is
  348. * {@link String }
  349. *
  350. */
  351. public void setMustUnderstand(String value) {
  352. this.mustUnderstand = value;
  353. }
  354. /**
  355. * Gets the value of the processContent property.
  356. *
  357. * @return
  358. * possible object is
  359. * {@link String }
  360. *
  361. */
  362. public String getProcessContent() {
  363. return processContent;
  364. }
  365. /**
  366. * Sets the value of the processContent property.
  367. *
  368. * @param value
  369. * allowed object is
  370. * {@link String }
  371. *
  372. */
  373. public void setProcessContent(String value) {
  374. this.processContent = value;
  375. }
  376. @XmlTransient
  377. private Object parent;
  378. /**
  379. * Gets the parent object in the object tree representing the unmarshalled xml document.
  380. *
  381. * @return
  382. * The parent object.
  383. */
  384. public Object getParent() {
  385. return this.parent;
  386. }
  387. public void setParent(Object parent) {
  388. this.parent = parent;
  389. }
  390. /**
  391. * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
  392. *
  393. * @param parent
  394. * The parent object in the object tree.
  395. * @param unmarshaller
  396. * The unmarshaller that generated the instance.
  397. */
  398. public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
  399. setParent(parent);
  400. }
  401. }
  402. /**
  403. * <p>Java class for anonymous complex type.
  404. *
  405. * <p>The following schema fragment specifies the expected content contained within this class.
  406. *
  407. * <pre>
  408. * &lt;complexType>
  409. * &lt;complexContent>
  410. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  411. * &lt;sequence>
  412. * &lt;any maxOccurs="unbounded" minOccurs="0"/>
  413. * &lt;/sequence>
  414. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}Ignorable"/>
  415. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}MustUnderstand"/>
  416. * &lt;attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}ProcessContent"/>
  417. * &lt;/restriction>
  418. * &lt;/complexContent>
  419. * &lt;/complexType>
  420. * </pre>
  421. *
  422. *
  423. */
  424. @XmlAccessorType(XmlAccessType.FIELD)
  425. @XmlType(name = "", propOrder = {
  426. "any"
  427. })
  428. public static class Fallback implements Child {
  429. @XmlAnyElement(lax = true)
  430. protected List<Object> any = new ArrayListMce<Object>(this);
  431. @XmlAttribute(name = "Ignorable", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  432. protected String ignorable;
  433. @XmlAttribute(name = "MustUnderstand", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  434. protected String mustUnderstand;
  435. @XmlAttribute(name = "ProcessContent", namespace = "http://schemas.openxmlformats.org/markup-compatibility/2006")
  436. protected String processContent;
  437. /**
  438. * Gets the value of the any property.
  439. *
  440. * <p>
  441. * This accessor method returns a reference to the live list,
  442. * not a snapshot. Therefore any modification you make to the
  443. * returned list will be present inside the JAXB object.
  444. * This is why there is not a <CODE>set</CODE> method for the any property.
  445. *
  446. * <p>
  447. * For example, to add a new item, do as follows:
  448. * <pre>
  449. * getAny().add(newItem);
  450. * </pre>
  451. *
  452. *
  453. * <p>
  454. * Objects of the following type(s) are allowed in the list
  455. * {@link Object }
  456. *
  457. *
  458. */
  459. public List<Object> getAny() {
  460. if (any == null) {
  461. any = new ArrayListMce<Object>(this);
  462. }
  463. return this.any;
  464. }
  465. /**
  466. * Gets the value of the ignorable property.
  467. *
  468. * @return
  469. * possible object is
  470. * {@link String }
  471. *
  472. */
  473. public String getIgnorable() {
  474. return ignorable;
  475. }
  476. /**
  477. * Sets the value of the ignorable property.
  478. *
  479. * @param value
  480. * allowed object is
  481. * {@link String }
  482. *
  483. */
  484. public void setIgnorable(String value) {
  485. this.ignorable = value;
  486. }
  487. /**
  488. * Gets the value of the mustUnderstand property.
  489. *
  490. * @return
  491. * possible object is
  492. * {@link String }
  493. *
  494. */
  495. public String getMustUnderstand() {
  496. return mustUnderstand;
  497. }
  498. /**
  499. * Sets the value of the mustUnderstand property.
  500. *
  501. * @param value
  502. * allowed object is
  503. * {@link String }
  504. *
  505. */
  506. public void setMustUnderstand(String value) {
  507. this.mustUnderstand = value;
  508. }
  509. /**
  510. * Gets the value of the processContent property.
  511. *
  512. * @return
  513. * possible object is
  514. * {@link String }
  515. *
  516. */
  517. public String getProcessContent() {
  518. return processContent;
  519. }
  520. /**
  521. * Sets the value of the processContent property.
  522. *
  523. * @param value
  524. * allowed object is
  525. * {@link String }
  526. *
  527. */
  528. public void setProcessContent(String value) {
  529. this.processContent = value;
  530. }
  531. @XmlTransient
  532. private Object parent;
  533. /**
  534. * Gets the parent object in the object tree representing the unmarshalled xml document.
  535. *
  536. * @return
  537. * The parent object.
  538. */
  539. public Object getParent() {
  540. return this.parent;
  541. }
  542. public void setParent(Object parent) {
  543. this.parent = parent;
  544. }
  545. /**
  546. * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
  547. *
  548. * @param parent
  549. * The parent object in the object tree.
  550. * @param unmarshaller
  551. * The unmarshaller that generated the instance.
  552. */
  553. public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
  554. setParent(parent);
  555. }
  556. }
  557. }