public class XhtmlDt extends BasePrimitive<String>
XmlUtil.parse(String) and XmlUtil.encode(List)
methods to do so.| Modifier and Type | Field and Description |
|---|---|
static String |
DIV_OPEN_FIRST |
| Constructor and Description |
|---|
XhtmlDt()
Constructor
|
XhtmlDt(String theTextDiv)
Constructor which accepts a string code
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
encode(String theValue)
Subclasses must override to convert a "coerced" value into an encoded one.
|
String |
getValue()
Note that as of HAPI FHIR 3.1.0, this method no longer uses
the StAX XMLEvent type as the XML representation, and uses a
String instead.
|
boolean |
hasContent() |
boolean |
isEmpty() |
protected String |
parse(String theValue)
Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
|
static String |
preprocessXhtmlNamespaceDeclaration(String value) |
BasePrimitive<String> |
setValue(String theValue)
Note that as of HAPI FHIR 3.1.0, this method no longer uses
the StAX XMLEvent type as the XML representation, and uses a
String instead.
|
void |
setValueAsString(String theValue)
Accepts a textual DIV and parses it into XHTML events which are stored internally.
|
equals, getValueAsString, hashCode, hasValue, readExternal, toString, updateStringValue, writeExternalgetElementSpecificId, getId, setElementSpecificId, setId, setIdaddUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, hasFormatComment, isBaseEmptyclone, finalize, getClass, notify, notifyAll, wait, wait, waitfhirType, getFormatCommentsPost, getFormatCommentsPre, hasFormatCommentpublic static final String DIV_OPEN_FIRST
public XhtmlDt()
protected String encode(String theValue)
BasePrimitiveencode in class BasePrimitive<String>theValue - Will not be nullpublic boolean hasContent()
public boolean isEmpty()
isEmpty in interface IBaseisEmpty in class BasePrimitive<String>protected String parse(String theValue)
BasePrimitiveparse in class BasePrimitive<String>theValue - Will not be nullpublic String getValue()
XmlUtil.parse(String) and XmlUtil.encode(List)
methods to do so.getValue in interface IPrimitiveDatatype<String>getValue in interface IPrimitiveType<String>getValue in class BasePrimitive<String>public BasePrimitive<String> setValue(String theValue) throws DataFormatException
XmlUtil.parse(String) and XmlUtil.encode(List)
methods to do so.setValue in interface IPrimitiveDatatype<String>setValue in interface IPrimitiveType<String>setValue in class BasePrimitive<String>DataFormatExceptionpublic void setValueAsString(String theValue) throws DataFormatException
Formatting note: The text will be trimmed String.trim(). If the text does not start with an HTML tag (generally this would be a div tag), a div tag will be automatically placed
surrounding the text.
Also note that if the parsed text contains any entities (&foo;) which are not a part of the entities defined in core XML (e.g. § which is valid in XHTML 1.0 but not in XML 1.0) they will be parsed and converted to their equivalent unicode character.
setValueAsString in interface IPrimitiveDatatype<String>setValueAsString in interface IPrimitiveType<String>setValueAsString in class BasePrimitive<String>DataFormatExceptionpublic static String preprocessXhtmlNamespaceDeclaration(String value)
Copyright © 2014–2019 University Health Network. All rights reserved.