From 65133a76f60780418699fbcf6d48434a13379cba Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 16 Nov 2024 21:21:53 +1100 Subject: [PATCH] support for custom resources --- .../main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java | 4 ++++ .../main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java | 3 ++- .../main/java/org/hl7/fhir/utilities/xhtml/XhtmlFluent.java | 4 ++++ .../main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java | 1 - 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java index fb643d31b..2d99f765a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java @@ -66,6 +66,10 @@ public abstract class ResourceRenderer extends DataRenderer { return this; } + public boolean renderingUsesValidation() { + return false; + } + /** * Just build the narrative that would go in the resource (per @renderResource()), but don't put it in the resource * @param dr diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java index 9ba2fab0f..3a3de4915 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java @@ -75,7 +75,7 @@ import org.hl7.fhir.utilities.npm.ToolsVersion; public class NPMPackageGenerator { public enum Category { - RESOURCE, EXAMPLE, OPENAPI, SCHEMATRON, RDF, OTHER, TOOL, TEMPLATE, JEKYLL, TEST; + RESOURCE, EXAMPLE, OPENAPI, SCHEMATRON, RDF, OTHER, TOOL, TEMPLATE, JEKYLL, TEST, CUSTOM; private String getDirectory() { switch (this) { @@ -89,6 +89,7 @@ public class NPMPackageGenerator { case JEKYLL: return "package/jekyll/"; case TEST: return "package/tests/"; case TOOL: return "package/bin/"; + case CUSTOM: return "package/custom/"; } return "/"; } diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlFluent.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlFluent.java index 79a90d5fa..30a5b036e 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlFluent.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlFluent.java @@ -119,6 +119,10 @@ public abstract class XhtmlFluent { return addTag("ul"); } + public XhtmlNode ol() { + return addTag("ol"); + } + public XhtmlNode li() { return addTag("li"); } diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java index 2709e434b..f13b26088 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlParser.java @@ -586,7 +586,6 @@ public class XhtmlParser { if (t.length() > 0) { lastText = t; - // System.out.println(t); node.addText(t).setLocation(markLocation()); s.setLength(0); }