PageRenderTime 24ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/docx4j-openxml-objects/src/main/java/org/docx4j/wml/Tr.java

http://github.com/plutext/docx4j
Java | 405 lines | 139 code | 30 blank | 236 comment | 2 complexity | 30bfcb645ca2f6a7830b9af79d07ee04 MD5 | raw file
Possible License(s): Apache-2.0
  1. /*
  2. * Copyright 2007-2013, Plutext Pty Ltd.
  3. *
  4. * This file is part 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.docx4j.wml;
  16. import java.util.List;
  17. import javax.xml.bind.JAXBElement;
  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.XmlElementRef;
  23. import javax.xml.bind.annotation.XmlElementRefs;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlTransient;
  26. import javax.xml.bind.annotation.XmlType;
  27. import org.docx4j.math.CTOMath;
  28. import org.docx4j.math.CTOMathPara;
  29. import org.jvnet.jaxb2_commons.ppp.Child;
  30. /**
  31. * <p>Java class for anonymous complex type.
  32. *
  33. * <p>The following schema fragment specifies the expected content contained within this class.
  34. *
  35. * <pre>
  36. * &lt;complexType>
  37. * &lt;complexContent>
  38. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  39. * &lt;sequence>
  40. * &lt;element name="tblPrEx" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_TblPrEx" minOccurs="0"/>
  41. * &lt;element name="trPr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_TrPr" minOccurs="0"/>
  42. * &lt;group ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}EG_ContentCellContent" maxOccurs="unbounded" minOccurs="0"/>
  43. * &lt;/sequence>
  44. * &lt;attGroup ref="{http://schemas.microsoft.com/office/word/2010/wordml}AG_Parids"/>
  45. * &lt;attribute name="rsidRPr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
  46. * &lt;attribute name="rsidR" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
  47. * &lt;attribute name="rsidDel" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
  48. * &lt;attribute name="rsidTr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
  49. * &lt;/restriction>
  50. * &lt;/complexContent>
  51. * &lt;/complexType>
  52. * </pre>
  53. *
  54. *
  55. */
  56. @XmlAccessorType(XmlAccessType.FIELD)
  57. @XmlType(name = "", propOrder = {
  58. "tblPrEx",
  59. "trPr",
  60. "content"
  61. })
  62. @XmlRootElement(name = "tr")
  63. public class Tr implements Child, ContentAccessor
  64. {
  65. protected CTTblPrEx tblPrEx;
  66. protected TrPr trPr;
  67. @XmlElementRefs({
  68. @XmlElementRef(name = "moveFromRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  69. @XmlElementRef(name = "bookmarkEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  70. @XmlElementRef(name = "permEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  71. @XmlElementRef(name = "ins", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = RunIns.class),
  72. @XmlElementRef(name = "bookmarkStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  73. @XmlElementRef(name = "customXml", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  74. @XmlElementRef(name = "customXmlMoveFromRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  75. @XmlElementRef(name = "moveTo", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  76. @XmlElementRef(name = "proofErr", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = ProofErr.class),
  77. @XmlElementRef(name = "commentRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = CommentRangeEnd.class),
  78. @XmlElementRef(name = "tc", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  79. @XmlElementRef(name = "customXmlMoveToRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  80. @XmlElementRef(name = "del", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = RunDel.class),
  81. @XmlElementRef(name = "moveFrom", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  82. @XmlElementRef(name = "oMathPara", namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", type = JAXBElement.class),
  83. @XmlElementRef(name = "customXmlInsRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  84. @XmlElementRef(name = "customXmlDelRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  85. @XmlElementRef(name = "customXmlInsRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  86. @XmlElementRef(name = "customXmlMoveFromRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  87. @XmlElementRef(name = "commentRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = CommentRangeStart.class),
  88. @XmlElementRef(name = "sdt", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  89. @XmlElementRef(name = "customXmlDelRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  90. @XmlElementRef(name = "moveToRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  91. @XmlElementRef(name = "oMath", namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", type = JAXBElement.class),
  92. @XmlElementRef(name = "moveToRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  93. @XmlElementRef(name = "moveFromRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  94. @XmlElementRef(name = "permStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
  95. @XmlElementRef(name = "customXmlMoveToRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class)
  96. })
  97. protected List<Object> content = new ArrayListWml<Object>(this);
  98. @XmlAttribute(name = "rsidRPr", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
  99. protected String rsidRPr;
  100. @XmlAttribute(name = "rsidR", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
  101. protected String rsidR;
  102. @XmlAttribute(name = "rsidDel", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
  103. protected String rsidDel;
  104. @XmlAttribute(name = "rsidTr", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
  105. protected String rsidTr;
  106. @XmlAttribute(name = "paraId", namespace = "http://schemas.microsoft.com/office/word/2010/wordml")
  107. protected String paraId;
  108. @XmlAttribute(name = "textId", namespace = "http://schemas.microsoft.com/office/word/2010/wordml")
  109. protected String textId;
  110. @XmlTransient
  111. private Object parent;
  112. /**
  113. * Gets the value of the tblPrEx property.
  114. *
  115. * @return
  116. * possible object is
  117. * {@link CTTblPrEx }
  118. *
  119. */
  120. public CTTblPrEx getTblPrEx() {
  121. return tblPrEx;
  122. }
  123. /**
  124. * Sets the value of the tblPrEx property.
  125. *
  126. * @param value
  127. * allowed object is
  128. * {@link CTTblPrEx }
  129. *
  130. */
  131. public void setTblPrEx(CTTblPrEx value) {
  132. this.tblPrEx = value;
  133. }
  134. /**
  135. * Gets the value of the trPr property.
  136. *
  137. * @return
  138. * possible object is
  139. * {@link TrPr }
  140. *
  141. */
  142. public TrPr getTrPr() {
  143. return trPr;
  144. }
  145. /**
  146. * Sets the value of the trPr property.
  147. *
  148. * @param value
  149. * allowed object is
  150. * {@link TrPr }
  151. *
  152. */
  153. public void setTrPr(TrPr value) {
  154. this.trPr = value;
  155. }
  156. /**
  157. * Gets the value of the content property.
  158. *
  159. * <p>
  160. * This accessor method returns a reference to the live list,
  161. * not a snapshot. Therefore any modification you make to the
  162. * returned list will be present inside the JAXB object.
  163. * This is why there is not a <CODE>set</CODE> method for the content property.
  164. *
  165. * <p>
  166. * For example, to add a new item, do as follows:
  167. * <pre>
  168. * getContent().add(newItem);
  169. * </pre>
  170. *
  171. *
  172. * <p>
  173. * Objects of the following type(s) are allowed in the list
  174. * {@link JAXBElement }{@code <}{@link CTMoveFromRangeEnd }{@code >}
  175. * {@link JAXBElement }{@code <}{@link CTMarkupRange }{@code >}
  176. * {@link JAXBElement }{@code <}{@link CTPerm }{@code >}
  177. * {@link RunIns }
  178. * {@link JAXBElement }{@code <}{@link CTBookmark }{@code >}
  179. * {@link JAXBElement }{@code <}{@link CTCustomXmlCell }{@code >}
  180. * {@link JAXBElement }{@code <}{@link CTTrackChange }{@code >}
  181. * {@link JAXBElement }{@code <}{@link RunTrackChange }{@code >}
  182. * {@link ProofErr }
  183. * {@link CommentRangeEnd }
  184. * {@link JAXBElement }{@code <}{@link Tc }{@code >}
  185. * {@link JAXBElement }{@code <}{@link CTTrackChange }{@code >}
  186. * {@link RunDel }
  187. * {@link JAXBElement }{@code <}{@link RunTrackChange }{@code >}
  188. * {@link JAXBElement }{@code <}{@link CTOMathPara }{@code >}
  189. * {@link JAXBElement }{@code <}{@link CTTrackChange }{@code >}
  190. * {@link JAXBElement }{@code <}{@link CTMarkup }{@code >}
  191. * {@link JAXBElement }{@code <}{@link CTMarkup }{@code >}
  192. * {@link JAXBElement }{@code <}{@link CTMarkup }{@code >}
  193. * {@link CommentRangeStart }
  194. * {@link JAXBElement }{@code <}{@link CTSdtCell }{@code >}
  195. * {@link JAXBElement }{@code <}{@link CTTrackChange }{@code >}
  196. * {@link JAXBElement }{@code <}{@link CTMoveBookmark }{@code >}
  197. * {@link JAXBElement }{@code <}{@link CTOMath }{@code >}
  198. * {@link JAXBElement }{@code <}{@link CTMoveToRangeEnd }{@code >}
  199. * {@link JAXBElement }{@code <}{@link CTMoveBookmark }{@code >}
  200. * {@link JAXBElement }{@code <}{@link CTMarkup }{@code >}
  201. * {@link JAXBElement }{@code <}{@link RangePermissionStart }{@code >}
  202. *
  203. * @since 2.7
  204. */
  205. public List<Object> getContent() {
  206. if (content == null) {
  207. content = new ArrayListWml<Object>(this);
  208. }
  209. return this.content;
  210. }
  211. @Deprecated
  212. public List<Object> getEGContentCellContent() {
  213. return getContent();
  214. }
  215. /**
  216. * Gets the value of the rsidRPr property.
  217. *
  218. * @return
  219. * possible object is
  220. * {@link String }
  221. *
  222. */
  223. public String getRsidRPr() {
  224. return rsidRPr;
  225. }
  226. /**
  227. * Sets the value of the rsidRPr property.
  228. *
  229. * @param value
  230. * allowed object is
  231. * {@link String }
  232. *
  233. */
  234. public void setRsidRPr(String value) {
  235. this.rsidRPr = value;
  236. }
  237. /**
  238. * Gets the value of the rsidR property.
  239. *
  240. * @return
  241. * possible object is
  242. * {@link String }
  243. *
  244. */
  245. public String getRsidR() {
  246. return rsidR;
  247. }
  248. /**
  249. * Sets the value of the rsidR property.
  250. *
  251. * @param value
  252. * allowed object is
  253. * {@link String }
  254. *
  255. */
  256. public void setRsidR(String value) {
  257. this.rsidR = value;
  258. }
  259. /**
  260. * Gets the value of the rsidDel property.
  261. *
  262. * @return
  263. * possible object is
  264. * {@link String }
  265. *
  266. */
  267. public String getRsidDel() {
  268. return rsidDel;
  269. }
  270. /**
  271. * Sets the value of the rsidDel property.
  272. *
  273. * @param value
  274. * allowed object is
  275. * {@link String }
  276. *
  277. */
  278. public void setRsidDel(String value) {
  279. this.rsidDel = value;
  280. }
  281. /**
  282. * Gets the value of the rsidTr property.
  283. *
  284. * @return
  285. * possible object is
  286. * {@link String }
  287. *
  288. */
  289. public String getRsidTr() {
  290. return rsidTr;
  291. }
  292. /**
  293. * Sets the value of the rsidTr property.
  294. *
  295. * @param value
  296. * allowed object is
  297. * {@link String }
  298. *
  299. */
  300. public void setRsidTr(String value) {
  301. this.rsidTr = value;
  302. }
  303. /**
  304. * Gets the value of the paraId property.
  305. *
  306. * @return
  307. * possible object is
  308. * {@link String }
  309. *
  310. */
  311. public String getParaId() {
  312. return paraId;
  313. }
  314. /**
  315. * Sets the value of the paraId property.
  316. *
  317. * @param value
  318. * allowed object is
  319. * {@link String }
  320. *
  321. */
  322. public void setParaId(String value) {
  323. this.paraId = value;
  324. }
  325. /**
  326. * Gets the value of the textId property.
  327. *
  328. * @return
  329. * possible object is
  330. * {@link String }
  331. *
  332. */
  333. public String getTextId() {
  334. return textId;
  335. }
  336. /**
  337. * Sets the value of the textId property.
  338. *
  339. * @param value
  340. * allowed object is
  341. * {@link String }
  342. *
  343. */
  344. public void setTextId(String value) {
  345. this.textId = value;
  346. }
  347. /**
  348. * Gets the parent object in the object tree representing the unmarshalled xml document.
  349. *
  350. * @return
  351. * The parent object.
  352. */
  353. public Object getParent() {
  354. return this.parent;
  355. }
  356. public void setParent(Object parent) {
  357. this.parent = parent;
  358. }
  359. /**
  360. * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
  361. *
  362. * @param parent
  363. * The parent object in the object tree.
  364. * @param unmarshaller
  365. * The unmarshaller that generated the instance.
  366. */
  367. public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
  368. setParent(parent);
  369. }
  370. }