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

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

本文整理了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

  1. val = XhtmlDt.preprocessXhtmlNamespaceDeclaration(val);

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

  1. /**
  2. * Accepts a textual DIV and parses it into XHTML events which are stored internally.
  3. * <p>
  4. * <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
  5. * surrounding the text.
  6. * </p>
  7. * <p>
  8. * 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
  9. * will be parsed and converted to their equivalent unicode character.
  10. * </p>
  11. */
  12. @Override
  13. public void setValueAsString(String theValue) throws DataFormatException {
  14. if (theValue == null || theValue.isEmpty()) {
  15. super.setValueAsString(null);
  16. } else {
  17. String value = theValue.trim();
  18. value = preprocessXhtmlNamespaceDeclaration(value);
  19. super.setValueAsString(value);
  20. }
  21. }

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

  1. @Override
  2. public String getValueAsString() {
  3. if (isEmpty()) {
  4. return null;
  5. }
  6. try {
  7. String retVal = new XhtmlComposer(XhtmlComposer.HTML).compose(this);
  8. retVal = XhtmlDt.preprocessXhtmlNamespaceDeclaration(retVal);
  9. return retVal;
  10. } catch (Exception e) {
  11. // TODO: composer shouldn't throw exception like this
  12. throw new RuntimeException(e);
  13. }
  14. }

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

  1. val = XhtmlDt.preprocessXhtmlNamespaceDeclaration(val);

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

  1. /**
  2. * Accepts a textual DIV and parses it into XHTML events which are stored internally.
  3. * <p>
  4. * <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
  5. * surrounding the text.
  6. * </p>
  7. * <p>
  8. * 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
  9. * will be parsed and converted to their equivalent unicode character.
  10. * </p>
  11. */
  12. @Override
  13. public void setValueAsString(String theValue) throws DataFormatException {
  14. if (theValue == null || theValue.isEmpty()) {
  15. super.setValueAsString(null);
  16. } else {
  17. String value = theValue.trim();
  18. value = preprocessXhtmlNamespaceDeclaration(value);
  19. super.setValueAsString(value);
  20. }
  21. }

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

  1. @Override
  2. public String getValueAsString() {
  3. if (isEmpty()) {
  4. return null;
  5. }
  6. try {
  7. String retVal = new XhtmlComposer(XhtmlComposer.HTML).compose(this);
  8. retVal = XhtmlDt.preprocessXhtmlNamespaceDeclaration(retVal);
  9. return retVal;
  10. } catch (Exception e) {
  11. // TODO: composer shouldn't throw exception like this
  12. throw new RuntimeException(e);
  13. }
  14. }

相关文章