ca.uhn.fhir.model.primitive.XhtmlDt.preprocessXhtmlNamespaceDeclaration()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中ca.uhn.fhir.model.primitive.XhtmlDt.preprocessXhtmlNamespaceDeclaration()方法的一些代码示例,展示了XhtmlDt.preprocessXhtmlNamespaceDeclaration()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XhtmlDt.preprocessXhtmlNamespaceDeclaration()方法的具体详情如下:
包路径:ca.uhn.fhir.model.primitive.XhtmlDt
类名称:XhtmlDt
方法名:preprocessXhtmlNamespaceDeclaration

XhtmlDt.preprocessXhtmlNamespaceDeclaration介绍

暂无

代码示例

代码示例来源:origin: jamesagnew/hapi-fhir

val = XhtmlDt.preprocessXhtmlNamespaceDeclaration(val);

代码示例来源:origin: jamesagnew/hapi-fhir

/**
 * Accepts a textual DIV and parses it into XHTML events which are stored internally.
 * <p>
 * <b>Formatting note:</b> The text will be trimmed {@link 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.
 * </p>
 * <p>
 * Also note that if the parsed text contains any entities (&amp;foo;) which are not a part of the entities defined in core XML (e.g. &amp;sect; which is valid in XHTML 1.0 but not in XML 1.0) they
 * will be parsed and converted to their equivalent unicode character.
 * </p>
 */
@Override
public void setValueAsString(String theValue) throws DataFormatException {
  if (theValue == null || theValue.isEmpty()) {
    super.setValueAsString(null);
  } else {
    String value = theValue.trim();
    value = preprocessXhtmlNamespaceDeclaration(value);
    super.setValueAsString(value);
  }
}

代码示例来源:origin: jamesagnew/hapi-fhir

@Override
public String getValueAsString() {
 if (isEmpty()) {
  return null;
 }
 try {
  String retVal = new XhtmlComposer(XhtmlComposer.HTML).compose(this);
  retVal = XhtmlDt.preprocessXhtmlNamespaceDeclaration(retVal);
  return retVal;
 } catch (Exception e) {
  // TODO: composer shouldn't throw exception like this
  throw new RuntimeException(e);
 }
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities

val = XhtmlDt.preprocessXhtmlNamespaceDeclaration(val);

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-base

/**
 * Accepts a textual DIV and parses it into XHTML events which are stored internally.
 * <p>
 * <b>Formatting note:</b> The text will be trimmed {@link 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.
 * </p>
 * <p>
 * Also note that if the parsed text contains any entities (&amp;foo;) which are not a part of the entities defined in core XML (e.g. &amp;sect; which is valid in XHTML 1.0 but not in XML 1.0) they
 * will be parsed and converted to their equivalent unicode character.
 * </p>
 */
@Override
public void setValueAsString(String theValue) throws DataFormatException {
  if (theValue == null || theValue.isEmpty()) {
    super.setValueAsString(null);
  } else {
    String value = theValue.trim();
    value = preprocessXhtmlNamespaceDeclaration(value);
    super.setValueAsString(value);
  }
}

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-utilities

@Override
public String getValueAsString() {
 if (isEmpty()) {
  return null;
 }
 try {
  String retVal = new XhtmlComposer(XhtmlComposer.HTML).compose(this);
  retVal = XhtmlDt.preprocessXhtmlNamespaceDeclaration(retVal);
  return retVal;
 } catch (Exception e) {
  // TODO: composer shouldn't throw exception like this
  throw new RuntimeException(e);
 }
}

相关文章