001package org.hl7.fhir.instance.model;
002
003import java.math.BigDecimal;
004
005/*
006  Copyright (c) 2011+, HL7, Inc.
007  All rights reserved.
008  
009  Redistribution and use in source and binary forms, with or without modification, 
010  are permitted provided that the following conditions are met:
011  
012   * Redistributions of source code must retain the above copyright notice, this 
013     list of conditions and the following disclaimer.
014   * Redistributions in binary form must reproduce the above copyright notice, 
015     this list of conditions and the following disclaimer in the documentation 
016     and/or other materials provided with the distribution.
017   * Neither the name of HL7 nor the names of its contributors may be used to 
018     endorse or promote products derived from this software without specific 
019     prior written permission.
020  
021  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
022  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
023  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
024  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
025  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
026  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
027  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
028  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
029  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
030  POSSIBILITY OF SUCH DAMAGE.
031  
032*/
033
034// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2
035import java.util.ArrayList;
036import java.util.List;
037
038import org.hl7.fhir.exceptions.FHIRException;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.utilities.Utilities;
041
042import ca.uhn.fhir.model.api.annotation.*;
043/**
044 * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
045 */
046@ResourceDef(name="Location", profile="http://hl7.org/fhir/Profile/Location")
047public class Location extends DomainResource {
048
049    public enum LocationStatus {
050        /**
051         * The location is operational.
052         */
053        ACTIVE, 
054        /**
055         * The location is temporarily closed.
056         */
057        SUSPENDED, 
058        /**
059         * The location is no longer used.
060         */
061        INACTIVE, 
062        /**
063         * added to help the parsers
064         */
065        NULL;
066        public static LocationStatus fromCode(String codeString) throws FHIRException {
067            if (codeString == null || "".equals(codeString))
068                return null;
069        if ("active".equals(codeString))
070          return ACTIVE;
071        if ("suspended".equals(codeString))
072          return SUSPENDED;
073        if ("inactive".equals(codeString))
074          return INACTIVE;
075        throw new FHIRException("Unknown LocationStatus code '"+codeString+"'");
076        }
077        public String toCode() {
078          switch (this) {
079            case ACTIVE: return "active";
080            case SUSPENDED: return "suspended";
081            case INACTIVE: return "inactive";
082            default: return "?";
083          }
084        }
085        public String getSystem() {
086          switch (this) {
087            case ACTIVE: return "http://hl7.org/fhir/location-status";
088            case SUSPENDED: return "http://hl7.org/fhir/location-status";
089            case INACTIVE: return "http://hl7.org/fhir/location-status";
090            default: return "?";
091          }
092        }
093        public String getDefinition() {
094          switch (this) {
095            case ACTIVE: return "The location is operational.";
096            case SUSPENDED: return "The location is temporarily closed.";
097            case INACTIVE: return "The location is no longer used.";
098            default: return "?";
099          }
100        }
101        public String getDisplay() {
102          switch (this) {
103            case ACTIVE: return "Active";
104            case SUSPENDED: return "Suspended";
105            case INACTIVE: return "Inactive";
106            default: return "?";
107          }
108        }
109    }
110
111  public static class LocationStatusEnumFactory implements EnumFactory<LocationStatus> {
112    public LocationStatus fromCode(String codeString) throws IllegalArgumentException {
113      if (codeString == null || "".equals(codeString))
114            if (codeString == null || "".equals(codeString))
115                return null;
116        if ("active".equals(codeString))
117          return LocationStatus.ACTIVE;
118        if ("suspended".equals(codeString))
119          return LocationStatus.SUSPENDED;
120        if ("inactive".equals(codeString))
121          return LocationStatus.INACTIVE;
122        throw new IllegalArgumentException("Unknown LocationStatus code '"+codeString+"'");
123        }
124        public Enumeration<LocationStatus> fromType(Base code) throws FHIRException {
125          if (code == null || code.isEmpty())
126            return null;
127          String codeString = ((PrimitiveType) code).asStringValue();
128          if (codeString == null || "".equals(codeString))
129            return null;
130        if ("active".equals(codeString))
131          return new Enumeration<LocationStatus>(this, LocationStatus.ACTIVE);
132        if ("suspended".equals(codeString))
133          return new Enumeration<LocationStatus>(this, LocationStatus.SUSPENDED);
134        if ("inactive".equals(codeString))
135          return new Enumeration<LocationStatus>(this, LocationStatus.INACTIVE);
136        throw new FHIRException("Unknown LocationStatus code '"+codeString+"'");
137        }
138    public String toCode(LocationStatus code) {
139      if (code == LocationStatus.ACTIVE)
140        return "active";
141      if (code == LocationStatus.SUSPENDED)
142        return "suspended";
143      if (code == LocationStatus.INACTIVE)
144        return "inactive";
145      return "?";
146      }
147    }
148
149    public enum LocationMode {
150        /**
151         * The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A).
152         */
153        INSTANCE, 
154        /**
155         * The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.).
156         */
157        KIND, 
158        /**
159         * added to help the parsers
160         */
161        NULL;
162        public static LocationMode fromCode(String codeString) throws FHIRException {
163            if (codeString == null || "".equals(codeString))
164                return null;
165        if ("instance".equals(codeString))
166          return INSTANCE;
167        if ("kind".equals(codeString))
168          return KIND;
169        throw new FHIRException("Unknown LocationMode code '"+codeString+"'");
170        }
171        public String toCode() {
172          switch (this) {
173            case INSTANCE: return "instance";
174            case KIND: return "kind";
175            default: return "?";
176          }
177        }
178        public String getSystem() {
179          switch (this) {
180            case INSTANCE: return "http://hl7.org/fhir/location-mode";
181            case KIND: return "http://hl7.org/fhir/location-mode";
182            default: return "?";
183          }
184        }
185        public String getDefinition() {
186          switch (this) {
187            case INSTANCE: return "The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A).";
188            case KIND: return "The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.).";
189            default: return "?";
190          }
191        }
192        public String getDisplay() {
193          switch (this) {
194            case INSTANCE: return "Instance";
195            case KIND: return "Kind";
196            default: return "?";
197          }
198        }
199    }
200
201  public static class LocationModeEnumFactory implements EnumFactory<LocationMode> {
202    public LocationMode fromCode(String codeString) throws IllegalArgumentException {
203      if (codeString == null || "".equals(codeString))
204            if (codeString == null || "".equals(codeString))
205                return null;
206        if ("instance".equals(codeString))
207          return LocationMode.INSTANCE;
208        if ("kind".equals(codeString))
209          return LocationMode.KIND;
210        throw new IllegalArgumentException("Unknown LocationMode code '"+codeString+"'");
211        }
212        public Enumeration<LocationMode> fromType(Base code) throws FHIRException {
213          if (code == null || code.isEmpty())
214            return null;
215          String codeString = ((PrimitiveType) code).asStringValue();
216          if (codeString == null || "".equals(codeString))
217            return null;
218        if ("instance".equals(codeString))
219          return new Enumeration<LocationMode>(this, LocationMode.INSTANCE);
220        if ("kind".equals(codeString))
221          return new Enumeration<LocationMode>(this, LocationMode.KIND);
222        throw new FHIRException("Unknown LocationMode code '"+codeString+"'");
223        }
224    public String toCode(LocationMode code) {
225      if (code == LocationMode.INSTANCE)
226        return "instance";
227      if (code == LocationMode.KIND)
228        return "kind";
229      return "?";
230      }
231    }
232
233    @Block()
234    public static class LocationPositionComponent extends BackboneElement implements IBaseBackboneElement {
235        /**
236         * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).
237         */
238        @Child(name = "longitude", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=false)
239        @Description(shortDefinition="Longitude with WGS84 datum", formalDefinition="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)." )
240        protected DecimalType longitude;
241
242        /**
243         * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).
244         */
245        @Child(name = "latitude", type = {DecimalType.class}, order=2, min=1, max=1, modifier=false, summary=false)
246        @Description(shortDefinition="Latitude with WGS84 datum", formalDefinition="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)." )
247        protected DecimalType latitude;
248
249        /**
250         * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).
251         */
252        @Child(name = "altitude", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false)
253        @Description(shortDefinition="Altitude with WGS84 datum", formalDefinition="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)." )
254        protected DecimalType altitude;
255
256        private static final long serialVersionUID = -74276134L;
257
258    /*
259     * Constructor
260     */
261      public LocationPositionComponent() {
262        super();
263      }
264
265    /*
266     * Constructor
267     */
268      public LocationPositionComponent(DecimalType longitude, DecimalType latitude) {
269        super();
270        this.longitude = longitude;
271        this.latitude = latitude;
272      }
273
274        /**
275         * @return {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value
276         */
277        public DecimalType getLongitudeElement() { 
278          if (this.longitude == null)
279            if (Configuration.errorOnAutoCreate())
280              throw new Error("Attempt to auto-create LocationPositionComponent.longitude");
281            else if (Configuration.doAutoCreate())
282              this.longitude = new DecimalType(); // bb
283          return this.longitude;
284        }
285
286        public boolean hasLongitudeElement() { 
287          return this.longitude != null && !this.longitude.isEmpty();
288        }
289
290        public boolean hasLongitude() { 
291          return this.longitude != null && !this.longitude.isEmpty();
292        }
293
294        /**
295         * @param value {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value
296         */
297        public LocationPositionComponent setLongitudeElement(DecimalType value) { 
298          this.longitude = value;
299          return this;
300        }
301
302        /**
303         * @return Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).
304         */
305        public BigDecimal getLongitude() { 
306          return this.longitude == null ? null : this.longitude.getValue();
307        }
308
309        /**
310         * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).
311         */
312        public LocationPositionComponent setLongitude(BigDecimal value) { 
313            if (this.longitude == null)
314              this.longitude = new DecimalType();
315            this.longitude.setValue(value);
316          return this;
317        }
318
319        /**
320         * @return {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value
321         */
322        public DecimalType getLatitudeElement() { 
323          if (this.latitude == null)
324            if (Configuration.errorOnAutoCreate())
325              throw new Error("Attempt to auto-create LocationPositionComponent.latitude");
326            else if (Configuration.doAutoCreate())
327              this.latitude = new DecimalType(); // bb
328          return this.latitude;
329        }
330
331        public boolean hasLatitudeElement() { 
332          return this.latitude != null && !this.latitude.isEmpty();
333        }
334
335        public boolean hasLatitude() { 
336          return this.latitude != null && !this.latitude.isEmpty();
337        }
338
339        /**
340         * @param value {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value
341         */
342        public LocationPositionComponent setLatitudeElement(DecimalType value) { 
343          this.latitude = value;
344          return this;
345        }
346
347        /**
348         * @return Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).
349         */
350        public BigDecimal getLatitude() { 
351          return this.latitude == null ? null : this.latitude.getValue();
352        }
353
354        /**
355         * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).
356         */
357        public LocationPositionComponent setLatitude(BigDecimal value) { 
358            if (this.latitude == null)
359              this.latitude = new DecimalType();
360            this.latitude.setValue(value);
361          return this;
362        }
363
364        /**
365         * @return {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value
366         */
367        public DecimalType getAltitudeElement() { 
368          if (this.altitude == null)
369            if (Configuration.errorOnAutoCreate())
370              throw new Error("Attempt to auto-create LocationPositionComponent.altitude");
371            else if (Configuration.doAutoCreate())
372              this.altitude = new DecimalType(); // bb
373          return this.altitude;
374        }
375
376        public boolean hasAltitudeElement() { 
377          return this.altitude != null && !this.altitude.isEmpty();
378        }
379
380        public boolean hasAltitude() { 
381          return this.altitude != null && !this.altitude.isEmpty();
382        }
383
384        /**
385         * @param value {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value
386         */
387        public LocationPositionComponent setAltitudeElement(DecimalType value) { 
388          this.altitude = value;
389          return this;
390        }
391
392        /**
393         * @return Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).
394         */
395        public BigDecimal getAltitude() { 
396          return this.altitude == null ? null : this.altitude.getValue();
397        }
398
399        /**
400         * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).
401         */
402        public LocationPositionComponent setAltitude(BigDecimal value) { 
403          if (value == null)
404            this.altitude = null;
405          else {
406            if (this.altitude == null)
407              this.altitude = new DecimalType();
408            this.altitude.setValue(value);
409          }
410          return this;
411        }
412
413        protected void listChildren(List<Property> childrenList) {
414          super.listChildren(childrenList);
415          childrenList.add(new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).", 0, java.lang.Integer.MAX_VALUE, longitude));
416          childrenList.add(new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).", 0, java.lang.Integer.MAX_VALUE, latitude));
417          childrenList.add(new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).", 0, java.lang.Integer.MAX_VALUE, altitude));
418        }
419
420      @Override
421      public void setProperty(String name, Base value) throws FHIRException {
422        if (name.equals("longitude"))
423          this.longitude = castToDecimal(value); // DecimalType
424        else if (name.equals("latitude"))
425          this.latitude = castToDecimal(value); // DecimalType
426        else if (name.equals("altitude"))
427          this.altitude = castToDecimal(value); // DecimalType
428        else
429          super.setProperty(name, value);
430      }
431
432      @Override
433      public Base addChild(String name) throws FHIRException {
434        if (name.equals("longitude")) {
435          throw new FHIRException("Cannot call addChild on a primitive type Location.longitude");
436        }
437        else if (name.equals("latitude")) {
438          throw new FHIRException("Cannot call addChild on a primitive type Location.latitude");
439        }
440        else if (name.equals("altitude")) {
441          throw new FHIRException("Cannot call addChild on a primitive type Location.altitude");
442        }
443        else
444          return super.addChild(name);
445      }
446
447      public LocationPositionComponent copy() {
448        LocationPositionComponent dst = new LocationPositionComponent();
449        copyValues(dst);
450        dst.longitude = longitude == null ? null : longitude.copy();
451        dst.latitude = latitude == null ? null : latitude.copy();
452        dst.altitude = altitude == null ? null : altitude.copy();
453        return dst;
454      }
455
456      @Override
457      public boolean equalsDeep(Base other) {
458        if (!super.equalsDeep(other))
459          return false;
460        if (!(other instanceof LocationPositionComponent))
461          return false;
462        LocationPositionComponent o = (LocationPositionComponent) other;
463        return compareDeep(longitude, o.longitude, true) && compareDeep(latitude, o.latitude, true) && compareDeep(altitude, o.altitude, true)
464          ;
465      }
466
467      @Override
468      public boolean equalsShallow(Base other) {
469        if (!super.equalsShallow(other))
470          return false;
471        if (!(other instanceof LocationPositionComponent))
472          return false;
473        LocationPositionComponent o = (LocationPositionComponent) other;
474        return compareValues(longitude, o.longitude, true) && compareValues(latitude, o.latitude, true) && compareValues(altitude, o.altitude, true)
475          ;
476      }
477
478      public boolean isEmpty() {
479        return super.isEmpty() && (longitude == null || longitude.isEmpty()) && (latitude == null || latitude.isEmpty())
480           && (altitude == null || altitude.isEmpty());
481      }
482
483  public String fhirType() {
484    return "Location.position";
485
486  }
487
488  }
489
490    /**
491     * Unique code or number identifying the location to its users.
492     */
493    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
494    @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." )
495    protected List<Identifier> identifier;
496
497    /**
498     * active | suspended | inactive.
499     */
500    @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true)
501    @Description(shortDefinition="active | suspended | inactive", formalDefinition="active | suspended | inactive." )
502    protected Enumeration<LocationStatus> status;
503
504    /**
505     * Name of the location as used by humans. Does not need to be unique.
506     */
507    @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
508    @Description(shortDefinition="Name of the location as used by humans", formalDefinition="Name of the location as used by humans. Does not need to be unique." )
509    protected StringType name;
510
511    /**
512     * Description of the Location, which helps in finding or referencing the place.
513     */
514    @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
515    @Description(shortDefinition="Description of the location", formalDefinition="Description of the Location, which helps in finding or referencing the place." )
516    protected StringType description;
517
518    /**
519     * Indicates whether a resource instance represents a specific location or a class of locations.
520     */
521    @Child(name = "mode", type = {CodeType.class}, order=4, min=0, max=1, modifier=true, summary=true)
522    @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." )
523    protected Enumeration<LocationMode> mode;
524
525    /**
526     * Indicates the type of function performed at the location.
527     */
528    @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true)
529    @Description(shortDefinition="Type of function performed", formalDefinition="Indicates the type of function performed at the location." )
530    protected CodeableConcept type;
531
532    /**
533     * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.
534     */
535    @Child(name = "telecom", type = {ContactPoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
536    @Description(shortDefinition="Contact details of the location", formalDefinition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." )
537    protected List<ContactPoint> telecom;
538
539    /**
540     * Physical location.
541     */
542    @Child(name = "address", type = {Address.class}, order=7, min=0, max=1, modifier=false, summary=false)
543    @Description(shortDefinition="Physical location", formalDefinition="Physical location." )
544    protected Address address;
545
546    /**
547     * Physical form of the location, e.g. building, room, vehicle, road.
548     */
549    @Child(name = "physicalType", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
550    @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road." )
551    protected CodeableConcept physicalType;
552
553    /**
554     * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).
555     */
556    @Child(name = "position", type = {}, order=9, min=0, max=1, modifier=false, summary=false)
557    @Description(shortDefinition="The absolute geographic location", formalDefinition="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)." )
558    protected LocationPositionComponent position;
559
560    /**
561     * The organization responsible for the provisioning and upkeep of the location.
562     */
563    @Child(name = "managingOrganization", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=true)
564    @Description(shortDefinition="Organization responsible for provisioning and upkeep", formalDefinition="The organization responsible for the provisioning and upkeep of the location." )
565    protected Reference managingOrganization;
566
567    /**
568     * The actual object that is the target of the reference (The organization responsible for the provisioning and upkeep of the location.)
569     */
570    protected Organization managingOrganizationTarget;
571
572    /**
573     * Another Location which this Location is physically part of.
574     */
575    @Child(name = "partOf", type = {Location.class}, order=11, min=0, max=1, modifier=false, summary=false)
576    @Description(shortDefinition="Another Location this one is physically part of", formalDefinition="Another Location which this Location is physically part of." )
577    protected Reference partOf;
578
579    /**
580     * The actual object that is the target of the reference (Another Location which this Location is physically part of.)
581     */
582    protected Location partOfTarget;
583
584    private static final long serialVersionUID = -2100435761L;
585
586  /*
587   * Constructor
588   */
589    public Location() {
590      super();
591    }
592
593    /**
594     * @return {@link #identifier} (Unique code or number identifying the location to its users.)
595     */
596    public List<Identifier> getIdentifier() { 
597      if (this.identifier == null)
598        this.identifier = new ArrayList<Identifier>();
599      return this.identifier;
600    }
601
602    public boolean hasIdentifier() { 
603      if (this.identifier == null)
604        return false;
605      for (Identifier item : this.identifier)
606        if (!item.isEmpty())
607          return true;
608      return false;
609    }
610
611    /**
612     * @return {@link #identifier} (Unique code or number identifying the location to its users.)
613     */
614    // syntactic sugar
615    public Identifier addIdentifier() { //3
616      Identifier t = new Identifier();
617      if (this.identifier == null)
618        this.identifier = new ArrayList<Identifier>();
619      this.identifier.add(t);
620      return t;
621    }
622
623    // syntactic sugar
624    public Location addIdentifier(Identifier t) { //3
625      if (t == null)
626        return this;
627      if (this.identifier == null)
628        this.identifier = new ArrayList<Identifier>();
629      this.identifier.add(t);
630      return this;
631    }
632
633    /**
634     * @return {@link #status} (active | suspended | inactive.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
635     */
636    public Enumeration<LocationStatus> getStatusElement() { 
637      if (this.status == null)
638        if (Configuration.errorOnAutoCreate())
639          throw new Error("Attempt to auto-create Location.status");
640        else if (Configuration.doAutoCreate())
641          this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory()); // bb
642      return this.status;
643    }
644
645    public boolean hasStatusElement() { 
646      return this.status != null && !this.status.isEmpty();
647    }
648
649    public boolean hasStatus() { 
650      return this.status != null && !this.status.isEmpty();
651    }
652
653    /**
654     * @param value {@link #status} (active | suspended | inactive.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
655     */
656    public Location setStatusElement(Enumeration<LocationStatus> value) { 
657      this.status = value;
658      return this;
659    }
660
661    /**
662     * @return active | suspended | inactive.
663     */
664    public LocationStatus getStatus() { 
665      return this.status == null ? null : this.status.getValue();
666    }
667
668    /**
669     * @param value active | suspended | inactive.
670     */
671    public Location setStatus(LocationStatus value) { 
672      if (value == null)
673        this.status = null;
674      else {
675        if (this.status == null)
676          this.status = new Enumeration<LocationStatus>(new LocationStatusEnumFactory());
677        this.status.setValue(value);
678      }
679      return this;
680    }
681
682    /**
683     * @return {@link #name} (Name of the location as used by humans. Does not need to be unique.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
684     */
685    public StringType getNameElement() { 
686      if (this.name == null)
687        if (Configuration.errorOnAutoCreate())
688          throw new Error("Attempt to auto-create Location.name");
689        else if (Configuration.doAutoCreate())
690          this.name = new StringType(); // bb
691      return this.name;
692    }
693
694    public boolean hasNameElement() { 
695      return this.name != null && !this.name.isEmpty();
696    }
697
698    public boolean hasName() { 
699      return this.name != null && !this.name.isEmpty();
700    }
701
702    /**
703     * @param value {@link #name} (Name of the location as used by humans. Does not need to be unique.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
704     */
705    public Location setNameElement(StringType value) { 
706      this.name = value;
707      return this;
708    }
709
710    /**
711     * @return Name of the location as used by humans. Does not need to be unique.
712     */
713    public String getName() { 
714      return this.name == null ? null : this.name.getValue();
715    }
716
717    /**
718     * @param value Name of the location as used by humans. Does not need to be unique.
719     */
720    public Location setName(String value) { 
721      if (Utilities.noString(value))
722        this.name = null;
723      else {
724        if (this.name == null)
725          this.name = new StringType();
726        this.name.setValue(value);
727      }
728      return this;
729    }
730
731    /**
732     * @return {@link #description} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
733     */
734    public StringType getDescriptionElement() { 
735      if (this.description == null)
736        if (Configuration.errorOnAutoCreate())
737          throw new Error("Attempt to auto-create Location.description");
738        else if (Configuration.doAutoCreate())
739          this.description = new StringType(); // bb
740      return this.description;
741    }
742
743    public boolean hasDescriptionElement() { 
744      return this.description != null && !this.description.isEmpty();
745    }
746
747    public boolean hasDescription() { 
748      return this.description != null && !this.description.isEmpty();
749    }
750
751    /**
752     * @param value {@link #description} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
753     */
754    public Location setDescriptionElement(StringType value) { 
755      this.description = value;
756      return this;
757    }
758
759    /**
760     * @return Description of the Location, which helps in finding or referencing the place.
761     */
762    public String getDescription() { 
763      return this.description == null ? null : this.description.getValue();
764    }
765
766    /**
767     * @param value Description of the Location, which helps in finding or referencing the place.
768     */
769    public Location setDescription(String value) { 
770      if (Utilities.noString(value))
771        this.description = null;
772      else {
773        if (this.description == null)
774          this.description = new StringType();
775        this.description.setValue(value);
776      }
777      return this;
778    }
779
780    /**
781     * @return {@link #mode} (Indicates whether a resource instance represents a specific location or a class of locations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
782     */
783    public Enumeration<LocationMode> getModeElement() { 
784      if (this.mode == null)
785        if (Configuration.errorOnAutoCreate())
786          throw new Error("Attempt to auto-create Location.mode");
787        else if (Configuration.doAutoCreate())
788          this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory()); // bb
789      return this.mode;
790    }
791
792    public boolean hasModeElement() { 
793      return this.mode != null && !this.mode.isEmpty();
794    }
795
796    public boolean hasMode() { 
797      return this.mode != null && !this.mode.isEmpty();
798    }
799
800    /**
801     * @param value {@link #mode} (Indicates whether a resource instance represents a specific location or a class of locations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
802     */
803    public Location setModeElement(Enumeration<LocationMode> value) { 
804      this.mode = value;
805      return this;
806    }
807
808    /**
809     * @return Indicates whether a resource instance represents a specific location or a class of locations.
810     */
811    public LocationMode getMode() { 
812      return this.mode == null ? null : this.mode.getValue();
813    }
814
815    /**
816     * @param value Indicates whether a resource instance represents a specific location or a class of locations.
817     */
818    public Location setMode(LocationMode value) { 
819      if (value == null)
820        this.mode = null;
821      else {
822        if (this.mode == null)
823          this.mode = new Enumeration<LocationMode>(new LocationModeEnumFactory());
824        this.mode.setValue(value);
825      }
826      return this;
827    }
828
829    /**
830     * @return {@link #type} (Indicates the type of function performed at the location.)
831     */
832    public CodeableConcept getType() { 
833      if (this.type == null)
834        if (Configuration.errorOnAutoCreate())
835          throw new Error("Attempt to auto-create Location.type");
836        else if (Configuration.doAutoCreate())
837          this.type = new CodeableConcept(); // cc
838      return this.type;
839    }
840
841    public boolean hasType() { 
842      return this.type != null && !this.type.isEmpty();
843    }
844
845    /**
846     * @param value {@link #type} (Indicates the type of function performed at the location.)
847     */
848    public Location setType(CodeableConcept value) { 
849      this.type = value;
850      return this;
851    }
852
853    /**
854     * @return {@link #telecom} (The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.)
855     */
856    public List<ContactPoint> getTelecom() { 
857      if (this.telecom == null)
858        this.telecom = new ArrayList<ContactPoint>();
859      return this.telecom;
860    }
861
862    public boolean hasTelecom() { 
863      if (this.telecom == null)
864        return false;
865      for (ContactPoint item : this.telecom)
866        if (!item.isEmpty())
867          return true;
868      return false;
869    }
870
871    /**
872     * @return {@link #telecom} (The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.)
873     */
874    // syntactic sugar
875    public ContactPoint addTelecom() { //3
876      ContactPoint t = new ContactPoint();
877      if (this.telecom == null)
878        this.telecom = new ArrayList<ContactPoint>();
879      this.telecom.add(t);
880      return t;
881    }
882
883    // syntactic sugar
884    public Location addTelecom(ContactPoint t) { //3
885      if (t == null)
886        return this;
887      if (this.telecom == null)
888        this.telecom = new ArrayList<ContactPoint>();
889      this.telecom.add(t);
890      return this;
891    }
892
893    /**
894     * @return {@link #address} (Physical location.)
895     */
896    public Address getAddress() { 
897      if (this.address == null)
898        if (Configuration.errorOnAutoCreate())
899          throw new Error("Attempt to auto-create Location.address");
900        else if (Configuration.doAutoCreate())
901          this.address = new Address(); // cc
902      return this.address;
903    }
904
905    public boolean hasAddress() { 
906      return this.address != null && !this.address.isEmpty();
907    }
908
909    /**
910     * @param value {@link #address} (Physical location.)
911     */
912    public Location setAddress(Address value) { 
913      this.address = value;
914      return this;
915    }
916
917    /**
918     * @return {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.)
919     */
920    public CodeableConcept getPhysicalType() { 
921      if (this.physicalType == null)
922        if (Configuration.errorOnAutoCreate())
923          throw new Error("Attempt to auto-create Location.physicalType");
924        else if (Configuration.doAutoCreate())
925          this.physicalType = new CodeableConcept(); // cc
926      return this.physicalType;
927    }
928
929    public boolean hasPhysicalType() { 
930      return this.physicalType != null && !this.physicalType.isEmpty();
931    }
932
933    /**
934     * @param value {@link #physicalType} (Physical form of the location, e.g. building, room, vehicle, road.)
935     */
936    public Location setPhysicalType(CodeableConcept value) { 
937      this.physicalType = value;
938      return this;
939    }
940
941    /**
942     * @return {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).)
943     */
944    public LocationPositionComponent getPosition() { 
945      if (this.position == null)
946        if (Configuration.errorOnAutoCreate())
947          throw new Error("Attempt to auto-create Location.position");
948        else if (Configuration.doAutoCreate())
949          this.position = new LocationPositionComponent(); // cc
950      return this.position;
951    }
952
953    public boolean hasPosition() { 
954      return this.position != null && !this.position.isEmpty();
955    }
956
957    /**
958     * @param value {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).)
959     */
960    public Location setPosition(LocationPositionComponent value) { 
961      this.position = value;
962      return this;
963    }
964
965    /**
966     * @return {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.)
967     */
968    public Reference getManagingOrganization() { 
969      if (this.managingOrganization == null)
970        if (Configuration.errorOnAutoCreate())
971          throw new Error("Attempt to auto-create Location.managingOrganization");
972        else if (Configuration.doAutoCreate())
973          this.managingOrganization = new Reference(); // cc
974      return this.managingOrganization;
975    }
976
977    public boolean hasManagingOrganization() { 
978      return this.managingOrganization != null && !this.managingOrganization.isEmpty();
979    }
980
981    /**
982     * @param value {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.)
983     */
984    public Location setManagingOrganization(Reference value) { 
985      this.managingOrganization = value;
986      return this;
987    }
988
989    /**
990     * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for the provisioning and upkeep of the location.)
991     */
992    public Organization getManagingOrganizationTarget() { 
993      if (this.managingOrganizationTarget == null)
994        if (Configuration.errorOnAutoCreate())
995          throw new Error("Attempt to auto-create Location.managingOrganization");
996        else if (Configuration.doAutoCreate())
997          this.managingOrganizationTarget = new Organization(); // aa
998      return this.managingOrganizationTarget;
999    }
1000
1001    /**
1002     * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for the provisioning and upkeep of the location.)
1003     */
1004    public Location setManagingOrganizationTarget(Organization value) { 
1005      this.managingOrganizationTarget = value;
1006      return this;
1007    }
1008
1009    /**
1010     * @return {@link #partOf} (Another Location which this Location is physically part of.)
1011     */
1012    public Reference getPartOf() { 
1013      if (this.partOf == null)
1014        if (Configuration.errorOnAutoCreate())
1015          throw new Error("Attempt to auto-create Location.partOf");
1016        else if (Configuration.doAutoCreate())
1017          this.partOf = new Reference(); // cc
1018      return this.partOf;
1019    }
1020
1021    public boolean hasPartOf() { 
1022      return this.partOf != null && !this.partOf.isEmpty();
1023    }
1024
1025    /**
1026     * @param value {@link #partOf} (Another Location which this Location is physically part of.)
1027     */
1028    public Location setPartOf(Reference value) { 
1029      this.partOf = value;
1030      return this;
1031    }
1032
1033    /**
1034     * @return {@link #partOf} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another Location which this Location is physically part of.)
1035     */
1036    public Location getPartOfTarget() { 
1037      if (this.partOfTarget == null)
1038        if (Configuration.errorOnAutoCreate())
1039          throw new Error("Attempt to auto-create Location.partOf");
1040        else if (Configuration.doAutoCreate())
1041          this.partOfTarget = new Location(); // aa
1042      return this.partOfTarget;
1043    }
1044
1045    /**
1046     * @param value {@link #partOf} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another Location which this Location is physically part of.)
1047     */
1048    public Location setPartOfTarget(Location value) { 
1049      this.partOfTarget = value;
1050      return this;
1051    }
1052
1053      protected void listChildren(List<Property> childrenList) {
1054        super.listChildren(childrenList);
1055        childrenList.add(new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier));
1056        childrenList.add(new Property("status", "code", "active | suspended | inactive.", 0, java.lang.Integer.MAX_VALUE, status));
1057        childrenList.add(new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, java.lang.Integer.MAX_VALUE, name));
1058        childrenList.add(new Property("description", "string", "Description of the Location, which helps in finding or referencing the place.", 0, java.lang.Integer.MAX_VALUE, description));
1059        childrenList.add(new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, java.lang.Integer.MAX_VALUE, mode));
1060        childrenList.add(new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type));
1061        childrenList.add(new Property("telecom", "ContactPoint", "The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, telecom));
1062        childrenList.add(new Property("address", "Address", "Physical location.", 0, java.lang.Integer.MAX_VALUE, address));
1063        childrenList.add(new Property("physicalType", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road.", 0, java.lang.Integer.MAX_VALUE, physicalType));
1064        childrenList.add(new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, java.lang.Integer.MAX_VALUE, position));
1065        childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, java.lang.Integer.MAX_VALUE, managingOrganization));
1066        childrenList.add(new Property("partOf", "Reference(Location)", "Another Location which this Location is physically part of.", 0, java.lang.Integer.MAX_VALUE, partOf));
1067      }
1068
1069      @Override
1070      public void setProperty(String name, Base value) throws FHIRException {
1071        if (name.equals("identifier"))
1072          this.getIdentifier().add(castToIdentifier(value));
1073        else if (name.equals("status"))
1074          this.status = new LocationStatusEnumFactory().fromType(value); // Enumeration<LocationStatus>
1075        else if (name.equals("name"))
1076          this.name = castToString(value); // StringType
1077        else if (name.equals("description"))
1078          this.description = castToString(value); // StringType
1079        else if (name.equals("mode"))
1080          this.mode = new LocationModeEnumFactory().fromType(value); // Enumeration<LocationMode>
1081        else if (name.equals("type"))
1082          this.type = castToCodeableConcept(value); // CodeableConcept
1083        else if (name.equals("telecom"))
1084          this.getTelecom().add(castToContactPoint(value));
1085        else if (name.equals("address"))
1086          this.address = castToAddress(value); // Address
1087        else if (name.equals("physicalType"))
1088          this.physicalType = castToCodeableConcept(value); // CodeableConcept
1089        else if (name.equals("position"))
1090          this.position = (LocationPositionComponent) value; // LocationPositionComponent
1091        else if (name.equals("managingOrganization"))
1092          this.managingOrganization = castToReference(value); // Reference
1093        else if (name.equals("partOf"))
1094          this.partOf = castToReference(value); // Reference
1095        else
1096          super.setProperty(name, value);
1097      }
1098
1099      @Override
1100      public Base addChild(String name) throws FHIRException {
1101        if (name.equals("identifier")) {
1102          return addIdentifier();
1103        }
1104        else if (name.equals("status")) {
1105          throw new FHIRException("Cannot call addChild on a primitive type Location.status");
1106        }
1107        else if (name.equals("name")) {
1108          throw new FHIRException("Cannot call addChild on a primitive type Location.name");
1109        }
1110        else if (name.equals("description")) {
1111          throw new FHIRException("Cannot call addChild on a primitive type Location.description");
1112        }
1113        else if (name.equals("mode")) {
1114          throw new FHIRException("Cannot call addChild on a primitive type Location.mode");
1115        }
1116        else if (name.equals("type")) {
1117          this.type = new CodeableConcept();
1118          return this.type;
1119        }
1120        else if (name.equals("telecom")) {
1121          return addTelecom();
1122        }
1123        else if (name.equals("address")) {
1124          this.address = new Address();
1125          return this.address;
1126        }
1127        else if (name.equals("physicalType")) {
1128          this.physicalType = new CodeableConcept();
1129          return this.physicalType;
1130        }
1131        else if (name.equals("position")) {
1132          this.position = new LocationPositionComponent();
1133          return this.position;
1134        }
1135        else if (name.equals("managingOrganization")) {
1136          this.managingOrganization = new Reference();
1137          return this.managingOrganization;
1138        }
1139        else if (name.equals("partOf")) {
1140          this.partOf = new Reference();
1141          return this.partOf;
1142        }
1143        else
1144          return super.addChild(name);
1145      }
1146
1147  public String fhirType() {
1148    return "Location";
1149
1150  }
1151
1152      public Location copy() {
1153        Location dst = new Location();
1154        copyValues(dst);
1155        if (identifier != null) {
1156          dst.identifier = new ArrayList<Identifier>();
1157          for (Identifier i : identifier)
1158            dst.identifier.add(i.copy());
1159        };
1160        dst.status = status == null ? null : status.copy();
1161        dst.name = name == null ? null : name.copy();
1162        dst.description = description == null ? null : description.copy();
1163        dst.mode = mode == null ? null : mode.copy();
1164        dst.type = type == null ? null : type.copy();
1165        if (telecom != null) {
1166          dst.telecom = new ArrayList<ContactPoint>();
1167          for (ContactPoint i : telecom)
1168            dst.telecom.add(i.copy());
1169        };
1170        dst.address = address == null ? null : address.copy();
1171        dst.physicalType = physicalType == null ? null : physicalType.copy();
1172        dst.position = position == null ? null : position.copy();
1173        dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy();
1174        dst.partOf = partOf == null ? null : partOf.copy();
1175        return dst;
1176      }
1177
1178      protected Location typedCopy() {
1179        return copy();
1180      }
1181
1182      @Override
1183      public boolean equalsDeep(Base other) {
1184        if (!super.equalsDeep(other))
1185          return false;
1186        if (!(other instanceof Location))
1187          return false;
1188        Location o = (Location) other;
1189        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(name, o.name, true)
1190           && compareDeep(description, o.description, true) && compareDeep(mode, o.mode, true) && compareDeep(type, o.type, true)
1191           && compareDeep(telecom, o.telecom, true) && compareDeep(address, o.address, true) && compareDeep(physicalType, o.physicalType, true)
1192           && compareDeep(position, o.position, true) && compareDeep(managingOrganization, o.managingOrganization, true)
1193           && compareDeep(partOf, o.partOf, true);
1194      }
1195
1196      @Override
1197      public boolean equalsShallow(Base other) {
1198        if (!super.equalsShallow(other))
1199          return false;
1200        if (!(other instanceof Location))
1201          return false;
1202        Location o = (Location) other;
1203        return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true)
1204           && compareValues(mode, o.mode, true);
1205      }
1206
1207      public boolean isEmpty() {
1208        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
1209           && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) && (mode == null || mode.isEmpty())
1210           && (type == null || type.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty())
1211           && (physicalType == null || physicalType.isEmpty()) && (position == null || position.isEmpty())
1212           && (managingOrganization == null || managingOrganization.isEmpty()) && (partOf == null || partOf.isEmpty())
1213          ;
1214      }
1215
1216  @Override
1217  public ResourceType getResourceType() {
1218    return ResourceType.Location;
1219   }
1220
1221  @SearchParamDefinition(name="identifier", path="Location.identifier", description="Unique code or number identifying the location to its users", type="token" )
1222  public static final String SP_IDENTIFIER = "identifier";
1223  @SearchParamDefinition(name="partof", path="Location.partOf", description="The location of which this location is a part", type="reference" )
1224  public static final String SP_PARTOF = "partof";
1225  @SearchParamDefinition(name="near-distance", path="Location.position", description="A distance quantity to limit the near search to locations within a specific distance", type="token" )
1226  public static final String SP_NEARDISTANCE = "near-distance";
1227  @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" )
1228  public static final String SP_ADDRESS = "address";
1229  @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string" )
1230  public static final String SP_ADDRESSSTATE = "address-state";
1231  @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" )
1232  public static final String SP_TYPE = "type";
1233  @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string" )
1234  public static final String SP_ADDRESSPOSTALCODE = "address-postalcode";
1235  @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string" )
1236  public static final String SP_ADDRESSCOUNTRY = "address-country";
1237  @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference" )
1238  public static final String SP_ORGANIZATION = "organization";
1239  @SearchParamDefinition(name="name", path="Location.name", description="A (portion of the) name of the location", type="string" )
1240  public static final String SP_NAME = "name";
1241  @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token" )
1242  public static final String SP_ADDRESSUSE = "address-use";
1243  @SearchParamDefinition(name="near", path="Location.position", description="The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)", type="token" )
1244  public static final String SP_NEAR = "near";
1245  @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string" )
1246  public static final String SP_ADDRESSCITY = "address-city";
1247  @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" )
1248  public static final String SP_STATUS = "status";
1249
1250}
1251