fix copmile problem

This commit is contained in:
Grahame Grieve 2020-12-03 15:23:03 +11:00
parent a17c0cf88c
commit 36dae96eef
2 changed files with 8 additions and 11 deletions

View File

@ -139,7 +139,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
}
public interface IValidatorFactory {
// IResourceValidator makeValidator(IWorkerContext ctxt) throws FHIRException;
IResourceValidator makeValidator(IWorkerContext ctxt) throws FHIRException;
IResourceValidator makeValidator(IWorkerContext ctxts, XVerExtensionManager xverManager) throws FHIRException;
}
@ -252,14 +252,6 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
return res;
}
// public static SimpleWorkerContext fromDefinitions(Map<String, byte[]> source) throws IOException, FHIRException {
// SimpleWorkerContext res = new SimpleWorkerContext();
// for (String name : source.keySet()) {
// res.loadDefinitionItem(name, new ByteArrayInputStream(source.get(name)), null, null);
// }
// return res;
// }
public static SimpleWorkerContext fromDefinitions(Map<String, byte[]> source, IContextResourceLoader loader, PackageVersion pi) throws FileNotFoundException, IOException, FHIRException {
SimpleWorkerContext res = new SimpleWorkerContext();
for (String name : source.keySet()) {

View File

@ -57,6 +57,7 @@ import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
import org.hl7.fhir.utilities.MarkDownProcessor;
import org.hl7.fhir.utilities.MarkDownProcessor.Dialect;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.validation.ValidationOptions;
import org.hl7.fhir.utilities.xhtml.NodeType;
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
@ -219,10 +220,14 @@ public class DataRenderer extends Renderer {
private boolean isCanonical(String path) {
if (!path.endsWith(".url"))
return false;
StructureDefinition sd = getContext().getWorker().fetchTypeDefinition(path.substring(0, path.length()-4));
String t = path.substring(0, path.length()-4);
StructureDefinition sd = getContext().getWorker().fetchTypeDefinition(t);
if (sd == null)
return false;
if (Utilities.existsInList(path.substring(0, path.length()-4),
if (Utilities.existsInList(t, VersionUtilities.getCanonicalResourceNames(getContext().getWorker().getVersion()))) {
return true;
}
if (Utilities.existsInList(t,
"ActivityDefinition", "CapabilityStatement", "CapabilityStatement2", "ChargeItemDefinition", "Citation", "CodeSystem",
"CompartmentDefinition", "ConceptMap", "ConditionDefinition", "EventDefinition", "Evidence", "EvidenceReport", "EvidenceVariable",
"ExampleScenario", "GraphDefinition", "ImplementationGuide", "Library", "Measure", "MessageDefinition", "NamingSystem", "PlanDefinition"