From c470bb21ce9f0b34ee3fdb4ceeecac9f26120bb1 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Wed, 17 Jul 2019 18:50:22 -0400 Subject: [PATCH] Add hasValue() method to XhtmlNode --- .../main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java index 5077dfbf0..da2d21864 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlNode.java @@ -60,6 +60,8 @@ import org.hl7.fhir.utilities.Utilities; import ca.uhn.fhir.model.primitive.XhtmlDt; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + @ca.uhn.fhir.model.api.annotation.DatatypeDef(name="xhtml") public class XhtmlNode implements IBaseXhtml { private static final long serialVersionUID = -4362547161441436492L; @@ -423,6 +425,10 @@ public class XhtmlNode implements IBaseXhtml { return getValueAsString(); } + public boolean hasValue() { + return isNotBlank(getValueAsString()); + } + @Override public XhtmlNode setValue(String theValue) throws IllegalArgumentException { setValueAsString(theValue);