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);