fixes for change to validator resolve interface
This commit is contained in:
parent
149f7caad2
commit
9e0e8fec3b
|
@ -405,11 +405,11 @@ public class LiquidEngine implements IEvaluationContext {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Base resolveReference(Object appContext, String url) throws FHIRException {
|
||||
public Base resolveReference(Object appContext, String url, Base refContext) throws FHIRException {
|
||||
if (externalHostServices == null)
|
||||
return null;
|
||||
LiquidEngineContext ctxt = (LiquidEngineContext) appContext;
|
||||
return resolveReference(ctxt.externalContext, url);
|
||||
return resolveReference(ctxt.externalContext, url, refContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -198,7 +198,7 @@ public class StructureMapUtilities {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Base resolveReference(Object appContext, String url) throws FHIRException {
|
||||
public Base resolveReference(Object appContext, String url, Base refContext) throws FHIRException {
|
||||
if (services == null)
|
||||
return null;
|
||||
return services.resolveReference(appContext, url);
|
||||
|
|
|
@ -77,7 +77,7 @@ public class FHIRPathTests {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Base resolveReference(Object appContext, String url) throws FHIRException {
|
||||
public Base resolveReference(Object appContext, String url, Base refContext) throws FHIRException {
|
||||
throw new NotImplementedException("Not done yet (FHIRPathTestEvaluationServices.resolveReference), when item is element");
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ public class SnapShotGenerationTests {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Base resolveReference(Object appContext, String url) {
|
||||
public Base resolveReference(Object appContext, String url, Base refContext) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
@ -468,14 +468,23 @@ public class SnapShotGenerationTests {
|
|||
|
||||
private void testGen(boolean fail) throws Exception {
|
||||
if (!Utilities.noString(test.register)) {
|
||||
ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), null, null);
|
||||
List<ValidationMessage> messages = new ArrayList<ValidationMessage>();
|
||||
ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), messages, null);
|
||||
pu.setNewSlicingProcessing(true);
|
||||
List<String> errors = new ArrayList<String>();
|
||||
pu.setIds(test.included, false);
|
||||
StructureDefinition base = TestingUtilities.context().fetchResource(StructureDefinition.class, test.included.getBaseDefinition());
|
||||
pu.generateSnapshot(base, test.included, test.included.getUrl(), "http://test.org/profile", test.included.getName());
|
||||
if (!TestingUtilities.context().hasResource(StructureDefinition.class, test.included.getUrl()))
|
||||
TestingUtilities.context().cacheResource(test.included);
|
||||
int ec = 0;
|
||||
for (ValidationMessage vm : messages) {
|
||||
if (vm.getLevel() == IssueSeverity.ERROR) {
|
||||
System.out.println(vm.summary());
|
||||
ec++;
|
||||
}
|
||||
}
|
||||
if (ec > 0)
|
||||
throw new FHIRException("register gen failed: "+messages.toString());
|
||||
}
|
||||
StructureDefinition base = getSD(test.getSource().getBaseDefinition());
|
||||
if (!base.getUrl().equals(test.getSource().getBaseDefinition()))
|
||||
|
|
|
@ -380,7 +380,7 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour
|
|||
}
|
||||
|
||||
@Override
|
||||
public Base resolveReference(Object appContext, String url) {
|
||||
public Base resolveReference(Object appContext, String url, Base refContext) {
|
||||
if (url.equals("Patient/test"))
|
||||
return new Patient();
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue