Skip to content

Commit

Permalink
#1343 - addChild error in PEBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Aug 9, 2023
1 parent 9386866 commit 952dedd
Show file tree
Hide file tree
Showing 944 changed files with 9,702 additions and 9,635 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ private boolean generateChildAddItem(String indent, String parent, boolean first
first = false;
write( "if (name.equals(\""+namet+"\")) {\r\n");
if (isPrimitive(e.typeSummary()) || e.typeSummary().startsWith("canonical("))
write(indent+" throw new FHIRException(\"Cannot call addChild on a primitive type "+parent+"."+e.getName()+"\");\r\n");
write(indent+" throw new FHIRException(\"Cannot call addChild on a singleton property "+parent+"."+e.getName()+"\");\r\n");
else if (isAbstract(e.typeSummary()))
write(indent+" throw new FHIRException(\"Cannot call addChild on an abstract type "+parent+"."+e.getName()+"\");\r\n");
else if (e.unbounded()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,12 +782,12 @@ public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) {
return addIdentifier();
} else if (name.equals("name")) {
throw new FHIRException("Cannot call addChild on a primitive type Account.name");
throw new FHIRException("Cannot call addChild on a singleton property Account.name");
} else if (name.equals("type")) {
this.type = new CodeableConcept();
return this.type;
} else if (name.equals("status")) {
throw new FHIRException("Cannot call addChild on a primitive type Account.status");
throw new FHIRException("Cannot call addChild on a singleton property Account.status");
} else if (name.equals("activePeriod")) {
this.activePeriod = new Period();
return this.activePeriod;
Expand All @@ -807,7 +807,7 @@ public Base addChild(String name) throws FHIRException {
this.owner = new Reference();
return this.owner;
} else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a primitive type Account.description");
throw new FHIRException("Cannot call addChild on a singleton property Account.description");
} else
return super.addChild(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1011,23 +1011,23 @@ else if (name.equals("period"))
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("use")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.use");
throw new FHIRException("Cannot call addChild on a singleton property Address.use");
} else if (name.equals("type")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.type");
throw new FHIRException("Cannot call addChild on a singleton property Address.type");
} else if (name.equals("text")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.text");
throw new FHIRException("Cannot call addChild on a singleton property Address.text");
} else if (name.equals("line")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.line");
throw new FHIRException("Cannot call addChild on a singleton property Address.line");
} else if (name.equals("city")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.city");
throw new FHIRException("Cannot call addChild on a singleton property Address.city");
} else if (name.equals("district")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.district");
throw new FHIRException("Cannot call addChild on a singleton property Address.district");
} else if (name.equals("state")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.state");
throw new FHIRException("Cannot call addChild on a singleton property Address.state");
} else if (name.equals("postalCode")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.postalCode");
throw new FHIRException("Cannot call addChild on a singleton property Address.postalCode");
} else if (name.equals("country")) {
throw new FHIRException("Cannot call addChild on a primitive type Address.country");
throw new FHIRException("Cannot call addChild on a singleton property Address.country");
} else if (name.equals("period")) {
this.period = new Period();
return this.period;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1443,15 +1443,15 @@ public Base addChild(String name) throws FHIRException {
this.substance = new CodeableConcept();
return this.substance;
} else if (name.equals("certainty")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.certainty");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.certainty");
} else if (name.equals("manifestation")) {
return addManifestation();
} else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.description");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.description");
} else if (name.equals("onset")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.onset");
} else if (name.equals("severity")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.severity");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.severity");
} else if (name.equals("exposureRoute")) {
this.exposureRoute = new CodeableConcept();
return this.exposureRoute;
Expand Down Expand Up @@ -2433,9 +2433,9 @@ public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) {
return addIdentifier();
} else if (name.equals("onset")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.onset");
} else if (name.equals("recordedDate")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.recordedDate");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.recordedDate");
} else if (name.equals("recorder")) {
this.recorder = new Reference();
return this.recorder;
Expand All @@ -2449,15 +2449,15 @@ public Base addChild(String name) throws FHIRException {
this.substance = new CodeableConcept();
return this.substance;
} else if (name.equals("status")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.status");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.status");
} else if (name.equals("criticality")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.criticality");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.criticality");
} else if (name.equals("type")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.type");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.type");
} else if (name.equals("category")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.category");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.category");
} else if (name.equals("lastOccurence")) {
throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.lastOccurence");
throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.lastOccurence");
} else if (name.equals("note")) {
this.note = new Annotation();
return this.note;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ public Base addChild(String name) throws FHIRException {
this.author = new StringType();
return this.author;
} else if (name.equals("time")) {
throw new FHIRException("Cannot call addChild on a primitive type Annotation.time");
throw new FHIRException("Cannot call addChild on a singleton property Annotation.time");
} else if (name.equals("text")) {
throw new FHIRException("Cannot call addChild on a primitive type Annotation.text");
throw new FHIRException("Cannot call addChild on a singleton property Annotation.text");
} else
return super.addChild(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,9 +853,9 @@ public Base addChild(String name) throws FHIRException {
this.actor = new Reference();
return this.actor;
} else if (name.equals("required")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.required");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.required");
} else if (name.equals("status")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.status");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.status");
} else
return super.addChild(name);
}
Expand Down Expand Up @@ -1730,27 +1730,27 @@ public Base addChild(String name) throws FHIRException {
if (name.equals("identifier")) {
return addIdentifier();
} else if (name.equals("status")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.status");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.status");
} else if (name.equals("type")) {
this.type = new CodeableConcept();
return this.type;
} else if (name.equals("reason")) {
this.reason = new CodeableConcept();
return this.reason;
} else if (name.equals("priority")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.priority");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.priority");
} else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.description");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.description");
} else if (name.equals("start")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.start");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.start");
} else if (name.equals("end")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.end");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.end");
} else if (name.equals("minutesDuration")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.minutesDuration");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.minutesDuration");
} else if (name.equals("slot")) {
return addSlot();
} else if (name.equals("comment")) {
throw new FHIRException("Cannot call addChild on a primitive type Appointment.comment");
throw new FHIRException("Cannot call addChild on a singleton property Appointment.comment");
} else if (name.equals("participant")) {
return addParticipant();
} else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -824,18 +824,18 @@ public Base addChild(String name) throws FHIRException {
this.appointment = new Reference();
return this.appointment;
} else if (name.equals("start")) {
throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.start");
throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.start");
} else if (name.equals("end")) {
throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.end");
throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.end");
} else if (name.equals("participantType")) {
return addParticipantType();
} else if (name.equals("actor")) {
this.actor = new Reference();
return this.actor;
} else if (name.equals("participantStatus")) {
throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.participantStatus");
throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.participantStatus");
} else if (name.equals("comment")) {
throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.comment");
throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.comment");
} else
return super.addChild(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,21 +613,21 @@ else if (name.equals("creation"))
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("contentType")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.contentType");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.contentType");
} else if (name.equals("language")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.language");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.language");
} else if (name.equals("data")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.data");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.data");
} else if (name.equals("url")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.url");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.url");
} else if (name.equals("size")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.size");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.size");
} else if (name.equals("hash")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.hash");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.hash");
} else if (name.equals("title")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.title");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.title");
} else if (name.equals("creation")) {
throw new FHIRException("Cannot call addChild on a primitive type Attachment.creation");
throw new FHIRException("Cannot call addChild on a singleton property Attachment.creation");
} else
return super.addChild(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -999,13 +999,13 @@ public Base addChild(String name) throws FHIRException {
} else if (name.equals("subtype")) {
return addSubtype();
} else if (name.equals("action")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.action");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.action");
} else if (name.equals("dateTime")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.dateTime");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.dateTime");
} else if (name.equals("outcome")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcome");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.outcome");
} else if (name.equals("outcomeDesc")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcomeDesc");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.outcomeDesc");
} else if (name.equals("purposeOfEvent")) {
return addPurposeOfEvent();
} else
Expand Down Expand Up @@ -1772,16 +1772,16 @@ public Base addChild(String name) throws FHIRException {
this.userId = new Identifier();
return this.userId;
} else if (name.equals("altId")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.altId");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.altId");
} else if (name.equals("name")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.name");
} else if (name.equals("requestor")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.requestor");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.requestor");
} else if (name.equals("location")) {
this.location = new Reference();
return this.location;
} else if (name.equals("policy")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.policy");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.policy");
} else if (name.equals("media")) {
this.media = new Coding();
return this.media;
Expand Down Expand Up @@ -2034,9 +2034,9 @@ else if (name.equals("type"))
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("address")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.address");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.address");
} else if (name.equals("type")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.type");
} else
return super.addChild(name);
}
Expand Down Expand Up @@ -2279,7 +2279,7 @@ else if (name.equals("type"))
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("site")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.site");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.site");
} else if (name.equals("identifier")) {
this.identifier = new Identifier();
return this.identifier;
Expand Down Expand Up @@ -2910,11 +2910,11 @@ public Base addChild(String name) throws FHIRException {
} else if (name.equals("securityLabel")) {
return addSecurityLabel();
} else if (name.equals("name")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.name");
} else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.description");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.description");
} else if (name.equals("query")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.query");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.query");
} else if (name.equals("detail")) {
return addDetail();
} else
Expand Down Expand Up @@ -3140,9 +3140,9 @@ else if (name.equals("value"))
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("type")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.type");
} else if (name.equals("value")) {
throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.value");
throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.value");
} else
return super.addChild(name);
}
Expand Down
Loading

0 comments on commit 952dedd

Please sign in to comment.