From e49690798565d49542252ab1de820da6fcd8cdb2 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 19 May 2020 05:43:50 +1000 Subject: [PATCH] fix compile --- .../java/org/hl7/fhir/r5/renderers/DataRenderer.java | 4 ++++ .../hl7/fhir/r5/renderers/QuestionnaireRenderer.java | 8 ++------ .../hl7/fhir/r5/renderers/utils/RenderingContext.java | 10 ++++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java index 85ca71571..325b37303 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java @@ -203,6 +203,10 @@ public class DataRenderer { return sd.getBaseDefinitionElement().hasExtension("http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super"); } + protected String translate(String source, String content) { + return content; + } + // -- 4. Data type Rendering ---------------------------------------------- public static String display(IWorkerContext context, DataType type) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java index c531dce45..d3f9a33ed 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java @@ -17,10 +17,6 @@ import org.hl7.fhir.utilities.xhtml.XhtmlNode; public class QuestionnaireRenderer extends ResourceRenderer { - private String directory; - private String defnFile; - private boolean inlineGraphics; - private boolean tree; public QuestionnaireRenderer(RenderingContext context) { @@ -48,7 +44,7 @@ public class QuestionnaireRenderer extends ResourceRenderer { } public boolean renderTree(XhtmlNode x, Questionnaire q) throws UnsupportedEncodingException, IOException { - HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDirectory(), context.isInlineGraphics(), true); + HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(), true); TableModel model = gen.new TableModel("qtree="+q.getId(), true); model.setAlternating(true); model.setDocoImg(context.getPrefix() +"help16.png"); @@ -71,7 +67,7 @@ public class QuestionnaireRenderer extends ResourceRenderer { rows.add(r); boolean hasExt = false; - r.getCells().add(gen.new Cell(null, context.getDefnFile() == null ? "" : context.getDefnFile()+"-definitions.html#extension."+i.getLinkId(), i.getLinkId(), null, null)); + r.getCells().add(gen.new Cell(null, context.getDefinitionsTarget() == null ? "" : context.getDefinitionsTarget()+"-definitions.html#extension."+i.getLinkId(), i.getLinkId(), null, null)); String txt = (i.hasPrefix() ? i.getPrefix() + ". " : "") + i.getText(); r.getCells().add(gen.new Cell(null, null, txt, null, null)); r.getCells().add(gen.new Cell(null, null, (i.getRequired() ? "1" : "0")+".."+(i.getRepeats() ? "*" : "1"), null, null)); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java index 4e5a76b8b..a3293c71b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java @@ -83,6 +83,8 @@ public class RenderingContext { protected ProfileUtilities profileUtilities; private String definitionsTarget; private String destDir; + private boolean inlineGraphics; + /** * @@ -305,6 +307,14 @@ public class RenderingContext { return res; } + + public boolean isInlineGraphics() { + return inlineGraphics; + } + + public void setInlineGraphics(boolean inlineGraphics) { + this.inlineGraphics = inlineGraphics; + }