View Javadoc
1   /*
2    * Copyright 2017 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.openehealth.ipf.commons.ihe.hpd.stub.dsmlv2;
17  
18  import javax.xml.bind.annotation.XmlAccessType;
19  import javax.xml.bind.annotation.XmlAccessorType;
20  import javax.xml.bind.annotation.XmlAttribute;
21  import javax.xml.bind.annotation.XmlElement;
22  import javax.xml.bind.annotation.XmlEnum;
23  import javax.xml.bind.annotation.XmlEnumValue;
24  import javax.xml.bind.annotation.XmlType;
25  
26  
27  /**
28   * <p>Java class for SearchRequest complex type.
29   * 
30   * <p>The following schema fragment specifies the expected content contained within this class.
31   * 
32   * <pre>
33   * &lt;complexType name="SearchRequest">
34   *   &lt;complexContent>
35   *     &lt;extension base="{urn:oasis:names:tc:DSML:2:0:core}DsmlMessage">
36   *       &lt;sequence>
37   *         &lt;element name="filter" type="{urn:oasis:names:tc:DSML:2:0:core}Filter"/>
38   *         &lt;element name="attributes" type="{urn:oasis:names:tc:DSML:2:0:core}AttributeDescriptions" minOccurs="0"/>
39   *       &lt;/sequence>
40   *       &lt;attribute name="dn" use="required" type="{urn:oasis:names:tc:DSML:2:0:core}DsmlDN" />
41   *       &lt;attribute name="scope" use="required">
42   *         &lt;simpleType>
43   *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
44   *             &lt;enumeration value="baseObject"/>
45   *             &lt;enumeration value="singleLevel"/>
46   *             &lt;enumeration value="wholeSubtree"/>
47   *           &lt;/restriction>
48   *         &lt;/simpleType>
49   *       &lt;/attribute>
50   *       &lt;attribute name="derefAliases" use="required">
51   *         &lt;simpleType>
52   *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
53   *             &lt;enumeration value="neverDerefAliases"/>
54   *             &lt;enumeration value="derefInSearching"/>
55   *             &lt;enumeration value="derefFindingBaseObj"/>
56   *             &lt;enumeration value="derefAlways"/>
57   *           &lt;/restriction>
58   *         &lt;/simpleType>
59   *       &lt;/attribute>
60   *       &lt;attribute name="sizeLimit" type="{urn:oasis:names:tc:DSML:2:0:core}MAXINT" default="0" />
61   *       &lt;attribute name="timeLimit" type="{urn:oasis:names:tc:DSML:2:0:core}MAXINT" default="0" />
62   *       &lt;attribute name="typesOnly" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
63   *     &lt;/extension>
64   *   &lt;/complexContent>
65   * &lt;/complexType>
66   * </pre>
67   * 
68   * 
69   */
70  @XmlAccessorType(XmlAccessType.FIELD)
71  @XmlType(name = "SearchRequest", propOrder = {
72      "filter",
73      "attributes"
74  })
75  public class SearchRequest
76      extends DsmlMessage
77  {
78  
79      @XmlElement(required = true)
80      protected Filter filter;
81      protected AttributeDescriptions attributes;
82      @XmlAttribute(name = "dn", required = true)
83      protected String dn;
84      @XmlAttribute(name = "scope", required = true)
85      protected SearchScope scope;
86      @XmlAttribute(name = "derefAliases", required = true)
87      protected DerefAliasesType derefAliases;
88      @XmlAttribute(name = "sizeLimit")
89      protected Long sizeLimit;
90      @XmlAttribute(name = "timeLimit")
91      protected Long timeLimit;
92      @XmlAttribute(name = "typesOnly")
93      protected Boolean typesOnly;
94  
95      /**
96       * Gets the value of the filter property.
97       * 
98       * @return
99       *     possible object is
100      *     {@link Filter }
101      *     
102      */
103     public Filter getFilter() {
104         return filter;
105     }
106 
107     /**
108      * Sets the value of the filter property.
109      * 
110      * @param value
111      *     allowed object is
112      *     {@link Filter }
113      *     
114      */
115     public void setFilter(Filter value) {
116         this.filter = value;
117     }
118 
119     /**
120      * Gets the value of the attributes property.
121      * 
122      * @return
123      *     possible object is
124      *     {@link AttributeDescriptions }
125      *     
126      */
127     public AttributeDescriptions getAttributes() {
128         return attributes;
129     }
130 
131     /**
132      * Sets the value of the attributes property.
133      * 
134      * @param value
135      *     allowed object is
136      *     {@link AttributeDescriptions }
137      *     
138      */
139     public void setAttributes(AttributeDescriptions value) {
140         this.attributes = value;
141     }
142 
143     /**
144      * Gets the value of the dn property.
145      * 
146      * @return
147      *     possible object is
148      *     {@link String }
149      *     
150      */
151     public String getDn() {
152         return dn;
153     }
154 
155     /**
156      * Sets the value of the dn property.
157      * 
158      * @param value
159      *     allowed object is
160      *     {@link String }
161      *     
162      */
163     public void setDn(String value) {
164         this.dn = value;
165     }
166 
167     /**
168      * Gets the value of the scope property.
169      * 
170      * @return
171      *     possible object is
172      *     {@link SearchScope }
173      *     
174      */
175     public SearchScope getScope() {
176         return scope;
177     }
178 
179     /**
180      * Sets the value of the scope property.
181      * 
182      * @param value
183      *     allowed object is
184      *     {@link SearchScope }
185      *     
186      */
187     public void setScope(SearchScope value) {
188         this.scope = value;
189     }
190 
191     /**
192      * Gets the value of the derefAliases property.
193      * 
194      * @return
195      *     possible object is
196      *     {@link DerefAliasesType }
197      *     
198      */
199     public DerefAliasesType getDerefAliases() {
200         return derefAliases;
201     }
202 
203     /**
204      * Sets the value of the derefAliases property.
205      * 
206      * @param value
207      *     allowed object is
208      *     {@link DerefAliasesType }
209      *     
210      */
211     public void setDerefAliases(DerefAliasesType value) {
212         this.derefAliases = value;
213     }
214 
215     /**
216      * Gets the value of the sizeLimit property.
217      * 
218      * @return
219      *     possible object is
220      *     {@link Long }
221      *     
222      */
223     public long getSizeLimit() {
224         if (sizeLimit == null) {
225             return  0L;
226         } else {
227             return sizeLimit;
228         }
229     }
230 
231     /**
232      * Sets the value of the sizeLimit property.
233      * 
234      * @param value
235      *     allowed object is
236      *     {@link Long }
237      *     
238      */
239     public void setSizeLimit(Long value) {
240         this.sizeLimit = value;
241     }
242 
243     /**
244      * Gets the value of the timeLimit property.
245      * 
246      * @return
247      *     possible object is
248      *     {@link Long }
249      *     
250      */
251     public long getTimeLimit() {
252         if (timeLimit == null) {
253             return  0L;
254         } else {
255             return timeLimit;
256         }
257     }
258 
259     /**
260      * Sets the value of the timeLimit property.
261      * 
262      * @param value
263      *     allowed object is
264      *     {@link Long }
265      *     
266      */
267     public void setTimeLimit(Long value) {
268         this.timeLimit = value;
269     }
270 
271     /**
272      * Gets the value of the typesOnly property.
273      * 
274      * @return
275      *     possible object is
276      *     {@link Boolean }
277      *     
278      */
279     public boolean isTypesOnly() {
280         if (typesOnly == null) {
281             return false;
282         } else {
283             return typesOnly;
284         }
285     }
286 
287     /**
288      * Sets the value of the typesOnly property.
289      * 
290      * @param value
291      *     allowed object is
292      *     {@link Boolean }
293      *     
294      */
295     public void setTypesOnly(Boolean value) {
296         this.typesOnly = value;
297     }
298 
299 
300     /**
301      * <p>Java class for null.
302      * 
303      * <p>The following schema fragment specifies the expected content contained within this class.
304      * <p>
305      * <pre>
306      * &lt;simpleType>
307      *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
308      *     &lt;enumeration value="neverDerefAliases"/>
309      *     &lt;enumeration value="derefInSearching"/>
310      *     &lt;enumeration value="derefFindingBaseObj"/>
311      *     &lt;enumeration value="derefAlways"/>
312      *   &lt;/restriction>
313      * &lt;/simpleType>
314      * </pre>
315      * 
316      */
317     @XmlType(name = "")
318     @XmlEnum
319     public enum DerefAliasesType {
320 
321         @XmlEnumValue("neverDerefAliases")
322         NEVER_DEREF_ALIASES("neverDerefAliases"),
323         @XmlEnumValue("derefInSearching")
324         DEREF_IN_SEARCHING("derefInSearching"),
325         @XmlEnumValue("derefFindingBaseObj")
326         DEREF_FINDING_BASE_OBJ("derefFindingBaseObj"),
327         @XmlEnumValue("derefAlways")
328         DEREF_ALWAYS("derefAlways");
329         private final String value;
330 
331         DerefAliasesType(String v) {
332             value = v;
333         }
334 
335         public String value() {
336             return value;
337         }
338 
339         public static DerefAliasesType fromValue(String v) {
340             for (DerefAliasesType c: DerefAliasesType.values()) {
341                 if (c.value.equals(v)) {
342                     return c;
343                 }
344             }
345             throw new IllegalArgumentException(v);
346         }
347 
348     }
349 
350 
351     /**
352      * <p>Java class for null.
353      * 
354      * <p>The following schema fragment specifies the expected content contained within this class.
355      * <p>
356      * <pre>
357      * &lt;simpleType>
358      *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
359      *     &lt;enumeration value="baseObject"/>
360      *     &lt;enumeration value="singleLevel"/>
361      *     &lt;enumeration value="wholeSubtree"/>
362      *   &lt;/restriction>
363      * &lt;/simpleType>
364      * </pre>
365      * 
366      */
367     @XmlType(name = "")
368     @XmlEnum
369     public enum SearchScope {
370 
371         @XmlEnumValue("baseObject")
372         BASE_OBJECT("baseObject"),
373         @XmlEnumValue("singleLevel")
374         SINGLE_LEVEL("singleLevel"),
375         @XmlEnumValue("wholeSubtree")
376         WHOLE_SUBTREE("wholeSubtree");
377         private final String value;
378 
379         SearchScope(String v) {
380             value = v;
381         }
382 
383         public String value() {
384             return value;
385         }
386 
387         public static SearchScope fromValue(String v) {
388             for (SearchScope c: SearchScope.values()) {
389                 if (c.value.equals(v)) {
390                     return c;
391                 }
392             }
393             throw new IllegalArgumentException(v);
394         }
395 
396     }
397 
398 }