public ProvenanceEntityComponent copy() { ProvenanceEntityComponent dst = new ProvenanceEntityComponent(); copyValues(dst); dst.role = role == null ? null : role.copy(); dst.what = what == null ? null : what.copy(); if (agent != null) { dst.agent = new ArrayList<ProvenanceAgentComponent>(); for (ProvenanceAgentComponent i : agent) dst.agent.add(i.copy()); }; return dst; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("role")) { throw new FHIRException("Cannot call addChild on a primitive type Provenance.role"); } else if (name.equals("whatUri")) { this.what = new UriType(); return this.what; } else if (name.equals("whatReference")) { this.what = new Reference(); return this.what; } else if (name.equals("whatIdentifier")) { this.what = new Identifier(); return this.what; } else if (name.equals("agent")) { return addAgent(); } else return super.addChild(name); }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("role")) { value = new ProvenanceEntityRoleEnumFactory().fromType(castToCode(value)); this.role = (Enumeration) value; // Enumeration<ProvenanceEntityRole> } else if (name.equals("what[x]")) { this.what = castToType(value); // Type } else if (name.equals("agent")) { this.getAgent().add((ProvenanceAgentComponent) value); } else return super.setProperty(name, value); return value; }
dst.entity = new ArrayList<ProvenanceEntityComponent>(); for (ProvenanceEntityComponent i : entity) dst.entity.add(i.copy()); }; if (signature != null) {
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 3506294: // role value = new ProvenanceEntityRoleEnumFactory().fromType(castToCode(value)); this.role = (Enumeration) value; // Enumeration<ProvenanceEntityRole> return value; case 3648196: // what this.what = castToType(value); // Type return value; case 92750597: // agent this.getAgent().add((ProvenanceAgentComponent) value); // ProvenanceAgentComponent return value; default: return super.setProperty(hash, name, value); } }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof ProvenanceEntityComponent)) return false; ProvenanceEntityComponent o = (ProvenanceEntityComponent) other_; return compareDeep(role, o.role, true) && compareDeep(what, o.what, true) && compareDeep(agent, o.agent, true) ; }
public org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent convertProvenanceEntityComponent(org.hl7.fhir.instance.model.Provenance.ProvenanceEntityComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent tgt = new org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent(); copyElement(src, tgt); tgt.setRole(convertProvenanceEntityRole(src.getRole())); if (src.hasReference()) tgt.setWhat(new org.hl7.fhir.dstu3.model.Reference().setReference(src.getReference())); tgt.addAgent(convertProvenanceAgentComponent(src.getAgent())); return tgt; }
public boolean hasEntity() { if (this.entity == null) return false; for (ProvenanceEntityComponent item : this.entity) if (!item.isEmpty()) return true; return false; }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof ProvenanceEntityComponent)) return false; ProvenanceEntityComponent o = (ProvenanceEntityComponent) other_; return compareValues(role, o.role, true); }
public ProvenanceEntityComponent addEntity() { //3 ProvenanceEntityComponent t = new ProvenanceEntityComponent(); if (this.entity == null) this.entity = new ArrayList<ProvenanceEntityComponent>(); this.entity.add(t); return t; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3506294: return getRoleElement(); case 1309315900: return getWhat(); case 3648196: return getWhat(); case 92750597: return addAgent(); default: return super.makeProperty(hash, name); } }
public org.hl7.fhir.instance.model.Provenance.ProvenanceEntityComponent convertProvenanceEntityComponent(org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Provenance.ProvenanceEntityComponent tgt = new org.hl7.fhir.instance.model.Provenance.ProvenanceEntityComponent(); copyElement(src, tgt); tgt.setRole(convertProvenanceEntityRole(src.getRole())); if (src.hasWhatReference() && src.getWhatReference().hasReference()) tgt.setReference(src.getWhatReference().getReference()); for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent t : src.getAgent()) tgt.setAgent(convertProvenanceAgentComponent(t)); return tgt; }
public org.hl7.fhir.instance.model.Provenance.ProvenanceEntityComponent convertProvenanceEntityComponent(org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Provenance.ProvenanceEntityComponent tgt = new org.hl7.fhir.instance.model.Provenance.ProvenanceEntityComponent(); copyElement(src, tgt); tgt.setRole(convertProvenanceEntityRole(src.getRole())); if (src.hasWhatReference() && src.getWhatReference().hasReference()) tgt.setReference(src.getWhatReference().getReference()); for (org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentComponent t : src.getAgent()) tgt.setAgent(convertProvenanceAgentComponent(t)); return tgt; }
public org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent convertProvenanceEntityComponent(org.hl7.fhir.instance.model.Provenance.ProvenanceEntityComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent tgt = new org.hl7.fhir.dstu3.model.Provenance.ProvenanceEntityComponent(); copyElement(src, tgt); tgt.setRole(convertProvenanceEntityRole(src.getRole())); if (src.hasReference()) tgt.setWhat(new org.hl7.fhir.dstu3.model.Reference().setReference(src.getReference())); tgt.addAgent(convertProvenanceAgentComponent(src.getAgent())); return tgt; }