PageRenderTime 34ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/java/org/docx4j/dml/CTBlip.java

http://github.com/plutext/docx4j
Java | 286 lines | 93 code | 18 blank | 175 comment | 11 complexity | 12f9846a9717ef6f47c1565bff9b2bf0 MD5 | raw file
Possible License(s): Apache-2.0
  1. /*
  2. * Copyright 2007-2008, 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.dml;
  16. import org.jvnet.jaxb2_commons.ppp.Child;
  17. import java.util.ArrayList;
  18. import java.util.List;
  19. import javax.xml.bind.Unmarshaller;
  20. import javax.xml.bind.annotation.*;
  21. /**
  22. * <p>Java class for CT_Blip complex type.
  23. *
  24. * <p>The following schema fragment specifies the expected content contained within this class.
  25. *
  26. * <pre>
  27. * &lt;complexType name="CT_Blip">
  28. * &lt;complexContent>
  29. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  30. * &lt;sequence>
  31. * &lt;choice maxOccurs="unbounded" minOccurs="0">
  32. * &lt;element name="alphaBiLevel" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AlphaBiLevelEffect"/>
  33. * &lt;element name="alphaCeiling" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AlphaCeilingEffect"/>
  34. * &lt;element name="alphaFloor" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AlphaFloorEffect"/>
  35. * &lt;element name="alphaInv" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AlphaInverseEffect"/>
  36. * &lt;element name="alphaMod" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AlphaModulateEffect"/>
  37. * &lt;element name="alphaModFix" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AlphaModulateFixedEffect"/>
  38. * &lt;element name="alphaRepl" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_AlphaReplaceEffect"/>
  39. * &lt;element name="biLevel" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_BiLevelEffect"/>
  40. * &lt;element name="blur" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_BlurEffect"/>
  41. * &lt;element name="clrChange" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_ColorChangeEffect"/>
  42. * &lt;element name="clrRepl" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_ColorReplaceEffect"/>
  43. * &lt;element name="duotone" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_DuotoneEffect"/>
  44. * &lt;element name="fillOverlay" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_FillOverlayEffect"/>
  45. * &lt;element name="grayscl" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_GrayscaleEffect"/>
  46. * &lt;element name="hsl" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_HSLEffect"/>
  47. * &lt;element name="lum" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_LuminanceEffect"/>
  48. * &lt;element name="tint" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_TintEffect"/>
  49. * &lt;/choice>
  50. * &lt;element name="extLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_OfficeArtExtensionList" minOccurs="0"/>
  51. * &lt;/sequence>
  52. * &lt;attGroup ref="{http://schemas.openxmlformats.org/drawingml/2006/main}AG_Blob"/>
  53. * &lt;attribute name="cstate" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_BlipCompression" default="none" />
  54. * &lt;/restriction>
  55. * &lt;/complexContent>
  56. * &lt;/complexType>
  57. * </pre>
  58. *
  59. *
  60. */
  61. @XmlAccessorType(XmlAccessType.FIELD)
  62. @XmlType(name = "CT_Blip", propOrder = {
  63. "alphaBiLevelOrAlphaCeilingOrAlphaFloor",
  64. "extLst"
  65. })
  66. public class CTBlip implements Child {
  67. @XmlElements({
  68. @XmlElement(name = "fillOverlay", type = CTFillOverlayEffect.class),
  69. @XmlElement(name = "blur", type = CTBlurEffect.class),
  70. @XmlElement(name = "alphaModFix", type = CTAlphaModulateFixedEffect.class),
  71. @XmlElement(name = "tint", type = CTTintEffect.class),
  72. @XmlElement(name = "alphaInv", type = CTAlphaInverseEffect.class),
  73. @XmlElement(name = "hsl", type = CTHSLEffect.class),
  74. @XmlElement(name = "biLevel", type = CTBiLevelEffect.class),
  75. @XmlElement(name = "alphaCeiling", type = CTAlphaCeilingEffect.class),
  76. @XmlElement(name = "alphaBiLevel", type = CTAlphaBiLevelEffect.class),
  77. @XmlElement(name = "alphaFloor", type = CTAlphaFloorEffect.class),
  78. @XmlElement(name = "alphaRepl", type = CTAlphaReplaceEffect.class),
  79. @XmlElement(name = "duotone", type = CTDuotoneEffect.class),
  80. @XmlElement(name = "clrRepl", type = CTColorReplaceEffect.class),
  81. @XmlElement(name = "lum", type = CTLuminanceEffect.class),
  82. @XmlElement(name = "clrChange", type = CTColorChangeEffect.class),
  83. @XmlElement(name = "grayscl", type = CTGrayscaleEffect.class),
  84. @XmlElement(name = "alphaMod", type = CTAlphaModulateEffect.class)
  85. })
  86. protected List<Object> alphaBiLevelOrAlphaCeilingOrAlphaFloor;
  87. protected CTOfficeArtExtensionList extLst;
  88. @XmlAttribute
  89. protected STBlipCompression cstate;
  90. @XmlAttribute(namespace = "http://schemas.openxmlformats.org/officeDocument/2006/relationships")
  91. protected String embed;
  92. @XmlAttribute(namespace = "http://schemas.openxmlformats.org/officeDocument/2006/relationships")
  93. protected String link;
  94. @XmlTransient
  95. private Object parent;
  96. /**
  97. * Gets the value of the alphaBiLevelOrAlphaCeilingOrAlphaFloor property.
  98. *
  99. * <p>
  100. * This accessor method returns a reference to the live list,
  101. * not a snapshot. Therefore any modification you make to the
  102. * returned list will be present inside the JAXB object.
  103. * This is why there is not a <CODE>set</CODE> method for the alphaBiLevelOrAlphaCeilingOrAlphaFloor property.
  104. *
  105. * <p>
  106. * For example, to add a new item, do as follows:
  107. * <pre>
  108. * getAlphaBiLevelOrAlphaCeilingOrAlphaFloor().add(newItem);
  109. * </pre>
  110. *
  111. *
  112. * <p>
  113. * Objects of the following type(s) are allowed in the list
  114. * {@link CTFillOverlayEffect }
  115. * {@link CTBlurEffect }
  116. * {@link CTAlphaModulateFixedEffect }
  117. * {@link CTTintEffect }
  118. * {@link CTAlphaInverseEffect }
  119. * {@link CTHSLEffect }
  120. * {@link CTBiLevelEffect }
  121. * {@link CTAlphaCeilingEffect }
  122. * {@link CTAlphaBiLevelEffect }
  123. * {@link CTAlphaFloorEffect }
  124. * {@link CTAlphaReplaceEffect }
  125. * {@link CTDuotoneEffect }
  126. * {@link CTColorReplaceEffect }
  127. * {@link CTLuminanceEffect }
  128. * {@link CTColorChangeEffect }
  129. * {@link CTGrayscaleEffect }
  130. * {@link CTAlphaModulateEffect }
  131. *
  132. *
  133. */
  134. public List<Object> getAlphaBiLevelOrAlphaCeilingOrAlphaFloor() {
  135. if (alphaBiLevelOrAlphaCeilingOrAlphaFloor == null) {
  136. alphaBiLevelOrAlphaCeilingOrAlphaFloor = new ArrayList<Object>();
  137. }
  138. return this.alphaBiLevelOrAlphaCeilingOrAlphaFloor;
  139. }
  140. /**
  141. * Gets the value of the extLst property.
  142. *
  143. * @return
  144. * possible object is
  145. * {@link CTOfficeArtExtensionList }
  146. *
  147. */
  148. public CTOfficeArtExtensionList getExtLst() {
  149. return extLst;
  150. }
  151. /**
  152. * Sets the value of the extLst property.
  153. *
  154. * @param value
  155. * allowed object is
  156. * {@link CTOfficeArtExtensionList }
  157. *
  158. */
  159. public void setExtLst(CTOfficeArtExtensionList value) {
  160. this.extLst = value;
  161. }
  162. /**
  163. * Gets the value of the cstate property.
  164. *
  165. * @return
  166. * possible object is
  167. * {@link STBlipCompression }
  168. *
  169. */
  170. public STBlipCompression getCstate() {
  171. if (cstate == null) {
  172. return STBlipCompression.NONE;
  173. } else {
  174. return cstate;
  175. }
  176. }
  177. /**
  178. * Sets the value of the cstate property.
  179. *
  180. * @param value
  181. * allowed object is
  182. * {@link STBlipCompression }
  183. *
  184. */
  185. public void setCstate(STBlipCompression value) {
  186. this.cstate = value;
  187. }
  188. /**
  189. * Embedded Picture Reference
  190. *
  191. * @return
  192. * possible object is
  193. * {@link String }
  194. *
  195. */
  196. public String getEmbed() {
  197. if (embed == null) {
  198. return "";
  199. } else {
  200. return embed;
  201. }
  202. }
  203. /**
  204. * Sets the value of the embed property.
  205. *
  206. * @param value
  207. * allowed object is
  208. * {@link String }
  209. *
  210. */
  211. public void setEmbed(String value) {
  212. this.embed = value;
  213. }
  214. /**
  215. * Linked Picture Reference
  216. *
  217. * @return
  218. * possible object is
  219. * {@link String }
  220. *
  221. */
  222. public String getLink() {
  223. if (link == null) {
  224. return "";
  225. } else {
  226. return link;
  227. }
  228. }
  229. /**
  230. * Sets the value of the link property.
  231. *
  232. * @param value
  233. * allowed object is
  234. * {@link String }
  235. *
  236. */
  237. public void setLink(String value) {
  238. this.link = value;
  239. }
  240. /**
  241. * Gets the parent object in the object tree representing the unmarshalled xml document.
  242. *
  243. * @return
  244. * The parent object.
  245. */
  246. public Object getParent() {
  247. return this.parent;
  248. }
  249. public void setParent(Object parent) {
  250. this.parent = parent;
  251. }
  252. /**
  253. * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
  254. *
  255. * @param parent
  256. * The parent object in the object tree.
  257. * @param unmarshaller
  258. * The unmarshaller that generated the instance.
  259. */
  260. public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
  261. setParent(parent);
  262. }
  263. }