Bump core version to 5.6.84 (#4326)

* WIP. Basic adjustment of r5 IWorkerContext to core refactor

* Replace FIXME with UnsupportedOperationException

* use fetchResource(class_, uri) instead of UnsupportedOperationException

* Fix breaking tests related to fetchResource

* Fix breaking validation test

Co-authored-by: dotasek <david.otasek@smilecdr.com>
This commit is contained in:
dotasek 2022-12-07 11:26:33 -05:00 committed by GitHub
parent f13b247c74
commit 403016f846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 17 deletions

View File

@ -53,9 +53,11 @@ import org.hl7.fhir.r4.model.ConceptMap;
import org.hl7.fhir.r4.model.Parameters;
import org.hl7.fhir.r4.model.ValueSet;
import org.hl7.fhir.r5.model.CapabilityStatement;
import org.hl7.fhir.r5.model.PackageInformation;
import org.hl7.fhir.r5.model.SearchParameter;
import org.hl7.fhir.r5.model.StructureDefinition;
import java.util.Date;
import java.util.List;
import static org.apache.commons.lang3.StringUtils.isBlank;
@ -188,6 +190,7 @@ public class VersionCanonicalizer {
String packageUserData = (String) theResource.getUserData("package");
if (packageUserData != null) {
retVal.setUserData("package", packageUserData);
retVal.setSourcePackage(new PackageInformation(packageUserData, new Date()));
}
return retVal;
}

View File

@ -14,6 +14,7 @@ import org.fhir.ucum.UcumService;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.TerminologyServiceException;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.context.IWorkerContextManager;
import org.hl7.fhir.r5.model.CanonicalResource;
import org.hl7.fhir.r5.model.CodeSystem;
@ -22,6 +23,7 @@ import org.hl7.fhir.r5.model.CodeableConcept;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent;
import org.hl7.fhir.r5.model.NamingSystem;
import org.hl7.fhir.r5.model.PackageInformation;
import org.hl7.fhir.r5.model.Parameters;
import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.model.ResourceType;
@ -302,14 +304,19 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
return retVal;
}
public <T extends Resource> T fetchResourceWithException(Class<T> theClass, String uri, Resource sourceOfReference) throws FHIRException {
throw new UnsupportedOperationException(Msg.code(2213));
}
@Override
public <T extends Resource> T fetchResource(Class<T> theClass, String theUri, String theVersion) {
return fetchResource(theClass, theUri + "|" + theVersion);
}
@Override
public <T extends Resource> T fetchResource(Class<T> class_, String uri, CanonicalResource canonicalForSource) {
throw new UnsupportedOperationException(Msg.code(225));
public <T extends Resource> T fetchResource(Class<T> class_, String uri, Resource canonicalForSource) {
return fetchResource(class_,uri);
}
@Override
@ -328,12 +335,12 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
@Override
public void cacheResourceFromPackage(Resource res, PackageVersion packageDetails) throws FHIRException {
public void cacheResourceFromPackage(Resource res, PackageInformation packageDetails) throws FHIRException {
throw new UnsupportedOperationException(Msg.code(229));
}
@Override
public void cachePackage(PackageDetails packageDetails, List<PackageVersion> list) {
public void cachePackage(PackageInformation packageInformation) {
}
@ -344,7 +351,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
@Override
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical) throws FHIRException {
public ValueSetExpander.ValueSetExpansionOutcome expandVS(Resource src,ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical) throws FHIRException {
throw new UnsupportedOperationException(Msg.code(230));
}
@ -386,12 +393,12 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
@Override
public boolean hasPackage(PackageVersion packageVersion) {
public boolean hasPackage(PackageInformation packageVersion) {
return false;
}
@Override
public PackageDetails getPackage(PackageVersion packageVersion) {
public PackageInformation getPackage(String id, String ver) {
return null;
}
@ -416,7 +423,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
@Override
public PackageVersion getPackageForUrl(String s) {
public PackageInformation getPackageForUrl(String s) {
return null;
}

View File

@ -23,6 +23,7 @@ import org.hl7.fhir.r5.model.CanonicalResource;
import org.hl7.fhir.r5.model.CodeSystem;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.NamingSystem;
import org.hl7.fhir.r5.model.PackageInformation;
import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.ValueSet;
@ -136,12 +137,12 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
}
@Override
public boolean hasPackage(PackageVersion packageVersion) {
public boolean hasPackage(PackageInformation packageInformation) {
return false;
}
@Override
public PackageDetails getPackage(PackageVersion packageVersion) {
public PackageInformation getPackage(String id, String ver) {
return null;
}
@ -172,7 +173,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
}
@Override
public PackageVersion getPackageForUrl(String s) {
public PackageInformation getPackageForUrl(String s) {
throw new UnsupportedOperationException(Msg.code(2109));
}
@ -211,12 +212,12 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
}
@Override
public void cacheResourceFromPackage(Resource res, PackageVersion packageDetails) throws FHIRException {
public void cacheResourceFromPackage(Resource res, PackageInformation packageDetails) throws FHIRException {
}
@Override
public void cachePackage(PackageDetails packageDetails, List<PackageVersion> list) {
public void cachePackage(PackageInformation packageInformation) {
}
@ -271,7 +272,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
}
@Override
public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean Hierarchical) {
public ValueSetExpander.ValueSetExpansionOutcome expandVS(Resource src, org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean Hierarchical) {
throw new UnsupportedOperationException(Msg.code(663));
}
@ -350,8 +351,12 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
}
@Override
public <T extends Resource> T fetchResource(Class<T> class_, String uri, CanonicalResource canonicalForSource) {
throw new UnsupportedOperationException(Msg.code(668));
public <T extends Resource> T fetchResource(Class<T> class_, String uri, Resource canonicalForSource) {
return fetchResource(class_, uri);
}
public <T extends Resource> T fetchResourceWithException(Class<T> class_, String uri, Resource sourceOfReference) throws FHIRException {
throw new UnsupportedOperationException(Msg.code(2214));
}
@Override

View File

@ -845,7 +845,7 @@
<properties>
<fhir_core_version>5.6.82-SNAPSHOT</fhir_core_version>
<fhir_core_version>5.6.84</fhir_core_version>
<ucum_version>1.0.3</ucum_version>
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>