public org.hl7.fhir.instance.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Meta tgt = new org.hl7.fhir.instance.model.Meta(); copyElement(src, tgt); tgt.setVersionId(src.getVersionId()); tgt.setLastUpdated(src.getLastUpdated()); for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) tgt.addProfile(t.getValue()); for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurity()) tgt.addSecurity(convertCoding(t)); for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) tgt.addTag(convertCoding(t)); return tgt; }
/** * @return The first repetition of repeating field {@link #security}, creating it if it does not already exist */ public Coding getSecurityFirstRep() { if (getSecurity().isEmpty()) { addSecurity(); } return getSecurity().get(0); }
public static org.hl7.fhir.dstu2016may.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Meta tgt = new org.hl7.fhir.dstu2016may.model.Meta(); copyElement(src, tgt); if (src.hasVersionId()) tgt.setVersionId(src.getVersionId()); if (src.hasLastUpdated()) tgt.setLastUpdated(src.getLastUpdated()); for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) tgt.addProfile(t.getValue()); for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurity()) tgt.addSecurity(convertCoding(t)); for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) tgt.addTag(convertCoding(t)); return tgt; }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("versionId")) { this.versionId = castToId(value); // IdType } else if (name.equals("lastUpdated")) { this.lastUpdated = castToInstant(value); // InstantType } else if (name.equals("profile")) { this.getProfile().add(castToUri(value)); } else if (name.equals("security")) { this.getSecurity().add(castToCoding(value)); } else if (name.equals("tag")) { this.getTag().add(castToCoding(value)); } else return super.setProperty(name, value); return value; }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -1407102957: // versionId this.versionId = castToId(value); // IdType return value; case 1649733957: // lastUpdated this.lastUpdated = castToInstant(value); // InstantType return value; case -309425751: // profile this.getProfile().add(castToUri(value)); // UriType return value; case 949122880: // security this.getSecurity().add(castToCoding(value)); // Coding return value; case 114586: // tag this.getTag().add(castToCoding(value)); // Coding return value; default: return super.setProperty(hash, name, value); } }
public org.hl7.fhir.instance.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Meta tgt = new org.hl7.fhir.instance.model.Meta(); copyElement(src, tgt); tgt.setVersionId(src.getVersionId()); tgt.setLastUpdated(src.getLastUpdated()); for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) tgt.addProfile(t.getValue()); for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurity()) tgt.addSecurity(convertCoding(t)); for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) tgt.addTag(convertCoding(t)); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Meta tgt = new org.hl7.fhir.dstu2016may.model.Meta(); copyElement(src, tgt); if (src.hasVersionId()) tgt.setVersionId(src.getVersionId()); if (src.hasLastUpdated()) tgt.setLastUpdated(src.getLastUpdated()); for (org.hl7.fhir.dstu3.model.UriType t : src.getProfile()) tgt.addProfile(t.getValue()); for (org.hl7.fhir.dstu3.model.Coding t : src.getSecurity()) tgt.addSecurity(convertCoding(t)); for (org.hl7.fhir.dstu3.model.Coding t : src.getTag()) tgt.addTag(convertCoding(t)); return tgt; }