Support fetchResourceByType for StructureDefinition

This commit is contained in:
dotasek 2024-11-25 15:14:41 -05:00
parent ac979e16b0
commit fe34219cb3
1 changed files with 6 additions and 2 deletions

View File

@ -40,6 +40,7 @@ import org.hl7.fhir.utilities.validation.ValidationOptions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@ -450,8 +451,11 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
public <T extends Resource> List<T> fetchResourcesByType(Class<T> theClass) {
return null;
List<T> res = new ArrayList<>();
if (theClass == StructureDefinition.class) {
res.addAll(myValidationSupport.fetchAllStructureDefinitions());
}
return res;
}
public <T extends Resource> T fetchResource(Class<T> class_, String uri, Resource source) {