001package org.hl7.fhir.r5.openehr;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.openehr.Enumerations.*;
039import org.hl7.fhir.exceptions.FHIRException;
040import org.hl7.fhir.r5.model.*;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.Child;
043import ca.uhn.fhir.model.api.annotation.ChildOrder;
044import ca.uhn.fhir.model.api.annotation.DatatypeDef;
045import ca.uhn.fhir.model.api.annotation.Description;
046import ca.uhn.fhir.model.api.annotation.Block;
047
048/**
049 * 
050 */
051@DatatypeDef(name="WebTemplateItem")
052public class WebTemplateItem extends LogicalBase implements ICompositeType {
053
054    /**
055     * 
056     */
057    @Child(name = "id", type = {StringType.class}, order=0, min=1, max=1, modifier=false, summary=false)
058    @Description(shortDefinition="Node ID (this ID is needed when input data is converted to a composition)", formalDefinition="" )
059    protected StringType id;
060
061    /**
062     * 
063     */
064    @Child(name = "depth", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=false)
065    @Description(shortDefinition="todo", formalDefinition="" )
066    protected IntegerType depth;
067
068    /**
069     * 
070     */
071    @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
072    @Description(shortDefinition="Default node name", formalDefinition="" )
073    protected StringType name;
074
075    /**
076     * 
077     */
078    @Child(name = "localizedName", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
079    @Description(shortDefinition="Node name in the default language", formalDefinition="" )
080    protected StringType localizedName;
081
082    /**
083     * 
084     */
085    @Child(name = "rmType", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false)
086    @Description(shortDefinition="Reference Model class name for this node", formalDefinition="" )
087    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="https://specifications.openehr.org/fhir/valueset-item-rmtype")
088    protected CodeType rmType;
089
090    /**
091     * 
092     */
093    @Child(name = "nodeId", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
094    @Description(shortDefinition="Archetype node id as either a full openEHR-EHR-xxxxx archetype id or just an at-code", formalDefinition="" )
095    protected StringType nodeId;
096
097    /**
098     * 
099     */
100    @Child(name = "min", type = {StringType.class}, order=6, min=1, max=1, modifier=false, summary=false)
101    @Description(shortDefinition="Minimal value of occurrences for this node (this node has to appear at least this many times)", formalDefinition="" )
102    protected StringType min;
103
104    /**
105     * 
106     */
107    @Child(name = "max", type = {StringType.class}, order=7, min=1, max=1, modifier=false, summary=false)
108    @Description(shortDefinition="Maximal value of occurrences for this node or -1 if unlimited. When converting to a composition this node should not appear more than this many times.", formalDefinition="" )
109    protected StringType max;
110
111    /**
112     * 
113     */
114    @Child(name = "dependsOn", type = {StringType.class}, order=8, min=1, max=1, modifier=false, summary=false)
115    @Description(shortDefinition="todo", formalDefinition="" )
116    protected StringType dependsOn;
117
118    /**
119     * 
120     */
121    @Child(name = "localizedNames", type = {TranslatedString.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
122    @Description(shortDefinition="Map with labels in additional languages", formalDefinition="" )
123    protected List<TranslatedString> localizedNamesList;
124
125    /**
126     * 
127     */
128    @Child(name = "localizedDescriptions", type = {TranslatedString.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
129    @Description(shortDefinition="Map with element descriptions", formalDefinition="" )
130    protected List<TranslatedString> localizedDescriptionsList;
131
132    /**
133     * 
134     */
135    @Child(name = "annotations", type = {Annotations.class}, order=11, min=0, max=1, modifier=false, summary=false)
136    @Description(shortDefinition="todo", formalDefinition="" )
137    protected Annotations annotations;
138
139    /**
140     * 
141     */
142    @Child(name = "archetype_id", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false)
143    @Description(shortDefinition="todo", formalDefinition="" )
144    protected StringType archetype_id;
145
146    /**
147     * 
148     */
149    @Child(name = "aqlPath", type = {StringType.class}, order=13, min=1, max=1, modifier=false, summary=false)
150    @Description(shortDefinition="AQL (or RM) path to this node. Such paths can be used in AQLs", formalDefinition="" )
151    protected StringType aqlPath;
152
153    /**
154     * 
155     */
156    @Child(name = "custodian_namespace", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false)
157    @Description(shortDefinition="todo", formalDefinition="" )
158    protected StringType custodian_namespace;
159
160    /**
161     * 
162     */
163    @Child(name = "custodian_organisation", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false)
164    @Description(shortDefinition="todo", formalDefinition="" )
165    protected StringType custodian_organisation;
166
167    /**
168     * 
169     */
170    @Child(name = "lifecycleState", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false)
171    @Description(shortDefinition="todo", formalDefinition="" )
172    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="https://specifications.openehr.org/fhir/valueset-item-lifecyclestate")
173    protected CodeType lifecycleState;
174
175    /**
176     * 
177     */
178    @Child(name = "original_namespace", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false)
179    @Description(shortDefinition="todo", formalDefinition="" )
180    protected StringType original_namespace;
181
182    /**
183     * 
184     */
185    @Child(name = "original_publisher", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false)
186    @Description(shortDefinition="todo", formalDefinition="" )
187    protected StringType original_publisher;
188
189    /**
190     * 
191     */
192    @Child(name = "proportionTypes", type = {CodeType.class}, order=19, min=0, max=1, modifier=false, summary=false)
193    @Description(shortDefinition="todo", formalDefinition="" )
194    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="https://specifications.openehr.org/fhir/valueset-item-proportiontype")
195    protected CodeType proportionTypes;
196
197    /**
198     * 
199     */
200    @Child(name = "revision", type = {StringType.class}, order=20, min=0, max=1, modifier=false, summary=false)
201    @Description(shortDefinition="todo", formalDefinition="" )
202    protected StringType revision;
203
204    /**
205     * 
206     */
207    @Child(name = "inContext", type = {BooleanType.class}, order=21, min=0, max=1, modifier=false, summary=false)
208    @Description(shortDefinition="todo", formalDefinition="" )
209    protected BooleanType inContext;
210
211    /**
212     * 
213     */
214    @Child(name = "inputs", type = {WebTemplateInput.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
215    @Description(shortDefinition="Used for creating input fields. the inputs are determined by the attributes for a particular datatype", formalDefinition="" )
216    protected List<WebTemplateInput> inputsList;
217
218    /**
219     * 
220     */
221    @Child(name = "termBindings", type = {WebTemplateTermBinding.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
222    @Description(shortDefinition="todo", formalDefinition="" )
223    protected List<WebTemplateTermBinding> termBindingsList;
224
225    /**
226     * 
227     */
228    @Child(name = "children", type = {WebTemplateItem.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
229    @Description(shortDefinition="todo", formalDefinition="" )
230    protected List<WebTemplateItem> childrenList;
231
232    private static final long serialVersionUID = -1765598574L;
233
234  /**
235   * Constructor
236   */
237    public WebTemplateItem() {
238      super();
239    }
240
241  /**
242   * Constructor
243   */
244    public WebTemplateItem(String id, String rmType, String min, String max, String dependsOn, String aqlPath) {
245      super();
246      this.setId(id);
247      this.setRmType(rmType);
248      this.setMin(min);
249      this.setMax(max);
250      this.setDependsOn(dependsOn);
251      this.setAqlPath(aqlPath);
252    }
253
254    /**
255     * @return {@link #id} (). This is the underlying object with id, value and extensions. The accessor "getId" gives direct access to the value
256     */
257    public StringType getIdElement() { 
258      if (this.id == null)
259        if (Configuration.errorOnAutoCreate())
260          throw new Error("Attempt to auto-create WebTemplateItem.id");
261        else if (Configuration.doAutoCreate())
262          this.id = new StringType(); // bb
263      return this.id;
264    }
265
266    public boolean hasIdElement() { 
267      return this.id != null && !this.id.isEmpty();
268    }
269
270    public boolean hasId() { 
271      return this.id != null && !this.id.isEmpty();
272    }
273
274    /**
275     * @param value {@link #id} (). This is the underlying object with id, value and extensions. The accessor "getId" gives direct access to the value
276     */
277    public WebTemplateItem setIdElement(StringType value) { 
278      this.id = value;
279      return this;
280    }
281
282    /**
283     * @return 
284     */
285    public String getId() { 
286      return this.id == null ? null : this.id.getValue();
287    }
288
289    /**
290     * @param value 
291     */
292    public WebTemplateItem setId(String value) { 
293        if (this.id == null)
294          this.id = new StringType();
295        this.id.setValue(value);
296      return this;
297    }
298
299    /**
300     * @return {@link #depth} (). This is the underlying object with id, value and extensions. The accessor "getDepth" gives direct access to the value
301     */
302    public IntegerType getDepthElement() { 
303      if (this.depth == null)
304        if (Configuration.errorOnAutoCreate())
305          throw new Error("Attempt to auto-create WebTemplateItem.depth");
306        else if (Configuration.doAutoCreate())
307          this.depth = new IntegerType(); // bb
308      return this.depth;
309    }
310
311    public boolean hasDepthElement() { 
312      return this.depth != null && !this.depth.isEmpty();
313    }
314
315    public boolean hasDepth() { 
316      return this.depth != null && !this.depth.isEmpty();
317    }
318
319    /**
320     * @param value {@link #depth} (). This is the underlying object with id, value and extensions. The accessor "getDepth" gives direct access to the value
321     */
322    public WebTemplateItem setDepthElement(IntegerType value) { 
323      this.depth = value;
324      return this;
325    }
326
327    /**
328     * @return 
329     */
330    public int getDepth() { 
331      return this.depth == null || this.depth.isEmpty() ? 0 : this.depth.getValue();
332    }
333
334    /**
335     * @param value 
336     */
337    public WebTemplateItem setDepth(int value) { 
338        if (this.depth == null)
339          this.depth = new IntegerType();
340        this.depth.setValue(value);
341      return this;
342    }
343
344    /**
345     * @return {@link #name} (). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
346     */
347    public StringType getNameElement() { 
348      if (this.name == null)
349        if (Configuration.errorOnAutoCreate())
350          throw new Error("Attempt to auto-create WebTemplateItem.name");
351        else if (Configuration.doAutoCreate())
352          this.name = new StringType(); // bb
353      return this.name;
354    }
355
356    public boolean hasNameElement() { 
357      return this.name != null && !this.name.isEmpty();
358    }
359
360    public boolean hasName() { 
361      return this.name != null && !this.name.isEmpty();
362    }
363
364    /**
365     * @param value {@link #name} (). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
366     */
367    public WebTemplateItem setNameElement(StringType value) { 
368      this.name = value;
369      return this;
370    }
371
372    /**
373     * @return 
374     */
375    public String getName() { 
376      return this.name == null ? null : this.name.getValue();
377    }
378
379    /**
380     * @param value 
381     */
382    public WebTemplateItem setName(String value) { 
383      if (Utilities.noString(value))
384        this.name = null;
385      else {
386        if (this.name == null)
387          this.name = new StringType();
388        this.name.setValue(value);
389      }
390      return this;
391    }
392
393    /**
394     * @return {@link #localizedName} (). This is the underlying object with id, value and extensions. The accessor "getLocalizedName" gives direct access to the value
395     */
396    public StringType getLocalizedNameElement() { 
397      if (this.localizedName == null)
398        if (Configuration.errorOnAutoCreate())
399          throw new Error("Attempt to auto-create WebTemplateItem.localizedName");
400        else if (Configuration.doAutoCreate())
401          this.localizedName = new StringType(); // bb
402      return this.localizedName;
403    }
404
405    public boolean hasLocalizedNameElement() { 
406      return this.localizedName != null && !this.localizedName.isEmpty();
407    }
408
409    public boolean hasLocalizedName() { 
410      return this.localizedName != null && !this.localizedName.isEmpty();
411    }
412
413    /**
414     * @param value {@link #localizedName} (). This is the underlying object with id, value and extensions. The accessor "getLocalizedName" gives direct access to the value
415     */
416    public WebTemplateItem setLocalizedNameElement(StringType value) { 
417      this.localizedName = value;
418      return this;
419    }
420
421    /**
422     * @return 
423     */
424    public String getLocalizedName() { 
425      return this.localizedName == null ? null : this.localizedName.getValue();
426    }
427
428    /**
429     * @param value 
430     */
431    public WebTemplateItem setLocalizedName(String value) { 
432      if (Utilities.noString(value))
433        this.localizedName = null;
434      else {
435        if (this.localizedName == null)
436          this.localizedName = new StringType();
437        this.localizedName.setValue(value);
438      }
439      return this;
440    }
441
442    /**
443     * @return {@link #rmType} (). This is the underlying object with id, value and extensions. The accessor "getRmType" gives direct access to the value
444     */
445    public CodeType getRmTypeElement() { 
446      if (this.rmType == null)
447        if (Configuration.errorOnAutoCreate())
448          throw new Error("Attempt to auto-create WebTemplateItem.rmType");
449        else if (Configuration.doAutoCreate())
450          this.rmType = new CodeType(); // bb
451      return this.rmType;
452    }
453
454    public boolean hasRmTypeElement() { 
455      return this.rmType != null && !this.rmType.isEmpty();
456    }
457
458    public boolean hasRmType() { 
459      return this.rmType != null && !this.rmType.isEmpty();
460    }
461
462    /**
463     * @param value {@link #rmType} (). This is the underlying object with id, value and extensions. The accessor "getRmType" gives direct access to the value
464     */
465    public WebTemplateItem setRmTypeElement(CodeType value) { 
466      this.rmType = value;
467      return this;
468    }
469
470    /**
471     * @return 
472     */
473    public String getRmType() { 
474      return this.rmType == null ? null : this.rmType.getValue();
475    }
476
477    /**
478     * @param value 
479     */
480    public WebTemplateItem setRmType(String value) { 
481        if (this.rmType == null)
482          this.rmType = new CodeType();
483        this.rmType.setValue(value);
484      return this;
485    }
486
487    /**
488     * @return {@link #nodeId} (). This is the underlying object with id, value and extensions. The accessor "getNodeId" gives direct access to the value
489     */
490    public StringType getNodeIdElement() { 
491      if (this.nodeId == null)
492        if (Configuration.errorOnAutoCreate())
493          throw new Error("Attempt to auto-create WebTemplateItem.nodeId");
494        else if (Configuration.doAutoCreate())
495          this.nodeId = new StringType(); // bb
496      return this.nodeId;
497    }
498
499    public boolean hasNodeIdElement() { 
500      return this.nodeId != null && !this.nodeId.isEmpty();
501    }
502
503    public boolean hasNodeId() { 
504      return this.nodeId != null && !this.nodeId.isEmpty();
505    }
506
507    /**
508     * @param value {@link #nodeId} (). This is the underlying object with id, value and extensions. The accessor "getNodeId" gives direct access to the value
509     */
510    public WebTemplateItem setNodeIdElement(StringType value) { 
511      this.nodeId = value;
512      return this;
513    }
514
515    /**
516     * @return 
517     */
518    public String getNodeId() { 
519      return this.nodeId == null ? null : this.nodeId.getValue();
520    }
521
522    /**
523     * @param value 
524     */
525    public WebTemplateItem setNodeId(String value) { 
526      if (Utilities.noString(value))
527        this.nodeId = null;
528      else {
529        if (this.nodeId == null)
530          this.nodeId = new StringType();
531        this.nodeId.setValue(value);
532      }
533      return this;
534    }
535
536    /**
537     * @return {@link #min} (). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value
538     */
539    public StringType getMinElement() { 
540      if (this.min == null)
541        if (Configuration.errorOnAutoCreate())
542          throw new Error("Attempt to auto-create WebTemplateItem.min");
543        else if (Configuration.doAutoCreate())
544          this.min = new StringType(); // bb
545      return this.min;
546    }
547
548    public boolean hasMinElement() { 
549      return this.min != null && !this.min.isEmpty();
550    }
551
552    public boolean hasMin() { 
553      return this.min != null && !this.min.isEmpty();
554    }
555
556    /**
557     * @param value {@link #min} (). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value
558     */
559    public WebTemplateItem setMinElement(StringType value) { 
560      this.min = value;
561      return this;
562    }
563
564    /**
565     * @return 
566     */
567    public String getMin() { 
568      return this.min == null ? null : this.min.getValue();
569    }
570
571    /**
572     * @param value 
573     */
574    public WebTemplateItem setMin(String value) { 
575        if (this.min == null)
576          this.min = new StringType();
577        this.min.setValue(value);
578      return this;
579    }
580
581    /**
582     * @return {@link #max} (). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value
583     */
584    public StringType getMaxElement() { 
585      if (this.max == null)
586        if (Configuration.errorOnAutoCreate())
587          throw new Error("Attempt to auto-create WebTemplateItem.max");
588        else if (Configuration.doAutoCreate())
589          this.max = new StringType(); // bb
590      return this.max;
591    }
592
593    public boolean hasMaxElement() { 
594      return this.max != null && !this.max.isEmpty();
595    }
596
597    public boolean hasMax() { 
598      return this.max != null && !this.max.isEmpty();
599    }
600
601    /**
602     * @param value {@link #max} (). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value
603     */
604    public WebTemplateItem setMaxElement(StringType value) { 
605      this.max = value;
606      return this;
607    }
608
609    /**
610     * @return 
611     */
612    public String getMax() { 
613      return this.max == null ? null : this.max.getValue();
614    }
615
616    /**
617     * @param value 
618     */
619    public WebTemplateItem setMax(String value) { 
620        if (this.max == null)
621          this.max = new StringType();
622        this.max.setValue(value);
623      return this;
624    }
625
626    /**
627     * @return {@link #dependsOn} (). This is the underlying object with id, value and extensions. The accessor "getDependsOn" gives direct access to the value
628     */
629    public StringType getDependsOnElement() { 
630      if (this.dependsOn == null)
631        if (Configuration.errorOnAutoCreate())
632          throw new Error("Attempt to auto-create WebTemplateItem.dependsOn");
633        else if (Configuration.doAutoCreate())
634          this.dependsOn = new StringType(); // bb
635      return this.dependsOn;
636    }
637
638    public boolean hasDependsOnElement() { 
639      return this.dependsOn != null && !this.dependsOn.isEmpty();
640    }
641
642    public boolean hasDependsOn() { 
643      return this.dependsOn != null && !this.dependsOn.isEmpty();
644    }
645
646    /**
647     * @param value {@link #dependsOn} (). This is the underlying object with id, value and extensions. The accessor "getDependsOn" gives direct access to the value
648     */
649    public WebTemplateItem setDependsOnElement(StringType value) { 
650      this.dependsOn = value;
651      return this;
652    }
653
654    /**
655     * @return 
656     */
657    public String getDependsOn() { 
658      return this.dependsOn == null ? null : this.dependsOn.getValue();
659    }
660
661    /**
662     * @param value 
663     */
664    public WebTemplateItem setDependsOn(String value) { 
665        if (this.dependsOn == null)
666          this.dependsOn = new StringType();
667        this.dependsOn.setValue(value);
668      return this;
669    }
670
671    /**
672     * @return {@link #localizedNames} ()
673     */
674    public List<TranslatedString> getLocalizedNamesList() { 
675      if (this.localizedNamesList == null)
676        this.localizedNamesList = new ArrayList<TranslatedString>();
677      return this.localizedNamesList;
678    }
679
680    /**
681     * @return Returns a reference to <code>this</code> for easy method chaining
682     */
683    public WebTemplateItem setLocalizedNamesList(List<TranslatedString> theLocalizedNames) { 
684      this.localizedNamesList = theLocalizedNames;
685      return this;
686    }
687
688    public boolean hasLocalizedNames() { 
689      if (this.localizedNamesList == null)
690        return false;
691      for (TranslatedString item : this.localizedNamesList)
692        if (!item.isEmpty())
693          return true;
694      return false;
695    }
696
697    public TranslatedString addLocalizedNames() { //3a
698      TranslatedString t = new TranslatedString();
699      if (this.localizedNamesList == null)
700        this.localizedNamesList = new ArrayList<TranslatedString>();
701      this.localizedNamesList.add(t);
702      return t;
703    }
704
705    public WebTemplateItem addLocalizedNames(TranslatedString t) { //3b
706      if (t == null)
707        return this;
708      if (this.localizedNamesList == null)
709        this.localizedNamesList = new ArrayList<TranslatedString>();
710      this.localizedNamesList.add(t);
711      return this;
712    }
713
714    /**
715     * @return The first repetition of repeating field {@link #localizedNames}, creating it if it does not already exist {3}
716     */
717    public TranslatedString getLocalizedNamesFirstRep() { 
718      if (getLocalizedNamesList().isEmpty()) {
719        addLocalizedNames();
720      }
721      return getLocalizedNamesList().get(0);
722    }
723
724    /**
725     * @return {@link #localizedDescriptions} ()
726     */
727    public List<TranslatedString> getLocalizedDescriptionsList() { 
728      if (this.localizedDescriptionsList == null)
729        this.localizedDescriptionsList = new ArrayList<TranslatedString>();
730      return this.localizedDescriptionsList;
731    }
732
733    /**
734     * @return Returns a reference to <code>this</code> for easy method chaining
735     */
736    public WebTemplateItem setLocalizedDescriptionsList(List<TranslatedString> theLocalizedDescriptions) { 
737      this.localizedDescriptionsList = theLocalizedDescriptions;
738      return this;
739    }
740
741    public boolean hasLocalizedDescriptions() { 
742      if (this.localizedDescriptionsList == null)
743        return false;
744      for (TranslatedString item : this.localizedDescriptionsList)
745        if (!item.isEmpty())
746          return true;
747      return false;
748    }
749
750    public TranslatedString addLocalizedDescriptions() { //3a
751      TranslatedString t = new TranslatedString();
752      if (this.localizedDescriptionsList == null)
753        this.localizedDescriptionsList = new ArrayList<TranslatedString>();
754      this.localizedDescriptionsList.add(t);
755      return t;
756    }
757
758    public WebTemplateItem addLocalizedDescriptions(TranslatedString t) { //3b
759      if (t == null)
760        return this;
761      if (this.localizedDescriptionsList == null)
762        this.localizedDescriptionsList = new ArrayList<TranslatedString>();
763      this.localizedDescriptionsList.add(t);
764      return this;
765    }
766
767    /**
768     * @return The first repetition of repeating field {@link #localizedDescriptions}, creating it if it does not already exist {3}
769     */
770    public TranslatedString getLocalizedDescriptionsFirstRep() { 
771      if (getLocalizedDescriptionsList().isEmpty()) {
772        addLocalizedDescriptions();
773      }
774      return getLocalizedDescriptionsList().get(0);
775    }
776
777    /**
778     * @return {@link #annotations} ()
779     */
780    public Annotations getAnnotations() { 
781      if (this.annotations == null)
782        if (Configuration.errorOnAutoCreate())
783          throw new Error("Attempt to auto-create WebTemplateItem.annotations");
784        else if (Configuration.doAutoCreate())
785          this.annotations = new Annotations(); // cc
786      return this.annotations;
787    }
788
789    public boolean hasAnnotations() { 
790      return this.annotations != null && !this.annotations.isEmpty();
791    }
792
793    /**
794     * @param value {@link #annotations} ()
795     */
796    public WebTemplateItem setAnnotations(Annotations value) { 
797      this.annotations = value;
798      return this;
799    }
800
801    /**
802     * @return {@link #archetype_id} (). This is the underlying object with id, value and extensions. The accessor "getArchetype_id" gives direct access to the value
803     */
804    public StringType getArchetype_idElement() { 
805      if (this.archetype_id == null)
806        if (Configuration.errorOnAutoCreate())
807          throw new Error("Attempt to auto-create WebTemplateItem.archetype_id");
808        else if (Configuration.doAutoCreate())
809          this.archetype_id = new StringType(); // bb
810      return this.archetype_id;
811    }
812
813    public boolean hasArchetype_idElement() { 
814      return this.archetype_id != null && !this.archetype_id.isEmpty();
815    }
816
817    public boolean hasArchetype_id() { 
818      return this.archetype_id != null && !this.archetype_id.isEmpty();
819    }
820
821    /**
822     * @param value {@link #archetype_id} (). This is the underlying object with id, value and extensions. The accessor "getArchetype_id" gives direct access to the value
823     */
824    public WebTemplateItem setArchetype_idElement(StringType value) { 
825      this.archetype_id = value;
826      return this;
827    }
828
829    /**
830     * @return 
831     */
832    public String getArchetype_id() { 
833      return this.archetype_id == null ? null : this.archetype_id.getValue();
834    }
835
836    /**
837     * @param value 
838     */
839    public WebTemplateItem setArchetype_id(String value) { 
840      if (Utilities.noString(value))
841        this.archetype_id = null;
842      else {
843        if (this.archetype_id == null)
844          this.archetype_id = new StringType();
845        this.archetype_id.setValue(value);
846      }
847      return this;
848    }
849
850    /**
851     * @return {@link #aqlPath} (). This is the underlying object with id, value and extensions. The accessor "getAqlPath" gives direct access to the value
852     */
853    public StringType getAqlPathElement() { 
854      if (this.aqlPath == null)
855        if (Configuration.errorOnAutoCreate())
856          throw new Error("Attempt to auto-create WebTemplateItem.aqlPath");
857        else if (Configuration.doAutoCreate())
858          this.aqlPath = new StringType(); // bb
859      return this.aqlPath;
860    }
861
862    public boolean hasAqlPathElement() { 
863      return this.aqlPath != null && !this.aqlPath.isEmpty();
864    }
865
866    public boolean hasAqlPath() { 
867      return this.aqlPath != null && !this.aqlPath.isEmpty();
868    }
869
870    /**
871     * @param value {@link #aqlPath} (). This is the underlying object with id, value and extensions. The accessor "getAqlPath" gives direct access to the value
872     */
873    public WebTemplateItem setAqlPathElement(StringType value) { 
874      this.aqlPath = value;
875      return this;
876    }
877
878    /**
879     * @return 
880     */
881    public String getAqlPath() { 
882      return this.aqlPath == null ? null : this.aqlPath.getValue();
883    }
884
885    /**
886     * @param value 
887     */
888    public WebTemplateItem setAqlPath(String value) { 
889        if (this.aqlPath == null)
890          this.aqlPath = new StringType();
891        this.aqlPath.setValue(value);
892      return this;
893    }
894
895    /**
896     * @return {@link #custodian_namespace} (). This is the underlying object with id, value and extensions. The accessor "getCustodian_namespace" gives direct access to the value
897     */
898    public StringType getCustodian_namespaceElement() { 
899      if (this.custodian_namespace == null)
900        if (Configuration.errorOnAutoCreate())
901          throw new Error("Attempt to auto-create WebTemplateItem.custodian_namespace");
902        else if (Configuration.doAutoCreate())
903          this.custodian_namespace = new StringType(); // bb
904      return this.custodian_namespace;
905    }
906
907    public boolean hasCustodian_namespaceElement() { 
908      return this.custodian_namespace != null && !this.custodian_namespace.isEmpty();
909    }
910
911    public boolean hasCustodian_namespace() { 
912      return this.custodian_namespace != null && !this.custodian_namespace.isEmpty();
913    }
914
915    /**
916     * @param value {@link #custodian_namespace} (). This is the underlying object with id, value and extensions. The accessor "getCustodian_namespace" gives direct access to the value
917     */
918    public WebTemplateItem setCustodian_namespaceElement(StringType value) { 
919      this.custodian_namespace = value;
920      return this;
921    }
922
923    /**
924     * @return 
925     */
926    public String getCustodian_namespace() { 
927      return this.custodian_namespace == null ? null : this.custodian_namespace.getValue();
928    }
929
930    /**
931     * @param value 
932     */
933    public WebTemplateItem setCustodian_namespace(String value) { 
934      if (Utilities.noString(value))
935        this.custodian_namespace = null;
936      else {
937        if (this.custodian_namespace == null)
938          this.custodian_namespace = new StringType();
939        this.custodian_namespace.setValue(value);
940      }
941      return this;
942    }
943
944    /**
945     * @return {@link #custodian_organisation} (). This is the underlying object with id, value and extensions. The accessor "getCustodian_organisation" gives direct access to the value
946     */
947    public StringType getCustodian_organisationElement() { 
948      if (this.custodian_organisation == null)
949        if (Configuration.errorOnAutoCreate())
950          throw new Error("Attempt to auto-create WebTemplateItem.custodian_organisation");
951        else if (Configuration.doAutoCreate())
952          this.custodian_organisation = new StringType(); // bb
953      return this.custodian_organisation;
954    }
955
956    public boolean hasCustodian_organisationElement() { 
957      return this.custodian_organisation != null && !this.custodian_organisation.isEmpty();
958    }
959
960    public boolean hasCustodian_organisation() { 
961      return this.custodian_organisation != null && !this.custodian_organisation.isEmpty();
962    }
963
964    /**
965     * @param value {@link #custodian_organisation} (). This is the underlying object with id, value and extensions. The accessor "getCustodian_organisation" gives direct access to the value
966     */
967    public WebTemplateItem setCustodian_organisationElement(StringType value) { 
968      this.custodian_organisation = value;
969      return this;
970    }
971
972    /**
973     * @return 
974     */
975    public String getCustodian_organisation() { 
976      return this.custodian_organisation == null ? null : this.custodian_organisation.getValue();
977    }
978
979    /**
980     * @param value 
981     */
982    public WebTemplateItem setCustodian_organisation(String value) { 
983      if (Utilities.noString(value))
984        this.custodian_organisation = null;
985      else {
986        if (this.custodian_organisation == null)
987          this.custodian_organisation = new StringType();
988        this.custodian_organisation.setValue(value);
989      }
990      return this;
991    }
992
993    /**
994     * @return {@link #lifecycleState} (). This is the underlying object with id, value and extensions. The accessor "getLifecycleState" gives direct access to the value
995     */
996    public CodeType getLifecycleStateElement() { 
997      if (this.lifecycleState == null)
998        if (Configuration.errorOnAutoCreate())
999          throw new Error("Attempt to auto-create WebTemplateItem.lifecycleState");
1000        else if (Configuration.doAutoCreate())
1001          this.lifecycleState = new CodeType(); // bb
1002      return this.lifecycleState;
1003    }
1004
1005    public boolean hasLifecycleStateElement() { 
1006      return this.lifecycleState != null && !this.lifecycleState.isEmpty();
1007    }
1008
1009    public boolean hasLifecycleState() { 
1010      return this.lifecycleState != null && !this.lifecycleState.isEmpty();
1011    }
1012
1013    /**
1014     * @param value {@link #lifecycleState} (). This is the underlying object with id, value and extensions. The accessor "getLifecycleState" gives direct access to the value
1015     */
1016    public WebTemplateItem setLifecycleStateElement(CodeType value) { 
1017      this.lifecycleState = value;
1018      return this;
1019    }
1020
1021    /**
1022     * @return 
1023     */
1024    public String getLifecycleState() { 
1025      return this.lifecycleState == null ? null : this.lifecycleState.getValue();
1026    }
1027
1028    /**
1029     * @param value 
1030     */
1031    public WebTemplateItem setLifecycleState(String value) { 
1032      if (Utilities.noString(value))
1033        this.lifecycleState = null;
1034      else {
1035        if (this.lifecycleState == null)
1036          this.lifecycleState = new CodeType();
1037        this.lifecycleState.setValue(value);
1038      }
1039      return this;
1040    }
1041
1042    /**
1043     * @return {@link #original_namespace} (). This is the underlying object with id, value and extensions. The accessor "getOriginal_namespace" gives direct access to the value
1044     */
1045    public StringType getOriginal_namespaceElement() { 
1046      if (this.original_namespace == null)
1047        if (Configuration.errorOnAutoCreate())
1048          throw new Error("Attempt to auto-create WebTemplateItem.original_namespace");
1049        else if (Configuration.doAutoCreate())
1050          this.original_namespace = new StringType(); // bb
1051      return this.original_namespace;
1052    }
1053
1054    public boolean hasOriginal_namespaceElement() { 
1055      return this.original_namespace != null && !this.original_namespace.isEmpty();
1056    }
1057
1058    public boolean hasOriginal_namespace() { 
1059      return this.original_namespace != null && !this.original_namespace.isEmpty();
1060    }
1061
1062    /**
1063     * @param value {@link #original_namespace} (). This is the underlying object with id, value and extensions. The accessor "getOriginal_namespace" gives direct access to the value
1064     */
1065    public WebTemplateItem setOriginal_namespaceElement(StringType value) { 
1066      this.original_namespace = value;
1067      return this;
1068    }
1069
1070    /**
1071     * @return 
1072     */
1073    public String getOriginal_namespace() { 
1074      return this.original_namespace == null ? null : this.original_namespace.getValue();
1075    }
1076
1077    /**
1078     * @param value 
1079     */
1080    public WebTemplateItem setOriginal_namespace(String value) { 
1081      if (Utilities.noString(value))
1082        this.original_namespace = null;
1083      else {
1084        if (this.original_namespace == null)
1085          this.original_namespace = new StringType();
1086        this.original_namespace.setValue(value);
1087      }
1088      return this;
1089    }
1090
1091    /**
1092     * @return {@link #original_publisher} (). This is the underlying object with id, value and extensions. The accessor "getOriginal_publisher" gives direct access to the value
1093     */
1094    public StringType getOriginal_publisherElement() { 
1095      if (this.original_publisher == null)
1096        if (Configuration.errorOnAutoCreate())
1097          throw new Error("Attempt to auto-create WebTemplateItem.original_publisher");
1098        else if (Configuration.doAutoCreate())
1099          this.original_publisher = new StringType(); // bb
1100      return this.original_publisher;
1101    }
1102
1103    public boolean hasOriginal_publisherElement() { 
1104      return this.original_publisher != null && !this.original_publisher.isEmpty();
1105    }
1106
1107    public boolean hasOriginal_publisher() { 
1108      return this.original_publisher != null && !this.original_publisher.isEmpty();
1109    }
1110
1111    /**
1112     * @param value {@link #original_publisher} (). This is the underlying object with id, value and extensions. The accessor "getOriginal_publisher" gives direct access to the value
1113     */
1114    public WebTemplateItem setOriginal_publisherElement(StringType value) { 
1115      this.original_publisher = value;
1116      return this;
1117    }
1118
1119    /**
1120     * @return 
1121     */
1122    public String getOriginal_publisher() { 
1123      return this.original_publisher == null ? null : this.original_publisher.getValue();
1124    }
1125
1126    /**
1127     * @param value 
1128     */
1129    public WebTemplateItem setOriginal_publisher(String value) { 
1130      if (Utilities.noString(value))
1131        this.original_publisher = null;
1132      else {
1133        if (this.original_publisher == null)
1134          this.original_publisher = new StringType();
1135        this.original_publisher.setValue(value);
1136      }
1137      return this;
1138    }
1139
1140    /**
1141     * @return {@link #proportionTypes} (). This is the underlying object with id, value and extensions. The accessor "getProportionTypes" gives direct access to the value
1142     */
1143    public CodeType getProportionTypesElement() { 
1144      if (this.proportionTypes == null)
1145        if (Configuration.errorOnAutoCreate())
1146          throw new Error("Attempt to auto-create WebTemplateItem.proportionTypes");
1147        else if (Configuration.doAutoCreate())
1148          this.proportionTypes = new CodeType(); // bb
1149      return this.proportionTypes;
1150    }
1151
1152    public boolean hasProportionTypesElement() { 
1153      return this.proportionTypes != null && !this.proportionTypes.isEmpty();
1154    }
1155
1156    public boolean hasProportionTypes() { 
1157      return this.proportionTypes != null && !this.proportionTypes.isEmpty();
1158    }
1159
1160    /**
1161     * @param value {@link #proportionTypes} (). This is the underlying object with id, value and extensions. The accessor "getProportionTypes" gives direct access to the value
1162     */
1163    public WebTemplateItem setProportionTypesElement(CodeType value) { 
1164      this.proportionTypes = value;
1165      return this;
1166    }
1167
1168    /**
1169     * @return 
1170     */
1171    public String getProportionTypes() { 
1172      return this.proportionTypes == null ? null : this.proportionTypes.getValue();
1173    }
1174
1175    /**
1176     * @param value 
1177     */
1178    public WebTemplateItem setProportionTypes(String value) { 
1179      if (Utilities.noString(value))
1180        this.proportionTypes = null;
1181      else {
1182        if (this.proportionTypes == null)
1183          this.proportionTypes = new CodeType();
1184        this.proportionTypes.setValue(value);
1185      }
1186      return this;
1187    }
1188
1189    /**
1190     * @return {@link #revision} (). This is the underlying object with id, value and extensions. The accessor "getRevision" gives direct access to the value
1191     */
1192    public StringType getRevisionElement() { 
1193      if (this.revision == null)
1194        if (Configuration.errorOnAutoCreate())
1195          throw new Error("Attempt to auto-create WebTemplateItem.revision");
1196        else if (Configuration.doAutoCreate())
1197          this.revision = new StringType(); // bb
1198      return this.revision;
1199    }
1200
1201    public boolean hasRevisionElement() { 
1202      return this.revision != null && !this.revision.isEmpty();
1203    }
1204
1205    public boolean hasRevision() { 
1206      return this.revision != null && !this.revision.isEmpty();
1207    }
1208
1209    /**
1210     * @param value {@link #revision} (). This is the underlying object with id, value and extensions. The accessor "getRevision" gives direct access to the value
1211     */
1212    public WebTemplateItem setRevisionElement(StringType value) { 
1213      this.revision = value;
1214      return this;
1215    }
1216
1217    /**
1218     * @return 
1219     */
1220    public String getRevision() { 
1221      return this.revision == null ? null : this.revision.getValue();
1222    }
1223
1224    /**
1225     * @param value 
1226     */
1227    public WebTemplateItem setRevision(String value) { 
1228      if (Utilities.noString(value))
1229        this.revision = null;
1230      else {
1231        if (this.revision == null)
1232          this.revision = new StringType();
1233        this.revision.setValue(value);
1234      }
1235      return this;
1236    }
1237
1238    /**
1239     * @return {@link #inContext} (). This is the underlying object with id, value and extensions. The accessor "getInContext" gives direct access to the value
1240     */
1241    public BooleanType getInContextElement() { 
1242      if (this.inContext == null)
1243        if (Configuration.errorOnAutoCreate())
1244          throw new Error("Attempt to auto-create WebTemplateItem.inContext");
1245        else if (Configuration.doAutoCreate())
1246          this.inContext = new BooleanType(); // bb
1247      return this.inContext;
1248    }
1249
1250    public boolean hasInContextElement() { 
1251      return this.inContext != null && !this.inContext.isEmpty();
1252    }
1253
1254    public boolean hasInContext() { 
1255      return this.inContext != null && !this.inContext.isEmpty();
1256    }
1257
1258    /**
1259     * @param value {@link #inContext} (). This is the underlying object with id, value and extensions. The accessor "getInContext" gives direct access to the value
1260     */
1261    public WebTemplateItem setInContextElement(BooleanType value) { 
1262      this.inContext = value;
1263      return this;
1264    }
1265
1266    /**
1267     * @return 
1268     */
1269    public boolean getInContext() { 
1270      return this.inContext == null || this.inContext.isEmpty() ? false : this.inContext.getValue();
1271    }
1272
1273    /**
1274     * @param value 
1275     */
1276    public WebTemplateItem setInContext(boolean value) { 
1277        if (this.inContext == null)
1278          this.inContext = new BooleanType();
1279        this.inContext.setValue(value);
1280      return this;
1281    }
1282
1283    /**
1284     * @return {@link #inputs} ()
1285     */
1286    public List<WebTemplateInput> getInputsList() { 
1287      if (this.inputsList == null)
1288        this.inputsList = new ArrayList<WebTemplateInput>();
1289      return this.inputsList;
1290    }
1291
1292    /**
1293     * @return Returns a reference to <code>this</code> for easy method chaining
1294     */
1295    public WebTemplateItem setInputsList(List<WebTemplateInput> theInputs) { 
1296      this.inputsList = theInputs;
1297      return this;
1298    }
1299
1300    public boolean hasInputs() { 
1301      if (this.inputsList == null)
1302        return false;
1303      for (WebTemplateInput item : this.inputsList)
1304        if (!item.isEmpty())
1305          return true;
1306      return false;
1307    }
1308
1309    public WebTemplateInput addInputs() { //3a
1310      WebTemplateInput t = new WebTemplateInput();
1311      if (this.inputsList == null)
1312        this.inputsList = new ArrayList<WebTemplateInput>();
1313      this.inputsList.add(t);
1314      return t;
1315    }
1316
1317    public WebTemplateItem addInputs(WebTemplateInput t) { //3b
1318      if (t == null)
1319        return this;
1320      if (this.inputsList == null)
1321        this.inputsList = new ArrayList<WebTemplateInput>();
1322      this.inputsList.add(t);
1323      return this;
1324    }
1325
1326    /**
1327     * @return The first repetition of repeating field {@link #inputs}, creating it if it does not already exist {3}
1328     */
1329    public WebTemplateInput getInputsFirstRep() { 
1330      if (getInputsList().isEmpty()) {
1331        addInputs();
1332      }
1333      return getInputsList().get(0);
1334    }
1335
1336    /**
1337     * @return {@link #termBindings} ()
1338     */
1339    public List<WebTemplateTermBinding> getTermBindingsList() { 
1340      if (this.termBindingsList == null)
1341        this.termBindingsList = new ArrayList<WebTemplateTermBinding>();
1342      return this.termBindingsList;
1343    }
1344
1345    /**
1346     * @return Returns a reference to <code>this</code> for easy method chaining
1347     */
1348    public WebTemplateItem setTermBindingsList(List<WebTemplateTermBinding> theTermBindings) { 
1349      this.termBindingsList = theTermBindings;
1350      return this;
1351    }
1352
1353    public boolean hasTermBindings() { 
1354      if (this.termBindingsList == null)
1355        return false;
1356      for (WebTemplateTermBinding item : this.termBindingsList)
1357        if (!item.isEmpty())
1358          return true;
1359      return false;
1360    }
1361
1362    public WebTemplateTermBinding addTermBindings() { //3a
1363      WebTemplateTermBinding t = new WebTemplateTermBinding();
1364      if (this.termBindingsList == null)
1365        this.termBindingsList = new ArrayList<WebTemplateTermBinding>();
1366      this.termBindingsList.add(t);
1367      return t;
1368    }
1369
1370    public WebTemplateItem addTermBindings(WebTemplateTermBinding t) { //3b
1371      if (t == null)
1372        return this;
1373      if (this.termBindingsList == null)
1374        this.termBindingsList = new ArrayList<WebTemplateTermBinding>();
1375      this.termBindingsList.add(t);
1376      return this;
1377    }
1378
1379    /**
1380     * @return The first repetition of repeating field {@link #termBindings}, creating it if it does not already exist {3}
1381     */
1382    public WebTemplateTermBinding getTermBindingsFirstRep() { 
1383      if (getTermBindingsList().isEmpty()) {
1384        addTermBindings();
1385      }
1386      return getTermBindingsList().get(0);
1387    }
1388
1389    /**
1390     * @return {@link #children} ()
1391     */
1392    public List<WebTemplateItem> getChildrenList() { 
1393      if (this.childrenList == null)
1394        this.childrenList = new ArrayList<WebTemplateItem>();
1395      return this.childrenList;
1396    }
1397
1398    /**
1399     * @return Returns a reference to <code>this</code> for easy method chaining
1400     */
1401    public WebTemplateItem setChildrenList(List<WebTemplateItem> theChildren) { 
1402      this.childrenList = theChildren;
1403      return this;
1404    }
1405
1406    public boolean hasChildren() { 
1407      if (this.childrenList == null)
1408        return false;
1409      for (WebTemplateItem item : this.childrenList)
1410        if (!item.isEmpty())
1411          return true;
1412      return false;
1413    }
1414
1415    public WebTemplateItem addChildren() { //3a
1416      WebTemplateItem t = new WebTemplateItem();
1417      if (this.childrenList == null)
1418        this.childrenList = new ArrayList<WebTemplateItem>();
1419      this.childrenList.add(t);
1420      return t;
1421    }
1422
1423    public WebTemplateItem addChildren(WebTemplateItem t) { //3b
1424      if (t == null)
1425        return this;
1426      if (this.childrenList == null)
1427        this.childrenList = new ArrayList<WebTemplateItem>();
1428      this.childrenList.add(t);
1429      return this;
1430    }
1431
1432    /**
1433     * @return The first repetition of repeating field {@link #children}, creating it if it does not already exist {3}
1434     */
1435    public WebTemplateItem getChildrenFirstRep() { 
1436      if (getChildrenList().isEmpty()) {
1437        addChildren();
1438      }
1439      return getChildrenList().get(0);
1440    }
1441
1442      protected void listChildren(List<Property> children) {
1443        super.listChildren(children);
1444        children.add(new Property("id", "string", "", 0, 1, id));
1445        children.add(new Property("depth", "integer", "", 0, 1, depth));
1446        children.add(new Property("name", "string", "", 0, 1, name));
1447        children.add(new Property("localizedName", "string", "", 0, 1, localizedName));
1448        children.add(new Property("rmType", "code", "", 0, 1, rmType));
1449        children.add(new Property("nodeId", "string", "", 0, 1, nodeId));
1450        children.add(new Property("min", "string", "", 0, 1, min));
1451        children.add(new Property("max", "string", "", 0, 1, max));
1452        children.add(new Property("dependsOn", "string", "", 0, 1, dependsOn));
1453        children.add(new Property("localizedNames", "http://openehr.org/fhir/StructureDefinition/TranslatedString", "", 0, java.lang.Integer.MAX_VALUE, localizedNamesList));
1454        children.add(new Property("localizedDescriptions", "http://openehr.org/fhir/StructureDefinition/TranslatedString", "", 0, java.lang.Integer.MAX_VALUE, localizedDescriptionsList));
1455        children.add(new Property("annotations", "http://openehr.org/fhir/StructureDefinition/Annotations", "", 0, 1, annotations));
1456        children.add(new Property("archetype_id", "string", "", 0, 1, archetype_id));
1457        children.add(new Property("aqlPath", "string", "", 0, 1, aqlPath));
1458        children.add(new Property("custodian_namespace", "string", "", 0, 1, custodian_namespace));
1459        children.add(new Property("custodian_organisation", "string", "", 0, 1, custodian_organisation));
1460        children.add(new Property("lifecycleState", "code", "", 0, 1, lifecycleState));
1461        children.add(new Property("original_namespace", "string", "", 0, 1, original_namespace));
1462        children.add(new Property("original_publisher", "string", "", 0, 1, original_publisher));
1463        children.add(new Property("proportionTypes", "code", "", 0, 1, proportionTypes));
1464        children.add(new Property("revision", "string", "", 0, 1, revision));
1465        children.add(new Property("inContext", "boolean", "", 0, 1, inContext));
1466        children.add(new Property("inputs", "http://openehr.org/fhir/StructureDefinition/WebTemplateInput", "", 0, java.lang.Integer.MAX_VALUE, inputsList));
1467        children.add(new Property("termBindings", "http://openehr.org/fhir/StructureDefinition/WebTemplateTermBinding", "", 0, java.lang.Integer.MAX_VALUE, termBindingsList));
1468        children.add(new Property("children", "http://openehr.org/fhir/StructureDefinition/WebTemplateItem", "", 0, java.lang.Integer.MAX_VALUE, childrenList));
1469      }
1470
1471      @Override
1472      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1473        switch (_hash) {
1474        case 3355: /*id*/  return new Property("id", "string", "", 0, 1, id);
1475        case 95472323: /*depth*/  return new Property("depth", "integer", "", 0, 1, depth);
1476        case 3373707: /*name*/  return new Property("name", "string", "", 0, 1, name);
1477        case 696548518: /*localizedName*/  return new Property("localizedName", "string", "", 0, 1, localizedName);
1478        case -927957995: /*rmType*/  return new Property("rmType", "code", "", 0, 1, rmType);
1479        case -1040171331: /*nodeId*/  return new Property("nodeId", "string", "", 0, 1, nodeId);
1480        case 108114: /*min*/  return new Property("min", "string", "", 0, 1, min);
1481        case 107876: /*max*/  return new Property("max", "string", "", 0, 1, max);
1482        case -1109214266: /*dependsOn*/  return new Property("dependsOn", "string", "", 0, 1, dependsOn);
1483        case 118167693: /*localizedNames*/  return new Property("localizedNames", "http://openehr.org/fhir/StructureDefinition/TranslatedString", "", 0, java.lang.Integer.MAX_VALUE, localizedNamesList);
1484        case 31568658: /*localizedDescriptions*/  return new Property("localizedDescriptions", "http://openehr.org/fhir/StructureDefinition/TranslatedString", "", 0, java.lang.Integer.MAX_VALUE, localizedDescriptionsList);
1485        case -961709276: /*annotations*/  return new Property("annotations", "http://openehr.org/fhir/StructureDefinition/Annotations", "", 0, 1, annotations);
1486        case -1252479343: /*archetype_id*/  return new Property("archetype_id", "string", "", 0, 1, archetype_id);
1487        case -769141631: /*aqlPath*/  return new Property("aqlPath", "string", "", 0, 1, aqlPath);
1488        case -1393315766: /*custodian_namespace*/  return new Property("custodian_namespace", "string", "", 0, 1, custodian_namespace);
1489        case 525929355: /*custodian_organisation*/  return new Property("custodian_organisation", "string", "", 0, 1, custodian_organisation);
1490        case -1486422201: /*lifecycleState*/  return new Property("lifecycleState", "code", "", 0, 1, lifecycleState);
1491        case -1611298707: /*original_namespace*/  return new Property("original_namespace", "string", "", 0, 1, original_namespace);
1492        case -1416112882: /*original_publisher*/  return new Property("original_publisher", "string", "", 0, 1, original_publisher);
1493        case 2145858559: /*proportionTypes*/  return new Property("proportionTypes", "code", "", 0, 1, proportionTypes);
1494        case -260786213: /*revision*/  return new Property("revision", "string", "", 0, 1, revision);
1495        case 247635146: /*inContext*/  return new Property("inContext", "boolean", "", 0, 1, inContext);
1496        case -1183866391: /*inputs*/  return new Property("inputs", "http://openehr.org/fhir/StructureDefinition/WebTemplateInput", "", 0, java.lang.Integer.MAX_VALUE, inputsList);
1497        case 1618255642: /*termBindings*/  return new Property("termBindings", "http://openehr.org/fhir/StructureDefinition/WebTemplateTermBinding", "", 0, java.lang.Integer.MAX_VALUE, termBindingsList);
1498        case 1659526655: /*children*/  return new Property("children", "http://openehr.org/fhir/StructureDefinition/WebTemplateItem", "", 0, java.lang.Integer.MAX_VALUE, childrenList);
1499        default: return super.getNamedProperty(_hash, _name, _checkValid);
1500        }
1501
1502      }
1503
1504      @Override
1505      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1506        switch (hash) {
1507        case 3355: /*id*/ return this.id == null ? new Base[0] : new Base[] {this.id}; // StringType
1508        case 95472323: /*depth*/ return this.depth == null ? new Base[0] : new Base[] {this.depth}; // IntegerType
1509        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1510        case 696548518: /*localizedName*/ return this.localizedName == null ? new Base[0] : new Base[] {this.localizedName}; // StringType
1511        case -927957995: /*rmType*/ return this.rmType == null ? new Base[0] : new Base[] {this.rmType}; // CodeType
1512        case -1040171331: /*nodeId*/ return this.nodeId == null ? new Base[0] : new Base[] {this.nodeId}; // StringType
1513        case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // StringType
1514        case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
1515        case -1109214266: /*dependsOn*/ return this.dependsOn == null ? new Base[0] : new Base[] {this.dependsOn}; // StringType
1516        case 118167693: /*localizedNames*/ return this.localizedNamesList == null ? new Base[0] : this.localizedNamesList.toArray(new Base[this.localizedNamesList.size()]); // TranslatedString
1517        case 31568658: /*localizedDescriptions*/ return this.localizedDescriptionsList == null ? new Base[0] : this.localizedDescriptionsList.toArray(new Base[this.localizedDescriptionsList.size()]); // TranslatedString
1518        case -961709276: /*annotations*/ return this.annotations == null ? new Base[0] : new Base[] {this.annotations}; // Annotations
1519        case -1252479343: /*archetype_id*/ return this.archetype_id == null ? new Base[0] : new Base[] {this.archetype_id}; // StringType
1520        case -769141631: /*aqlPath*/ return this.aqlPath == null ? new Base[0] : new Base[] {this.aqlPath}; // StringType
1521        case -1393315766: /*custodian_namespace*/ return this.custodian_namespace == null ? new Base[0] : new Base[] {this.custodian_namespace}; // StringType
1522        case 525929355: /*custodian_organisation*/ return this.custodian_organisation == null ? new Base[0] : new Base[] {this.custodian_organisation}; // StringType
1523        case -1486422201: /*lifecycleState*/ return this.lifecycleState == null ? new Base[0] : new Base[] {this.lifecycleState}; // CodeType
1524        case -1611298707: /*original_namespace*/ return this.original_namespace == null ? new Base[0] : new Base[] {this.original_namespace}; // StringType
1525        case -1416112882: /*original_publisher*/ return this.original_publisher == null ? new Base[0] : new Base[] {this.original_publisher}; // StringType
1526        case 2145858559: /*proportionTypes*/ return this.proportionTypes == null ? new Base[0] : new Base[] {this.proportionTypes}; // CodeType
1527        case -260786213: /*revision*/ return this.revision == null ? new Base[0] : new Base[] {this.revision}; // StringType
1528        case 247635146: /*inContext*/ return this.inContext == null ? new Base[0] : new Base[] {this.inContext}; // BooleanType
1529        case -1183866391: /*inputs*/ return this.inputsList == null ? new Base[0] : this.inputsList.toArray(new Base[this.inputsList.size()]); // WebTemplateInput
1530        case 1618255642: /*termBindings*/ return this.termBindingsList == null ? new Base[0] : this.termBindingsList.toArray(new Base[this.termBindingsList.size()]); // WebTemplateTermBinding
1531        case 1659526655: /*children*/ return this.childrenList == null ? new Base[0] : this.childrenList.toArray(new Base[this.childrenList.size()]); // WebTemplateItem
1532        default: return super.getProperty(hash, name, checkValid);
1533        }
1534
1535      }
1536
1537      @Override
1538      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1539        switch (hash) {
1540        case 3355: // id
1541          this.id = TypeConvertor.castToString(value); // StringType
1542          return value;
1543        case 95472323: // depth
1544          this.depth = TypeConvertor.castToInteger(value); // IntegerType
1545          return value;
1546        case 3373707: // name
1547          this.name = TypeConvertor.castToString(value); // StringType
1548          return value;
1549        case 696548518: // localizedName
1550          this.localizedName = TypeConvertor.castToString(value); // StringType
1551          return value;
1552        case -927957995: // rmType
1553          this.rmType = TypeConvertor.castToCode(value); // CodeType
1554          return value;
1555        case -1040171331: // nodeId
1556          this.nodeId = TypeConvertor.castToString(value); // StringType
1557          return value;
1558        case 108114: // min
1559          this.min = TypeConvertor.castToString(value); // StringType
1560          return value;
1561        case 107876: // max
1562          this.max = TypeConvertor.castToString(value); // StringType
1563          return value;
1564        case -1109214266: // dependsOn
1565          this.dependsOn = TypeConvertor.castToString(value); // StringType
1566          return value;
1567        case 118167693: // localizedNames
1568          this.getLocalizedNamesList().add((TranslatedString) value); // TranslatedString
1569          return value;
1570        case 31568658: // localizedDescriptions
1571          this.getLocalizedDescriptionsList().add((TranslatedString) value); // TranslatedString
1572          return value;
1573        case -961709276: // annotations
1574          this.annotations = (Annotations) value; // Annotations
1575          return value;
1576        case -1252479343: // archetype_id
1577          this.archetype_id = TypeConvertor.castToString(value); // StringType
1578          return value;
1579        case -769141631: // aqlPath
1580          this.aqlPath = TypeConvertor.castToString(value); // StringType
1581          return value;
1582        case -1393315766: // custodian_namespace
1583          this.custodian_namespace = TypeConvertor.castToString(value); // StringType
1584          return value;
1585        case 525929355: // custodian_organisation
1586          this.custodian_organisation = TypeConvertor.castToString(value); // StringType
1587          return value;
1588        case -1486422201: // lifecycleState
1589          this.lifecycleState = TypeConvertor.castToCode(value); // CodeType
1590          return value;
1591        case -1611298707: // original_namespace
1592          this.original_namespace = TypeConvertor.castToString(value); // StringType
1593          return value;
1594        case -1416112882: // original_publisher
1595          this.original_publisher = TypeConvertor.castToString(value); // StringType
1596          return value;
1597        case 2145858559: // proportionTypes
1598          this.proportionTypes = TypeConvertor.castToCode(value); // CodeType
1599          return value;
1600        case -260786213: // revision
1601          this.revision = TypeConvertor.castToString(value); // StringType
1602          return value;
1603        case 247635146: // inContext
1604          this.inContext = TypeConvertor.castToBoolean(value); // BooleanType
1605          return value;
1606        case -1183866391: // inputs
1607          this.getInputsList().add((WebTemplateInput) value); // WebTemplateInput
1608          return value;
1609        case 1618255642: // termBindings
1610          this.getTermBindingsList().add((WebTemplateTermBinding) value); // WebTemplateTermBinding
1611          return value;
1612        case 1659526655: // children
1613          this.getChildrenList().add((WebTemplateItem) value); // WebTemplateItem
1614          return value;
1615        default: return super.setProperty(hash, name, value);
1616        }
1617
1618      }
1619
1620      @Override
1621      public Base setProperty(String name, Base value) throws FHIRException {
1622        if (name.equals("id")) {
1623          this.id = TypeConvertor.castToString(value); // StringType
1624        } else if (name.equals("depth")) {
1625          this.depth = TypeConvertor.castToInteger(value); // IntegerType
1626        } else if (name.equals("name")) {
1627          this.name = TypeConvertor.castToString(value); // StringType
1628        } else if (name.equals("localizedName")) {
1629          this.localizedName = TypeConvertor.castToString(value); // StringType
1630        } else if (name.equals("rmType")) {
1631          this.rmType = TypeConvertor.castToCode(value); // CodeType
1632        } else if (name.equals("nodeId")) {
1633          this.nodeId = TypeConvertor.castToString(value); // StringType
1634        } else if (name.equals("min")) {
1635          this.min = TypeConvertor.castToString(value); // StringType
1636        } else if (name.equals("max")) {
1637          this.max = TypeConvertor.castToString(value); // StringType
1638        } else if (name.equals("dependsOn")) {
1639          this.dependsOn = TypeConvertor.castToString(value); // StringType
1640        } else if (name.equals("localizedNames")) {
1641          this.getLocalizedNamesList().add((TranslatedString) value); // TranslatedString
1642        } else if (name.equals("localizedDescriptions")) {
1643          this.getLocalizedDescriptionsList().add((TranslatedString) value); // TranslatedString
1644        } else if (name.equals("annotations")) {
1645          this.annotations = (Annotations) value; // Annotations
1646        } else if (name.equals("archetype_id")) {
1647          this.archetype_id = TypeConvertor.castToString(value); // StringType
1648        } else if (name.equals("aqlPath")) {
1649          this.aqlPath = TypeConvertor.castToString(value); // StringType
1650        } else if (name.equals("custodian_namespace")) {
1651          this.custodian_namespace = TypeConvertor.castToString(value); // StringType
1652        } else if (name.equals("custodian_organisation")) {
1653          this.custodian_organisation = TypeConvertor.castToString(value); // StringType
1654        } else if (name.equals("lifecycleState")) {
1655          this.lifecycleState = TypeConvertor.castToCode(value); // CodeType
1656        } else if (name.equals("original_namespace")) {
1657          this.original_namespace = TypeConvertor.castToString(value); // StringType
1658        } else if (name.equals("original_publisher")) {
1659          this.original_publisher = TypeConvertor.castToString(value); // StringType
1660        } else if (name.equals("proportionTypes")) {
1661          this.proportionTypes = TypeConvertor.castToCode(value); // CodeType
1662        } else if (name.equals("revision")) {
1663          this.revision = TypeConvertor.castToString(value); // StringType
1664        } else if (name.equals("inContext")) {
1665          this.inContext = TypeConvertor.castToBoolean(value); // BooleanType
1666        } else if (name.equals("inputs")) {
1667          this.getInputsList().add((WebTemplateInput) value); // WebTemplateInput
1668        } else if (name.equals("termBindings")) {
1669          this.getTermBindingsList().add((WebTemplateTermBinding) value); // WebTemplateTermBinding
1670        } else if (name.equals("children")) {
1671          this.getChildrenList().add((WebTemplateItem) value); // WebTemplateItem
1672        } else
1673          return super.setProperty(name, value);
1674        return value;
1675      }
1676
1677      @Override
1678      public Base makeProperty(int hash, String name) throws FHIRException {
1679        switch (hash) {
1680        case 3355:  return getIdElement();
1681        case 95472323:  return getDepthElement();
1682        case 3373707:  return getNameElement();
1683        case 696548518:  return getLocalizedNameElement();
1684        case -927957995:  return getRmTypeElement();
1685        case -1040171331:  return getNodeIdElement();
1686        case 108114:  return getMinElement();
1687        case 107876:  return getMaxElement();
1688        case -1109214266:  return getDependsOnElement();
1689        case 118167693:  return addLocalizedNames(); 
1690        case 31568658:  return addLocalizedDescriptions(); 
1691        case -961709276:  return getAnnotations();
1692        case -1252479343:  return getArchetype_idElement();
1693        case -769141631:  return getAqlPathElement();
1694        case -1393315766:  return getCustodian_namespaceElement();
1695        case 525929355:  return getCustodian_organisationElement();
1696        case -1486422201:  return getLifecycleStateElement();
1697        case -1611298707:  return getOriginal_namespaceElement();
1698        case -1416112882:  return getOriginal_publisherElement();
1699        case 2145858559:  return getProportionTypesElement();
1700        case -260786213:  return getRevisionElement();
1701        case 247635146:  return getInContextElement();
1702        case -1183866391:  return addInputs(); 
1703        case 1618255642:  return addTermBindings(); 
1704        case 1659526655:  return addChildren(); 
1705        default: return super.makeProperty(hash, name);
1706        }
1707
1708      }
1709
1710      @Override
1711      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1712        switch (hash) {
1713        case 3355: /*id*/ return new String[] {"string"};
1714        case 95472323: /*depth*/ return new String[] {"integer"};
1715        case 3373707: /*name*/ return new String[] {"string"};
1716        case 696548518: /*localizedName*/ return new String[] {"string"};
1717        case -927957995: /*rmType*/ return new String[] {"code"};
1718        case -1040171331: /*nodeId*/ return new String[] {"string"};
1719        case 108114: /*min*/ return new String[] {"string"};
1720        case 107876: /*max*/ return new String[] {"string"};
1721        case -1109214266: /*dependsOn*/ return new String[] {"string"};
1722        case 118167693: /*localizedNames*/ return new String[] {"http://openehr.org/fhir/StructureDefinition/TranslatedString"};
1723        case 31568658: /*localizedDescriptions*/ return new String[] {"http://openehr.org/fhir/StructureDefinition/TranslatedString"};
1724        case -961709276: /*annotations*/ return new String[] {"http://openehr.org/fhir/StructureDefinition/Annotations"};
1725        case -1252479343: /*archetype_id*/ return new String[] {"string"};
1726        case -769141631: /*aqlPath*/ return new String[] {"string"};
1727        case -1393315766: /*custodian_namespace*/ return new String[] {"string"};
1728        case 525929355: /*custodian_organisation*/ return new String[] {"string"};
1729        case -1486422201: /*lifecycleState*/ return new String[] {"code"};
1730        case -1611298707: /*original_namespace*/ return new String[] {"string"};
1731        case -1416112882: /*original_publisher*/ return new String[] {"string"};
1732        case 2145858559: /*proportionTypes*/ return new String[] {"code"};
1733        case -260786213: /*revision*/ return new String[] {"string"};
1734        case 247635146: /*inContext*/ return new String[] {"boolean"};
1735        case -1183866391: /*inputs*/ return new String[] {"http://openehr.org/fhir/StructureDefinition/WebTemplateInput"};
1736        case 1618255642: /*termBindings*/ return new String[] {"http://openehr.org/fhir/StructureDefinition/WebTemplateTermBinding"};
1737        case 1659526655: /*children*/ return new String[] {"http://openehr.org/fhir/StructureDefinition/WebTemplateItem"};
1738        default: return super.getTypesForProperty(hash, name);
1739        }
1740
1741      }
1742
1743      @Override
1744      public Base addChild(String name) throws FHIRException {
1745        if (name.equals("id")) {
1746          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.id");
1747        }
1748        else if (name.equals("depth")) {
1749          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.depth");
1750        }
1751        else if (name.equals("name")) {
1752          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.name");
1753        }
1754        else if (name.equals("localizedName")) {
1755          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.localizedName");
1756        }
1757        else if (name.equals("rmType")) {
1758          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.rmType");
1759        }
1760        else if (name.equals("nodeId")) {
1761          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.nodeId");
1762        }
1763        else if (name.equals("min")) {
1764          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.min");
1765        }
1766        else if (name.equals("max")) {
1767          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.max");
1768        }
1769        else if (name.equals("dependsOn")) {
1770          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.dependsOn");
1771        }
1772        else if (name.equals("localizedNames")) {
1773          return addLocalizedNames();
1774        }
1775        else if (name.equals("localizedDescriptions")) {
1776          return addLocalizedDescriptions();
1777        }
1778        else if (name.equals("annotations")) {
1779          this.annotations = new Annotations();
1780          return this.annotations;
1781        }
1782        else if (name.equals("archetype_id")) {
1783          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.archetype_id");
1784        }
1785        else if (name.equals("aqlPath")) {
1786          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.aqlPath");
1787        }
1788        else if (name.equals("custodian_namespace")) {
1789          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.custodian_namespace");
1790        }
1791        else if (name.equals("custodian_organisation")) {
1792          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.custodian_organisation");
1793        }
1794        else if (name.equals("lifecycleState")) {
1795          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.lifecycleState");
1796        }
1797        else if (name.equals("original_namespace")) {
1798          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.original_namespace");
1799        }
1800        else if (name.equals("original_publisher")) {
1801          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.original_publisher");
1802        }
1803        else if (name.equals("proportionTypes")) {
1804          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.proportionTypes");
1805        }
1806        else if (name.equals("revision")) {
1807          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.revision");
1808        }
1809        else if (name.equals("inContext")) {
1810          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateItem.inContext");
1811        }
1812        else if (name.equals("inputs")) {
1813          return addInputs();
1814        }
1815        else if (name.equals("termBindings")) {
1816          return addTermBindings();
1817        }
1818        else if (name.equals("children")) {
1819          return addChildren();
1820        }
1821        else
1822          return super.addChild(name);
1823      }
1824
1825  public String fhirType() {
1826    return "WebTemplateItem";
1827
1828  }
1829
1830      public WebTemplateItem copy() {
1831        WebTemplateItem dst = new WebTemplateItem();
1832        copyValues(dst);
1833        return dst;
1834      }
1835
1836      public void copyValues(WebTemplateItem dst) {
1837        super.copyValues(dst);
1838        dst.id = id == null ? null : id.copy();
1839        dst.depth = depth == null ? null : depth.copy();
1840        dst.name = name == null ? null : name.copy();
1841        dst.localizedName = localizedName == null ? null : localizedName.copy();
1842        dst.rmType = rmType == null ? null : rmType.copy();
1843        dst.nodeId = nodeId == null ? null : nodeId.copy();
1844        dst.min = min == null ? null : min.copy();
1845        dst.max = max == null ? null : max.copy();
1846        dst.dependsOn = dependsOn == null ? null : dependsOn.copy();
1847        if (localizedNamesList != null) {
1848          dst.localizedNamesList = new ArrayList<TranslatedString>();
1849          for (TranslatedString i : localizedNamesList)
1850            dst.localizedNamesList.add(i.copy());
1851        };
1852        if (localizedDescriptionsList != null) {
1853          dst.localizedDescriptionsList = new ArrayList<TranslatedString>();
1854          for (TranslatedString i : localizedDescriptionsList)
1855            dst.localizedDescriptionsList.add(i.copy());
1856        };
1857        dst.annotations = annotations == null ? null : annotations.copy();
1858        dst.archetype_id = archetype_id == null ? null : archetype_id.copy();
1859        dst.aqlPath = aqlPath == null ? null : aqlPath.copy();
1860        dst.custodian_namespace = custodian_namespace == null ? null : custodian_namespace.copy();
1861        dst.custodian_organisation = custodian_organisation == null ? null : custodian_organisation.copy();
1862        dst.lifecycleState = lifecycleState == null ? null : lifecycleState.copy();
1863        dst.original_namespace = original_namespace == null ? null : original_namespace.copy();
1864        dst.original_publisher = original_publisher == null ? null : original_publisher.copy();
1865        dst.proportionTypes = proportionTypes == null ? null : proportionTypes.copy();
1866        dst.revision = revision == null ? null : revision.copy();
1867        dst.inContext = inContext == null ? null : inContext.copy();
1868        if (inputsList != null) {
1869          dst.inputsList = new ArrayList<WebTemplateInput>();
1870          for (WebTemplateInput i : inputsList)
1871            dst.inputsList.add(i.copy());
1872        };
1873        if (termBindingsList != null) {
1874          dst.termBindingsList = new ArrayList<WebTemplateTermBinding>();
1875          for (WebTemplateTermBinding i : termBindingsList)
1876            dst.termBindingsList.add(i.copy());
1877        };
1878        if (childrenList != null) {
1879          dst.childrenList = new ArrayList<WebTemplateItem>();
1880          for (WebTemplateItem i : childrenList)
1881            dst.childrenList.add(i.copy());
1882        };
1883      }
1884
1885      protected WebTemplateItem typedCopy() {
1886        return copy();
1887      }
1888
1889      @Override
1890      public boolean equalsDeep(Base other_) {
1891        if (!super.equalsDeep(other_))
1892          return false;
1893        if (!(other_ instanceof WebTemplateItem))
1894          return false;
1895        WebTemplateItem o = (WebTemplateItem) other_;
1896        return compareDeep(id, o.id, true) && compareDeep(depth, o.depth, true) && compareDeep(name, o.name, true)
1897           && compareDeep(localizedName, o.localizedName, true) && compareDeep(rmType, o.rmType, true) && compareDeep(nodeId, o.nodeId, true)
1898           && compareDeep(min, o.min, true) && compareDeep(max, o.max, true) && compareDeep(dependsOn, o.dependsOn, true)
1899           && compareDeep(localizedNamesList, o.localizedNamesList, true) && compareDeep(localizedDescriptionsList, o.localizedDescriptionsList, true)
1900           && compareDeep(annotations, o.annotations, true) && compareDeep(archetype_id, o.archetype_id, true)
1901           && compareDeep(aqlPath, o.aqlPath, true) && compareDeep(custodian_namespace, o.custodian_namespace, true)
1902           && compareDeep(custodian_organisation, o.custodian_organisation, true) && compareDeep(lifecycleState, o.lifecycleState, true)
1903           && compareDeep(original_namespace, o.original_namespace, true) && compareDeep(original_publisher, o.original_publisher, true)
1904           && compareDeep(proportionTypes, o.proportionTypes, true) && compareDeep(revision, o.revision, true)
1905           && compareDeep(inContext, o.inContext, true) && compareDeep(inputsList, o.inputsList, true) && compareDeep(termBindingsList, o.termBindingsList, true)
1906           && compareDeep(childrenList, o.childrenList, true);
1907      }
1908
1909      @Override
1910      public boolean equalsShallow(Base other_) {
1911        if (!super.equalsShallow(other_))
1912          return false;
1913        if (!(other_ instanceof WebTemplateItem))
1914          return false;
1915        WebTemplateItem o = (WebTemplateItem) other_;
1916        return compareValues(id, o.id, true) && compareValues(depth, o.depth, true) && compareValues(name, o.name, true)
1917           && compareValues(localizedName, o.localizedName, true) && compareValues(rmType, o.rmType, true) && compareValues(nodeId, o.nodeId, true)
1918           && compareValues(min, o.min, true) && compareValues(max, o.max, true) && compareValues(dependsOn, o.dependsOn, true)
1919           && compareValues(archetype_id, o.archetype_id, true) && compareValues(aqlPath, o.aqlPath, true) && compareValues(custodian_namespace, o.custodian_namespace, true)
1920           && compareValues(custodian_organisation, o.custodian_organisation, true) && compareValues(lifecycleState, o.lifecycleState, true)
1921           && compareValues(original_namespace, o.original_namespace, true) && compareValues(original_publisher, o.original_publisher, true)
1922           && compareValues(proportionTypes, o.proportionTypes, true) && compareValues(revision, o.revision, true)
1923           && compareValues(inContext, o.inContext, true);
1924      }
1925
1926      public boolean isEmpty() {
1927        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(id, depth, name, localizedName
1928          , rmType, nodeId, min, max, dependsOn, localizedNamesList, localizedDescriptionsList
1929          , annotations, archetype_id, aqlPath, custodian_namespace, custodian_organisation
1930          , lifecycleState, original_namespace, original_publisher, proportionTypes, revision
1931          , inContext, inputsList, termBindingsList, childrenList);
1932      }
1933
1934
1935}
1936