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

/schemas/schema-core/src/main/java/org/fao/geonet/kernel/schema/editorconfig/Section.java

https://github.com/georchestra/geonetwork
Java | 208 lines | 75 code | 18 blank | 115 comment | 5 complexity | d1169469d45df93b4c2d6b923d7f8e4a MD5 | raw file
  1. /*
  2. *
  3. * Copyright (C) 2001-2016 Food and Agriculture Organization of the
  4. * United Nations (FAO-UN), United Nations World Food Programme (WFP)
  5. * and United Nations Environment Programme (UNEP)
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  20. *
  21. * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
  22. * Rome - Italy. email: geonetwork@osgeo.org
  23. */
  24. package org.fao.geonet.kernel.schema.editorconfig;
  25. import java.util.ArrayList;
  26. import java.util.List;
  27. import javax.xml.bind.annotation.XmlAccessType;
  28. import javax.xml.bind.annotation.XmlAccessorType;
  29. import javax.xml.bind.annotation.XmlAttribute;
  30. import javax.xml.bind.annotation.XmlElement;
  31. import javax.xml.bind.annotation.XmlElements;
  32. import javax.xml.bind.annotation.XmlRootElement;
  33. import javax.xml.bind.annotation.XmlType;
  34. /**
  35. * <p>Java class for anonymous complex type.
  36. *
  37. * <p>The following schema fragment specifies the expected content contained within this class.
  38. *
  39. * <pre>
  40. * &lt;complexType>
  41. * &lt;complexContent>
  42. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  43. * &lt;choice maxOccurs="unbounded" minOccurs="0">
  44. * &lt;element ref="{}field"/>
  45. * &lt;element ref="{}action"/>
  46. * &lt;element ref="{}text"/>
  47. * &lt;element ref="{}section"/>
  48. * &lt;element ref="{}fieldset"/>
  49. * &lt;/choice>
  50. * &lt;attribute ref="{}mode"/>
  51. * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
  52. * &lt;attribute name="xpath" type="{http://www.w3.org/2001/XMLSchema}string" />
  53. * &lt;attribute ref="{}or"/>
  54. * &lt;attribute ref="{}in"/>
  55. * &lt;/restriction>
  56. * &lt;/complexContent>
  57. * &lt;/complexType>
  58. * </pre>
  59. */
  60. @XmlAccessorType(XmlAccessType.FIELD)
  61. @XmlType(name = "", propOrder = {
  62. "fieldOrActionOrText"
  63. })
  64. @XmlRootElement(name = "section")
  65. public class Section {
  66. @XmlElements({
  67. @XmlElement(name = "field", type = Field.class),
  68. @XmlElement(name = "action", type = Action.class),
  69. @XmlElement(name = "text", type = Text.class),
  70. @XmlElement(name = "section", type = Section.class),
  71. @XmlElement(name = "fieldset", type = Fieldset.class)
  72. })
  73. protected List<Object> fieldOrActionOrText;
  74. @XmlAttribute(name = "mode")
  75. protected String mode;
  76. @XmlAttribute(name = "name")
  77. protected String name;
  78. @XmlAttribute(name = "xpath")
  79. protected String xpath;
  80. @XmlAttribute(name = "or")
  81. protected String or;
  82. @XmlAttribute(name = "in")
  83. protected String in;
  84. /**
  85. * Gets the value of the fieldOrActionOrText property.
  86. *
  87. * <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any
  88. * modification you make to the returned list will be present inside the JAXB object. This is
  89. * why there is not a <CODE>set</CODE> method for the fieldOrActionOrText property.
  90. *
  91. * <p> For example, to add a new item, do as follows:
  92. * <pre>
  93. * getFieldOrActionOrText().add(newItem);
  94. * </pre>
  95. *
  96. *
  97. * <p> Objects of the following type(s) are allowed in the list {@link Field } {@link Action }
  98. * {@link Text } {@link Section } {@link Fieldset }
  99. */
  100. public List<Object> getFieldOrActionOrText() {
  101. if (fieldOrActionOrText == null) {
  102. fieldOrActionOrText = new ArrayList<Object>();
  103. }
  104. return this.fieldOrActionOrText;
  105. }
  106. /**
  107. * Gets the value of the mode property.
  108. *
  109. * @return possible object is {@link String }
  110. */
  111. public String getMode() {
  112. if (mode == null) {
  113. return "flat";
  114. } else {
  115. return mode;
  116. }
  117. }
  118. /**
  119. * Sets the value of the mode property.
  120. *
  121. * @param value allowed object is {@link String }
  122. */
  123. public void setMode(String value) {
  124. this.mode = value;
  125. }
  126. /**
  127. * Gets the value of the name property.
  128. *
  129. * @return possible object is {@link String }
  130. */
  131. public String getName() {
  132. return name;
  133. }
  134. /**
  135. * Sets the value of the name property.
  136. *
  137. * @param value allowed object is {@link String }
  138. */
  139. public void setName(String value) {
  140. this.name = value;
  141. }
  142. /**
  143. * Gets the value of the xpath property.
  144. *
  145. * @return possible object is {@link String }
  146. */
  147. public String getXpath() {
  148. return xpath;
  149. }
  150. /**
  151. * Sets the value of the xpath property.
  152. *
  153. * @param value allowed object is {@link String }
  154. */
  155. public void setXpath(String value) {
  156. this.xpath = value;
  157. }
  158. /**
  159. * Gets the value of the or property.
  160. *
  161. * @return possible object is {@link String }
  162. */
  163. public String getOr() {
  164. return or;
  165. }
  166. /**
  167. * Sets the value of the or property.
  168. *
  169. * @param value allowed object is {@link String }
  170. */
  171. public void setOr(String value) {
  172. this.or = value;
  173. }
  174. /**
  175. * Gets the value of the in property.
  176. *
  177. * @return possible object is {@link String }
  178. */
  179. public String getIn() {
  180. return in;
  181. }
  182. /**
  183. * Sets the value of the in property.
  184. *
  185. * @param value allowed object is {@link String }
  186. */
  187. public void setIn(String value) {
  188. this.in = value;
  189. }
  190. }