@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("mode")) { value = new RestfulCapabilityModeEnumFactory().fromType(castToCode(value)); this.mode = (Enumeration) value; // Enumeration<RestfulCapabilityMode> } else if (name.equals("documentation")) { this.documentation = castToString(value); // StringType } else if (name.equals("security")) { this.security = (CapabilityStatementRestSecurityComponent) value; // CapabilityStatementRestSecurityComponent } else if (name.equals("resource")) { this.getResource().add((CapabilityStatementRestResourceComponent) value); } else if (name.equals("interaction")) { this.getInteraction().add((SystemInteractionComponent) value); } else if (name.equals("searchParam")) { this.getSearchParam().add((CapabilityStatementRestResourceSearchParamComponent) value); } else if (name.equals("operation")) { this.getOperation().add((CapabilityStatementRestOperationComponent) value); } else if (name.equals("compartment")) { this.getCompartment().add(castToUri(value)); } else return super.setProperty(name, value); return value; }
/** * @return The first repetition of repeating field {@link #interaction}, creating it if it does not already exist */ public SystemInteractionComponent getInteractionFirstRep() { if (getInteraction().isEmpty()) { addInteraction(); } return getInteraction().get(0); }
return value; case 1844104722: // interaction this.getInteraction().add((SystemInteractionComponent) value); // SystemInteractionComponent return value; case -553645115: // searchParam
boolean batch = false; boolean transaction = false; for (org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) { if (t.getCode().equals(SystemRestfulInteraction.BATCH)) batch = true;
public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent(); copyElement(src, tgt); tgt.setMode(convertRestfulConformanceMode(src.getMode())); if (src.hasDocumentation()) tgt.setDocumentation(src.getDocumentation()); tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent t : src.getResource()) tgt.addResource(convertConformanceRestResourceComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertSystemInteractionComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent t : src.getOperation()) tgt.addOperation(convertConformanceRestOperationComponent(t)); for (org.hl7.fhir.dstu3.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue()); return tgt; }
@Test public void testGetConformance() { CapabilityStatement conf = client.capabilities().ofType(CapabilityStatement.class).execute(); CapabilityStatement.CapabilityStatementRestComponent component = conf.getRest().iterator().next(); assertEquals(CapabilityStatement.SystemRestfulInteraction.TRANSACTION, component.getInteraction().get(0).getCode()); }
boolean batch = false; boolean transaction = false; for (org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) { if (t.getCode().equals(SystemRestfulInteraction.BATCH)) batch = true;
public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent(); copyElement(src, tgt); tgt.setMode(convertRestfulConformanceMode(src.getMode())); if (src.hasDocumentation()) tgt.setDocumentation(src.getDocumentation()); tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent t : src.getResource()) tgt.addResource(convertConformanceRestResourceComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertSystemInteractionComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent t : src.getOperation()) tgt.addOperation(convertConformanceRestOperationComponent(t)); for (org.hl7.fhir.dstu3.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue()); return tgt; }