/** * Adds a given new value for <b>rest</b> () * * <p> * <b>Definition:</b> * A definition of the restful capabilities of the solution, if any * </p> * @param theValue The rest to add (must not be <code>null</code>) */ public Conformance addRest(Rest theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getRest().add(theValue); return this; }
/** * Gets the value(s) for <b>description</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP * </p> */ public String getDescription() { return getDescriptionElement().getValue(); }
for (Rest nextRest : retVal.getRest()) { retVal.getImplementation().setDescription(myImplementationDescription); myCachedValue = retVal; return retVal;
/** * Gets the first repetition for <b>document</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * A document definition * </p> */ public Document getDocumentFirstRep() { if (getDocument().isEmpty()) { return addDocument(); } return getDocument().get(0); }
/** * Gets the first repetition for <b>contact</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Contacts to assist a user in finding and communicating with the publisher * </p> */ public Contact getContactFirstRep() { if (getContact().isEmpty()) { return addContact(); } return getContact().get(0); }
Conformance retVal = new Conformance(); retVal.setPublisher(myPublisher); retVal.setDate(conformanceDate()); retVal.setFhirVersion(FhirVersionEnum.DSTU2.getFhirVersionString()); retVal.setAcceptUnknown(UnknownContentCodeEnum.UNKNOWN_EXTENSIONS); // TODO: make this configurable - this is a fairly big effort since the parser String serverBase = getServerConfiguration().getServerAddressStrategy().determineServerBase(servletContext, theRequest); retVal .getImplementation() .setUrl(serverBase) .setDescription(getServerConfiguration().getImplementationDescription()); retVal.setKind(ConformanceStatementKindEnum.INSTANCE); retVal.getSoftware().setName(getServerConfiguration().getServerName()); retVal.getSoftware().setVersion(getServerConfiguration().getServerVersion()); retVal.addFormat(Constants.CT_FHIR_XML); retVal.addFormat(Constants.CT_FHIR_JSON); Rest rest = retVal.addRest(); rest.setMode(RestfulConformanceModeEnum.SERVER);
/** * Gets the first repetition for <b>rest</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * A definition of the restful capabilities of the solution, if any * </p> */ public Rest getRestFirstRep() { if (getRest().isEmpty()) { return addRest(); } return getRest().get(0); }
/** * Adds and returns a new value for <b>rest</b> () * * <p> * <b>Definition:</b> * A definition of the restful capabilities of the solution, if any * </p> */ public Rest addRest() { Rest newType = new Rest(); getRest().add(newType); return newType; }
for (Rest nextRest : retVal.getRest()) { retVal.getImplementation().setDescription(myImplementationDescription); myCachedValue = retVal; return retVal;
System.out.println(conf.getDescriptionElement().getValue());
Conformance.Rest rest = conformance.getRest().get(0); Conformance.RestSecurity restSecurity = rest.getSecurity(); List<ExtensionDt> extensions = restSecurity.getUndeclaredExtensions();
Conformance.Rest rest = conformance.getRest().get(0); Conformance.RestSecurity restSecurity = rest.getSecurity(); List<ExtensionDt> extensions = restSecurity.getUndeclaredExtensions();
public Conformance addConformance(Conformance conformance){ List<Conformance.Rest> restList = conformance.getRest(); Conformance.Rest rest = restList.get(0); Conformance.RestSecurity restSecurity = rest.getSecurity(); ExtensionDt conformanceExtension = new ExtensionDt(false, this.urisEndpointExtensionUrl); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "authorize", new UriDt( this.authorizationEndpointUri))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "token", new UriDt( this.tokenEndpointUri))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "register", new UriDt( this.registrationEndpointUri))); restSecurity.addUndeclaredExtension(conformanceExtension); return conformance; }
@SuppressWarnings("Duplicates") @Override public Conformance addConformance(Conformance conformance){ if (metadataRepositoryConfig.isSecured()) { List<Conformance.Rest> restList = conformance.getRest(); Conformance.Rest rest = restList.get(0); Conformance.RestSecurity restSecurity = rest.getSecurity(); ExtensionDt conformanceExtension = new ExtensionDt(false, metadataRepositoryConfig.getUrisEndpointExtensionUrl()); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "authorize", new UriDt(metadataRepositoryConfig.getAuthorizeUrl()))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "token", new UriDt(metadataRepositoryConfig.getTokenUrl()))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "register", new UriDt(metadataRepositoryConfig.getRegistrationEndpointUrl()))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "launch-registration", new UriDt(metadataRepositoryConfig.getLaunchRegistrationUrl()))); restSecurity.addUndeclaredExtension(conformanceExtension); BoundCodeableConceptDt<RestfulSecurityServiceEnum> boundCodeableConceptDt = new BoundCodeableConceptDt<>( RestfulSecurityServiceEnum.VALUESET_BINDER, RestfulSecurityServiceEnum.SMART_ON_FHIR); boundCodeableConceptDt.setText("OAuth2 using SMART-on-FHIR profile (see http://docs.smarthealthit.org)"); restSecurity.getService().add(boundCodeableConceptDt); } return conformance; } }