예제 #1
0
 private IBaseResource loadAndAddConf(
     HttpServletRequest theServletRequest, final HomeRequest theRequest, final ModelMap theModel) {
   switch (theRequest.getFhirVersion(myConfig)) {
     case DSTU1:
       return loadAndAddConfDstu1(theServletRequest, theRequest, theModel);
     case DSTU2:
       return loadAndAddConfDstu2(theServletRequest, theRequest, theModel);
     case DSTU2_1:
       return loadAndAddConfDstu21(theServletRequest, theRequest, theModel);
   }
   throw new IllegalStateException("Unknown version: " + theRequest.getFhirVersion(myConfig));
 }
예제 #2
0
 protected FhirContext getContext(HomeRequest theRequest) {
   FhirVersionEnum version = theRequest.getFhirVersion(myConfig);
   FhirContext retVal = myContexts.get(version);
   if (retVal == null) {
     retVal = new FhirContext(version);
     myContexts.put(version, retVal);
   }
   return retVal;
 }