PageRenderTime 50ms CodeModel.GetById 10ms RepoModel.GetById 1ms app.codeStats 0ms

/docx4j-openxml-objects-sml/src/main/java/org/xlsx4j/sml/CTSharedItems.java

http://github.com/plutext/docx4j
Java | 557 lines | 198 code | 37 blank | 322 comment | 29 complexity | f8ac147534e45703a94822c900f5bddf MD5 | raw file
Possible License(s): Apache-2.0
  1. /*
  2. * Copyright 2010-2013, Plutext Pty Ltd.
  3. *
  4. * This file is part of xlsx4j, a component of docx4j.
  5. docx4j is licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. */
  15. package org.xlsx4j.sml;
  16. import java.util.ArrayList;
  17. import java.util.List;
  18. import javax.xml.bind.Unmarshaller;
  19. import javax.xml.bind.annotation.XmlAccessType;
  20. import javax.xml.bind.annotation.XmlAccessorType;
  21. import javax.xml.bind.annotation.XmlAttribute;
  22. import javax.xml.bind.annotation.XmlElement;
  23. import javax.xml.bind.annotation.XmlElements;
  24. import javax.xml.bind.annotation.XmlSchemaType;
  25. import javax.xml.bind.annotation.XmlTransient;
  26. import javax.xml.bind.annotation.XmlType;
  27. import javax.xml.datatype.XMLGregorianCalendar;
  28. import org.jvnet.jaxb2_commons.ppp.Child;
  29. /**
  30. * <p>Java class for CT_SharedItems complex type.
  31. *
  32. * <p>The following schema fragment specifies the expected content contained within this class.
  33. *
  34. * <pre>
  35. * &lt;complexType name="CT_SharedItems">
  36. * &lt;complexContent>
  37. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  38. * &lt;choice maxOccurs="unbounded" minOccurs="0">
  39. * &lt;element name="m" type="{http://schemas.openxmlformats.org/spreadsheetml/2006/main}CT_Missing"/>
  40. * &lt;element name="n" type="{http://schemas.openxmlformats.org/spreadsheetml/2006/main}CT_Number"/>
  41. * &lt;element name="b" type="{http://schemas.openxmlformats.org/spreadsheetml/2006/main}CT_Boolean"/>
  42. * &lt;element name="e" type="{http://schemas.openxmlformats.org/spreadsheetml/2006/main}CT_Error"/>
  43. * &lt;element name="s" type="{http://schemas.openxmlformats.org/spreadsheetml/2006/main}CT_String"/>
  44. * &lt;element name="d" type="{http://schemas.openxmlformats.org/spreadsheetml/2006/main}CT_DateTime"/>
  45. * &lt;/choice>
  46. * &lt;attribute name="containsSemiMixedTypes" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
  47. * &lt;attribute name="containsNonDate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
  48. * &lt;attribute name="containsDate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
  49. * &lt;attribute name="containsString" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
  50. * &lt;attribute name="containsBlank" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
  51. * &lt;attribute name="containsMixedTypes" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
  52. * &lt;attribute name="containsNumber" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
  53. * &lt;attribute name="containsInteger" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
  54. * &lt;attribute name="minValue" type="{http://www.w3.org/2001/XMLSchema}double" />
  55. * &lt;attribute name="maxValue" type="{http://www.w3.org/2001/XMLSchema}double" />
  56. * &lt;attribute name="minDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
  57. * &lt;attribute name="maxDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
  58. * &lt;attribute name="count" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
  59. * &lt;attribute name="longText" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
  60. * &lt;/restriction>
  61. * &lt;/complexContent>
  62. * &lt;/complexType>
  63. * </pre>
  64. *
  65. *
  66. */
  67. @XmlAccessorType(XmlAccessType.FIELD)
  68. @XmlType(name = "CT_SharedItems", propOrder = {
  69. "mOrNOrB"
  70. })
  71. public class CTSharedItems implements Child
  72. {
  73. @XmlElements({
  74. @XmlElement(name = "m", type = CTMissing.class),
  75. @XmlElement(name = "n", type = CTNumber.class),
  76. @XmlElement(name = "b", type = CTBoolean.class),
  77. @XmlElement(name = "e", type = CTError.class),
  78. @XmlElement(name = "s", type = CTString.class),
  79. @XmlElement(name = "d", type = CTDateTime.class)
  80. })
  81. protected List<Object> mOrNOrB;
  82. @XmlAttribute(name = "containsSemiMixedTypes")
  83. protected Boolean containsSemiMixedTypes;
  84. @XmlAttribute(name = "containsNonDate")
  85. protected Boolean containsNonDate;
  86. @XmlAttribute(name = "containsDate")
  87. protected Boolean containsDate;
  88. @XmlAttribute(name = "containsString")
  89. protected Boolean containsString;
  90. @XmlAttribute(name = "containsBlank")
  91. protected Boolean containsBlank;
  92. @XmlAttribute(name = "containsMixedTypes")
  93. protected Boolean containsMixedTypes;
  94. @XmlAttribute(name = "containsNumber")
  95. protected Boolean containsNumber;
  96. @XmlAttribute(name = "containsInteger")
  97. protected Boolean containsInteger;
  98. @XmlAttribute(name = "minValue")
  99. protected Double minValue;
  100. @XmlAttribute(name = "maxValue")
  101. protected Double maxValue;
  102. @XmlAttribute(name = "minDate")
  103. @XmlSchemaType(name = "dateTime")
  104. protected XMLGregorianCalendar minDate;
  105. @XmlAttribute(name = "maxDate")
  106. @XmlSchemaType(name = "dateTime")
  107. protected XMLGregorianCalendar maxDate;
  108. @XmlAttribute(name = "count")
  109. @XmlSchemaType(name = "unsignedInt")
  110. protected Long count;
  111. @XmlAttribute(name = "longText")
  112. protected Boolean longText;
  113. @XmlTransient
  114. private Object parent;
  115. /**
  116. * Gets the value of the mOrNOrB property.
  117. *
  118. * <p>
  119. * This accessor method returns a reference to the live list,
  120. * not a snapshot. Therefore any modification you make to the
  121. * returned list will be present inside the JAXB object.
  122. * This is why there is not a <CODE>set</CODE> method for the mOrNOrB property.
  123. *
  124. * <p>
  125. * For example, to add a new item, do as follows:
  126. * <pre>
  127. * getMOrNOrB().add(newItem);
  128. * </pre>
  129. *
  130. *
  131. * <p>
  132. * Objects of the following type(s) are allowed in the list
  133. * {@link CTMissing }
  134. * {@link CTNumber }
  135. * {@link CTBoolean }
  136. * {@link CTError }
  137. * {@link CTString }
  138. * {@link CTDateTime }
  139. *
  140. *
  141. */
  142. public List<Object> getMOrNOrB() {
  143. if (mOrNOrB == null) {
  144. mOrNOrB = new ArrayList<Object>();
  145. }
  146. return this.mOrNOrB;
  147. }
  148. /**
  149. * Gets the value of the containsSemiMixedTypes property.
  150. *
  151. * @return
  152. * possible object is
  153. * {@link Boolean }
  154. *
  155. */
  156. public boolean isContainsSemiMixedTypes() {
  157. if (containsSemiMixedTypes == null) {
  158. return true;
  159. } else {
  160. return containsSemiMixedTypes;
  161. }
  162. }
  163. /**
  164. * Sets the value of the containsSemiMixedTypes property.
  165. *
  166. * @param value
  167. * allowed object is
  168. * {@link Boolean }
  169. *
  170. */
  171. public void setContainsSemiMixedTypes(Boolean value) {
  172. this.containsSemiMixedTypes = value;
  173. }
  174. /**
  175. * Gets the value of the containsNonDate property.
  176. *
  177. * @return
  178. * possible object is
  179. * {@link Boolean }
  180. *
  181. */
  182. public boolean isContainsNonDate() {
  183. if (containsNonDate == null) {
  184. return true;
  185. } else {
  186. return containsNonDate;
  187. }
  188. }
  189. /**
  190. * Sets the value of the containsNonDate property.
  191. *
  192. * @param value
  193. * allowed object is
  194. * {@link Boolean }
  195. *
  196. */
  197. public void setContainsNonDate(Boolean value) {
  198. this.containsNonDate = value;
  199. }
  200. /**
  201. * Gets the value of the containsDate property.
  202. *
  203. * @return
  204. * possible object is
  205. * {@link Boolean }
  206. *
  207. */
  208. public boolean isContainsDate() {
  209. if (containsDate == null) {
  210. return false;
  211. } else {
  212. return containsDate;
  213. }
  214. }
  215. /**
  216. * Sets the value of the containsDate property.
  217. *
  218. * @param value
  219. * allowed object is
  220. * {@link Boolean }
  221. *
  222. */
  223. public void setContainsDate(Boolean value) {
  224. this.containsDate = value;
  225. }
  226. /**
  227. * Gets the value of the containsString property.
  228. *
  229. * @return
  230. * possible object is
  231. * {@link Boolean }
  232. *
  233. */
  234. public boolean isContainsString() {
  235. if (containsString == null) {
  236. return true;
  237. } else {
  238. return containsString;
  239. }
  240. }
  241. /**
  242. * Sets the value of the containsString property.
  243. *
  244. * @param value
  245. * allowed object is
  246. * {@link Boolean }
  247. *
  248. */
  249. public void setContainsString(Boolean value) {
  250. this.containsString = value;
  251. }
  252. /**
  253. * Gets the value of the containsBlank property.
  254. *
  255. * @return
  256. * possible object is
  257. * {@link Boolean }
  258. *
  259. */
  260. public boolean isContainsBlank() {
  261. if (containsBlank == null) {
  262. return false;
  263. } else {
  264. return containsBlank;
  265. }
  266. }
  267. /**
  268. * Sets the value of the containsBlank property.
  269. *
  270. * @param value
  271. * allowed object is
  272. * {@link Boolean }
  273. *
  274. */
  275. public void setContainsBlank(Boolean value) {
  276. this.containsBlank = value;
  277. }
  278. /**
  279. * Gets the value of the containsMixedTypes property.
  280. *
  281. * @return
  282. * possible object is
  283. * {@link Boolean }
  284. *
  285. */
  286. public boolean isContainsMixedTypes() {
  287. if (containsMixedTypes == null) {
  288. return false;
  289. } else {
  290. return containsMixedTypes;
  291. }
  292. }
  293. /**
  294. * Sets the value of the containsMixedTypes property.
  295. *
  296. * @param value
  297. * allowed object is
  298. * {@link Boolean }
  299. *
  300. */
  301. public void setContainsMixedTypes(Boolean value) {
  302. this.containsMixedTypes = value;
  303. }
  304. /**
  305. * Gets the value of the containsNumber property.
  306. *
  307. * @return
  308. * possible object is
  309. * {@link Boolean }
  310. *
  311. */
  312. public boolean isContainsNumber() {
  313. if (containsNumber == null) {
  314. return false;
  315. } else {
  316. return containsNumber;
  317. }
  318. }
  319. /**
  320. * Sets the value of the containsNumber property.
  321. *
  322. * @param value
  323. * allowed object is
  324. * {@link Boolean }
  325. *
  326. */
  327. public void setContainsNumber(Boolean value) {
  328. this.containsNumber = value;
  329. }
  330. /**
  331. * Gets the value of the containsInteger property.
  332. *
  333. * @return
  334. * possible object is
  335. * {@link Boolean }
  336. *
  337. */
  338. public boolean isContainsInteger() {
  339. if (containsInteger == null) {
  340. return false;
  341. } else {
  342. return containsInteger;
  343. }
  344. }
  345. /**
  346. * Sets the value of the containsInteger property.
  347. *
  348. * @param value
  349. * allowed object is
  350. * {@link Boolean }
  351. *
  352. */
  353. public void setContainsInteger(Boolean value) {
  354. this.containsInteger = value;
  355. }
  356. /**
  357. * Gets the value of the minValue property.
  358. *
  359. * @return
  360. * possible object is
  361. * {@link Double }
  362. *
  363. */
  364. public Double getMinValue() {
  365. return minValue;
  366. }
  367. /**
  368. * Sets the value of the minValue property.
  369. *
  370. * @param value
  371. * allowed object is
  372. * {@link Double }
  373. *
  374. */
  375. public void setMinValue(Double value) {
  376. this.minValue = value;
  377. }
  378. /**
  379. * Gets the value of the maxValue property.
  380. *
  381. * @return
  382. * possible object is
  383. * {@link Double }
  384. *
  385. */
  386. public Double getMaxValue() {
  387. return maxValue;
  388. }
  389. /**
  390. * Sets the value of the maxValue property.
  391. *
  392. * @param value
  393. * allowed object is
  394. * {@link Double }
  395. *
  396. */
  397. public void setMaxValue(Double value) {
  398. this.maxValue = value;
  399. }
  400. /**
  401. * Gets the value of the minDate property.
  402. *
  403. * @return
  404. * possible object is
  405. * {@link XMLGregorianCalendar }
  406. *
  407. */
  408. public XMLGregorianCalendar getMinDate() {
  409. return minDate;
  410. }
  411. /**
  412. * Sets the value of the minDate property.
  413. *
  414. * @param value
  415. * allowed object is
  416. * {@link XMLGregorianCalendar }
  417. *
  418. */
  419. public void setMinDate(XMLGregorianCalendar value) {
  420. this.minDate = value;
  421. }
  422. /**
  423. * Gets the value of the maxDate property.
  424. *
  425. * @return
  426. * possible object is
  427. * {@link XMLGregorianCalendar }
  428. *
  429. */
  430. public XMLGregorianCalendar getMaxDate() {
  431. return maxDate;
  432. }
  433. /**
  434. * Sets the value of the maxDate property.
  435. *
  436. * @param value
  437. * allowed object is
  438. * {@link XMLGregorianCalendar }
  439. *
  440. */
  441. public void setMaxDate(XMLGregorianCalendar value) {
  442. this.maxDate = value;
  443. }
  444. /**
  445. * Gets the value of the count property.
  446. *
  447. * @return
  448. * possible object is
  449. * {@link Long }
  450. *
  451. */
  452. public Long getCount() {
  453. return count;
  454. }
  455. /**
  456. * Sets the value of the count property.
  457. *
  458. * @param value
  459. * allowed object is
  460. * {@link Long }
  461. *
  462. */
  463. public void setCount(Long value) {
  464. this.count = value;
  465. }
  466. /**
  467. * Gets the value of the longText property.
  468. *
  469. * @return
  470. * possible object is
  471. * {@link Boolean }
  472. *
  473. */
  474. public boolean isLongText() {
  475. if (longText == null) {
  476. return false;
  477. } else {
  478. return longText;
  479. }
  480. }
  481. /**
  482. * Sets the value of the longText property.
  483. *
  484. * @param value
  485. * allowed object is
  486. * {@link Boolean }
  487. *
  488. */
  489. public void setLongText(Boolean value) {
  490. this.longText = value;
  491. }
  492. /**
  493. * Gets the parent object in the object tree representing the unmarshalled xml document.
  494. *
  495. * @return
  496. * The parent object.
  497. */
  498. public Object getParent() {
  499. return this.parent;
  500. }
  501. public void setParent(Object parent) {
  502. this.parent = parent;
  503. }
  504. /**
  505. * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
  506. *
  507. * @param parent
  508. * The parent object in the object tree.
  509. * @param unmarshaller
  510. * The unmarshaller that generated the instance.
  511. */
  512. public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
  513. setParent(parent);
  514. }
  515. }