mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-17 02:15:22 +00:00
Fir build
This commit is contained in:
parent
f481e11ad5
commit
9672dac827
@ -54,7 +54,7 @@ public class SearchParamExtractorR4 extends BaseSearchParamExtractor implements
|
||||
@VisibleForTesting
|
||||
public SearchParamExtractorR4(ModelConfig theModelConfig, FhirContext theCtx, IValidationSupport theValidationSupport, ISearchParamRegistry theSearchParamRegistry) {
|
||||
super(theCtx, theSearchParamRegistry);
|
||||
initFhirPath();
|
||||
initFhirPath(theValidationSupport);
|
||||
start();
|
||||
}
|
||||
|
||||
@ -71,16 +71,22 @@ public class SearchParamExtractorR4 extends BaseSearchParamExtractor implements
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void initFhirPath() {
|
||||
public void start() {
|
||||
super.start();
|
||||
if (myFhirPathEngine == null) {
|
||||
IValidationSupport support = myApplicationContext.getBean(IValidationSupport.class);
|
||||
IWorkerContext worker = new HapiWorkerContext(getContext(), support);
|
||||
myFhirPathEngine = new FHIRPathEngine(worker);
|
||||
myFhirPathEngine.setHostServices(new SearchParamExtractorR4HostServices());
|
||||
initFhirPath(support);
|
||||
}
|
||||
}
|
||||
|
||||
public void initFhirPath(IValidationSupport theSupport) {
|
||||
IWorkerContext worker = new HapiWorkerContext(getContext(), theSupport);
|
||||
myFhirPathEngine = new FHIRPathEngine(worker);
|
||||
myFhirPathEngine.setHostServices(new SearchParamExtractorR4HostServices());
|
||||
}
|
||||
|
||||
|
||||
private static class SearchParamExtractorR4HostServices implements FHIRPathEngine.IEvaluationContext {
|
||||
|
||||
|
@ -43,8 +43,6 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
|
||||
public class SearchParamExtractorR5 extends BaseSearchParamExtractor implements ISearchParamExtractor {
|
||||
|
||||
@Autowired
|
||||
private IValidationSupport myValidationSupport;
|
||||
private FHIRPathEngine myFhirPathEngine;
|
||||
|
||||
public SearchParamExtractorR5() {
|
||||
@ -56,21 +54,26 @@ public class SearchParamExtractorR5 extends BaseSearchParamExtractor implements
|
||||
*/
|
||||
public SearchParamExtractorR5(FhirContext theCtx, DefaultProfileValidationSupport theDefaultProfileValidationSupport, ISearchParamRegistry theSearchParamRegistry) {
|
||||
super(theCtx, theSearchParamRegistry);
|
||||
myValidationSupport = theDefaultProfileValidationSupport;
|
||||
initFhirPath();
|
||||
initFhirPath(theDefaultProfileValidationSupport);
|
||||
start();
|
||||
}
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void initFhirPath() {
|
||||
public void start() {
|
||||
super.start();
|
||||
if (myFhirPathEngine == null) {
|
||||
IValidationSupport support = myApplicationContext.getBean(IValidationSupport.class);
|
||||
IWorkerContext worker = new HapiWorkerContext(getContext(), support);
|
||||
myFhirPathEngine = new FHIRPathEngine(worker);
|
||||
myFhirPathEngine.setHostServices(new SearchParamExtractorR5HostServices());
|
||||
initFhirPath(support);
|
||||
}
|
||||
}
|
||||
|
||||
public void initFhirPath(IValidationSupport theSupport) {
|
||||
IWorkerContext worker = new HapiWorkerContext(getContext(), theSupport);
|
||||
myFhirPathEngine = new FHIRPathEngine(worker);
|
||||
myFhirPathEngine.setHostServices(new SearchParamExtractorR5HostServices());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IValueExtractor getPathValueExtractor(IBaseResource theResource, String nextPath) {
|
||||
return () -> myFhirPathEngine.evaluate((Base) theResource, nextPath);
|
||||
|
Loading…
x
Reference in New Issue
Block a user