Project

General

Profile

« Previous | Next » 

Revision 9b52adf5

Added by Andreas Kohlbecker over 7 years ago

solving #17 and preparing #16 \n - #17 hide the empty higherClassification property from the taxon object serialization\n - #16 optional inclusion of the parentTaxon into the search responses

View differences:

src/main/java/org/cybertaxonomy/utis/tnr/msg/AtomisedName.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/HigherClassificationElement.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/NameType.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/ObjectFactory.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
......
44 44
        return new Query();
45 45
    }
46 46

  
47
    /**
48
     * Create an instance of {@link Taxon }
49
     * 
50
     */
51
    public Taxon createTaxon() {
52
        return new Taxon();
53
    }
54

  
47 55
    /**
48 56
     * Create an instance of {@link Response }
49 57
     * 
......
68 76
        return new Query.Request();
69 77
    }
70 78

  
71
    /**
72
     * Create an instance of {@link Taxon }
73
     * 
74
     */
75
    public Taxon createTaxon() {
76
        return new Taxon();
77
    }
78

  
79 79
    /**
80 80
     * Create an instance of {@link TaxonBase }
81 81
     * 
......
108 108
        return new HigherClassificationElement();
109 109
    }
110 110

  
111
    /**
112
     * Create an instance of {@link Taxon.ParentTaxon }
113
     * 
114
     */
115
    public Taxon.ParentTaxon createTaxonParentTaxon() {
116
        return new Taxon.ParentTaxon();
117
    }
118

  
111 119
    /**
112 120
     * Create an instance of {@link Response.OtherNames }
113 121
     * 
src/main/java/org/cybertaxonomy/utis/tnr/msg/Query.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
......
37 37
 *                   &lt;element name="queryString" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
38 38
 *                   &lt;element name="searchMode" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
39 39
 *                   &lt;element name="addSynonymy" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
40
 *                   &lt;element name="addParentTaxon" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
40 41
 *                 &lt;/sequence&gt;
41 42
 *               &lt;/restriction&gt;
42 43
 *             &lt;/complexContent&gt;
......
288 289
     *         &lt;element name="queryString" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
289 290
     *         &lt;element name="searchMode" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
290 291
     *         &lt;element name="addSynonymy" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
292
     *         &lt;element name="addParentTaxon" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
291 293
     *       &lt;/sequence&gt;
292 294
     *     &lt;/restriction&gt;
293 295
     *   &lt;/complexContent&gt;
......
300 302
    @XmlType(name = "", propOrder = {
301 303
        "queryString",
302 304
        "searchMode",
303
        "addSynonymy"
305
        "addSynonymy",
306
        "addParentTaxon"
304 307
    })
305 308
    public static class Request {
306 309

  
......
309 312
        @XmlElement(required = true)
310 313
        protected String searchMode;
311 314
        protected boolean addSynonymy;
315
        protected boolean addParentTaxon;
312 316

  
313 317
        /**
314 318
         * Gets the value of the queryString property.
......
343 347
         *     {@link String }
344 348
         *     
345 349
         */
346
        @ApiModelProperty("Specified the search mode to be usedPossible search modes are: scientificNameExact, scientificNameLike (begins with), vernacularNameExact, vernacularNameLike (contains).")
350
        @ApiModelProperty("Specified the search mode to be used. Possible search modes are: scientificNameExact, scientificNameLike (begins with), vernacularNameExact, vernacularNameLike (contains), findByIdentifier, taxonomicChildren.")
347 351
        public String getSearchMode() {
348 352
            return searchMode;
349 353
        }
......
377 381
            this.addSynonymy = value;
378 382
        }
379 383

  
384
        /**
385
         * Gets the value of the addParentTaxon property.
386
         * 
387
         */
388
        @ApiModelProperty("Indicates whether the direct higher taxon of the accepted taxon should be included into the response. Turning this option on may lead to an slight increase of the response time.")
389
        public boolean isAddParentTaxon() {
390
            return addParentTaxon;
391
        }
392

  
393
        /**
394
         * Sets the value of the addParentTaxon property.
395
         * 
396
         */
397
        public void setAddParentTaxon(boolean value) {
398
            this.addParentTaxon = value;
399
        }
400

  
380 401
    }
381 402

  
382 403
}
src/main/java/org/cybertaxonomy/utis/tnr/msg/Response.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/Source.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/Synonym.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/Taxon.java
1 1
//
2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
4
// Any modifications to this file will be lost upon recompilation of the source schema.
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST
6 6
//
7 7

  
8 8

  
......
10 10

  
11 11
import java.util.ArrayList;
12 12
import java.util.List;
13

  
13 14
import javax.xml.bind.annotation.XmlAccessType;
14 15
import javax.xml.bind.annotation.XmlAccessorType;
15 16
import javax.xml.bind.annotation.XmlElement;
16 17
import javax.xml.bind.annotation.XmlRootElement;
17 18
import javax.xml.bind.annotation.XmlType;
18 19

  
20
import com.fasterxml.jackson.annotation.JsonInclude;
21

  
19 22

  
20 23
/**
21 24
 * <p>Java class for anonymous complex type.
22
 * 
25
 *
23 26
 * <p>The following schema fragment specifies the expected content contained within this class.
24
 * 
27
 *
25 28
 * <pre>
26 29
 * &lt;complexType&gt;
27 30
 *   &lt;complexContent&gt;
......
29 32
 *       &lt;sequence&gt;
30 33
 *         &lt;element name="higherClassification" type="{http://cybertaxonomy.org/utis/tnr/msg}higherClassificationElement" maxOccurs="unbounded" minOccurs="0"/&gt;
31 34
 *         &lt;element name="identifier" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
35
 *         &lt;element name="parentTaxon"&gt;
36
 *           &lt;complexType&gt;
37
 *             &lt;complexContent&gt;
38
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
39
 *                 &lt;sequence&gt;
40
 *                   &lt;element name="scientificName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
41
 *                   &lt;element name="identifier" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
42
 *                 &lt;/sequence&gt;
43
 *               &lt;/restriction&gt;
44
 *             &lt;/complexContent&gt;
45
 *           &lt;/complexType&gt;
46
 *         &lt;/element&gt;
32 47
 *       &lt;/sequence&gt;
33 48
 *     &lt;/extension&gt;
34 49
 *   &lt;/complexContent&gt;
35 50
 * &lt;/complexType&gt;
36 51
 * </pre>
37
 * 
38
 * 
52
 *
53
 *
39 54
 */
40 55
@XmlAccessorType(XmlAccessType.FIELD)
41 56
@XmlType(name = "", propOrder = {
42 57
    "higherClassification",
43
    "identifier"
58
    "identifier",
59
    "parentTaxon"
44 60
})
45 61
@XmlRootElement(name = "taxon")
62
@JsonInclude(JsonInclude.Include.NON_EMPTY)
46 63
public class Taxon
47 64
    extends TaxonBase
48 65
{
......
50 67
    protected List<HigherClassificationElement> higherClassification;
51 68
    @XmlElement(required = true)
52 69
    protected String identifier;
70
    @XmlElement(required = true)
71
    protected Taxon.ParentTaxon parentTaxon;
53 72

  
54 73
    /**
55 74
     * Gets the value of the higherClassification property.
56
     * 
75
     *
57 76
     * <p>
58 77
     * This accessor method returns a reference to the live list,
59 78
     * not a snapshot. Therefore any modification you make to the
60 79
     * returned list will be present inside the JAXB object.
61 80
     * This is why there is not a <CODE>set</CODE> method for the higherClassification property.
62
     * 
81
     *
63 82
     * <p>
64 83
     * For example, to add a new item, do as follows:
65 84
     * <pre>
66 85
     *    getHigherClassification().add(newItem);
67 86
     * </pre>
68
     * 
69
     * 
87
     *
88
     *
70 89
     * <p>
71 90
     * Objects of the following type(s) are allowed in the list
72 91
     * {@link HigherClassificationElement }
73
     * 
74
     * 
92
     *
93
     *
75 94
     */
76 95
    public List<HigherClassificationElement> getHigherClassification() {
77 96
        if (higherClassification == null) {
......
82 101

  
83 102
    /**
84 103
     * Gets the value of the identifier property.
85
     * 
104
     *
86 105
     * @return
87 106
     *     possible object is
88 107
     *     {@link String }
89
     *     
108
     *
90 109
     */
91 110
    public String getIdentifier() {
92 111
        return identifier;
......
94 113

  
95 114
    /**
96 115
     * Sets the value of the identifier property.
97
     * 
116
     *
98 117
     * @param value
99 118
     *     allowed object is
100 119
     *     {@link String }
101
     *     
120
     *
102 121
     */
103 122
    public void setIdentifier(String value) {
104 123
        this.identifier = value;
105 124
    }
106 125

  
126
    /**
127
     * Gets the value of the parentTaxon property.
128
     *
129
     * @return
130
     *     possible object is
131
     *     {@link Taxon.ParentTaxon }
132
     *
133
     */
134
    public Taxon.ParentTaxon getParentTaxon() {
135
        return parentTaxon;
136
    }
137

  
138
    /**
139
     * Sets the value of the parentTaxon property.
140
     *
141
     * @param value
142
     *     allowed object is
143
     *     {@link Taxon.ParentTaxon }
144
     *
145
     */
146
    public void setParentTaxon(Taxon.ParentTaxon value) {
147
        this.parentTaxon = value;
148
    }
149

  
150

  
151
    /**
152
     * <p>Java class for anonymous complex type.
153
     *
154
     * <p>The following schema fragment specifies the expected content contained within this class.
155
     *
156
     * <pre>
157
     * &lt;complexType&gt;
158
     *   &lt;complexContent&gt;
159
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
160
     *       &lt;sequence&gt;
161
     *         &lt;element name="scientificName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
162
     *         &lt;element name="identifier" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
163
     *       &lt;/sequence&gt;
164
     *     &lt;/restriction&gt;
165
     *   &lt;/complexContent&gt;
166
     * &lt;/complexType&gt;
167
     * </pre>
168
     *
169
     *
170
     */
171
    @XmlAccessorType(XmlAccessType.FIELD)
172
    @XmlType(name = "", propOrder = {
173
        "scientificName",
174
        "identifier"
175
    })
176
    public static class ParentTaxon {
177

  
178
        @XmlElement(required = true)
179
        protected String scientificName;
180
        @XmlElement(required = true)
181
        protected String identifier;
182

  
183
        /**
184
         * Gets the value of the scientificName property.
185
         *
186
         * @return
187
         *     possible object is
188
         *     {@link String }
189
         *
190
         */
191
        public String getScientificName() {
192
            return scientificName;
193
        }
194

  
195
        /**
196
         * Sets the value of the scientificName property.
197
         *
198
         * @param value
199
         *     allowed object is
200
         *     {@link String }
201
         *
202
         */
203
        public void setScientificName(String value) {
204
            this.scientificName = value;
205
        }
206

  
207
        /**
208
         * Gets the value of the identifier property.
209
         *
210
         * @return
211
         *     possible object is
212
         *     {@link String }
213
         *
214
         */
215
        public String getIdentifier() {
216
            return identifier;
217
        }
218

  
219
        /**
220
         * Sets the value of the identifier property.
221
         *
222
         * @param value
223
         *     allowed object is
224
         *     {@link String }
225
         *
226
         */
227
        public void setIdentifier(String value) {
228
            this.identifier = value;
229
        }
230

  
231
    }
232

  
107 233
}
src/main/java/org/cybertaxonomy/utis/tnr/msg/TaxonBase.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/TaxonName.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/TnrMsg.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8

  
src/main/java/org/cybertaxonomy/utis/tnr/msg/package-info.java
2 2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3 3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4 4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2015.11.02 at 02:20:04 PM CET 
5
// Generated on: 2016.10.19 at 02:28:29 PM CEST 
6 6
//
7 7

  
8 8
@javax.xml.bind.annotation.XmlSchema(namespace = "http://cybertaxonomy.org/utis/tnr/msg", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
src/main/resources/org/cybertaxonomy/utis/tnr/tnrmsg.xsd
227 227
  </xsd:element>
228 228
  <xsd:element name="taxon">
229 229
    <xsd:complexType>
230
      <xsd:annotation>
231
        <xsd:appinfo>
232
            <annox:annotate target="class">@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY)</annox:annotate>
233
        </xsd:appinfo>
234
      </xsd:annotation>
230 235
      <xsd:complexContent>
231 236
        <xsd:extension base="tns:taxonBase">
232 237
          <xsd:sequence>
233 238
            <xsd:element name="higherClassification" type="tns:higherClassificationElement" maxOccurs="unbounded" minOccurs="0"></xsd:element>
234 239
            <xsd:element name="identifier" type="xsd:string"></xsd:element>
240
            <xsd:element name="parentTaxon">
241
                <xsd:complexType>
242
                    <xsd:sequence>
243
                        <xsd:element name="scientificName" type="xsd:string"></xsd:element>
244
                        <xsd:element name="identifier" type="xsd:string"></xsd:element>
245
                    </xsd:sequence>
246
                </xsd:complexType>
247
            </xsd:element>
235 248
          </xsd:sequence>
236 249
        </xsd:extension>
237 250
      </xsd:complexContent>
......
279 292
                  </xsd:appinfo>
280 293
                </xsd:annotation>
281 294
              </xsd:element>
295
              <xsd:element name="addParentTaxon" type="xsd:boolean">
296
              <xsd:annotation>
297
                  <xsd:appinfo>
298
                    <annox:annotate target="getter">
299
                      @com.wordnik.swagger.annotations.ApiModelProperty("Indicates whether the direct higher taxon of the accepted taxon should be included into the response. Turning this option on may lead to an slight increase of the response time.")
300
                    </annox:annotate>
301
                  </xsd:appinfo>
302
                </xsd:annotation>
303
              </xsd:element>
282 304
            </xsd:sequence>
283 305
          </xsd:complexType>
284 306
        </xsd:element>

Also available in: Unified diff