当前位置: 首页>>代码示例>>Java>>正文


Java XhtmlNode.addText方法代码示例

本文整理汇总了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.addText方法的典型用法代码示例。如果您正苦于以下问题:Java XhtmlNode.addText方法的具体用法?Java XhtmlNode.addText怎么用?Java XhtmlNode.addText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hl7.fhir.utilities.xhtml.XhtmlNode的用法示例。


在下文中一共展示了XhtmlNode.addText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addCodeToTable

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addCodeToTable(boolean isAbstract, String system, String code, String display, XhtmlNode td) {
  CodeSystem e = context.fetchCodeSystem(system);
  if (e == null || e.getContent() != org.hl7.fhir.r4.model.CodeSystem.CodeSystemContentMode.COMPLETE) {
    if (isAbstract)
      td.i().setAttribute("title", ABSTRACT_CODE_HINT).addText(code);
    else if ("http://snomed.info/sct".equals(system)) {
      td.ah("http://browser.ihtsdotools.org/?perspective=full&conceptId1="+code).addText(code);
    } else if ("http://loinc.org".equals(system)) {
        td.ah("http://details.loinc.org/LOINC/"+code+".html").addText(code);
    } else        
      td.addText(code);
  } else {
    String href = prefix+getCsRef(e);
    if (href.contains("#"))
      href = href + "-"+Utilities.nmtokenize(code);
    else
      href = href + "#"+e.getId()+"-"+Utilities.nmtokenize(code);
    if (isAbstract)
      td.ah(href).setAttribute("title", ABSTRACT_CODE_HINT).i().addText(code);
    else
      td.ah(href).addText(code);
  }
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:24,代码来源:NarrativeGenerator.java

示例2: generateDefinition

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private boolean generateDefinition(XhtmlNode x, CodeSystem cs, boolean header, String lang) throws FHIRFormatError, DefinitionException, IOException {
  boolean hasExtensions = false;

  if (header) {
    XhtmlNode h = x.h2();
    h.addText(cs.hasTitle() ? cs.getTitle() : cs.getName());
    addMarkdown(x, cs.getDescription());
    if (cs.hasCopyright())
      generateCopyright(x, cs, lang);
  }

  generateProperties(x, cs, lang);
  generateFilters(x, cs, lang);
  List<UsedConceptMap> maps = new ArrayList<UsedConceptMap>();
  hasExtensions = generateCodeSystemContent(x, cs, hasExtensions, maps, lang);

  return hasExtensions;
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:19,代码来源:NarrativeGenerator.java

示例3: commit

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
public void commit(XhtmlNode xt) {
  if (newResources.size() == 1 && assignments.size() == 1 && newResources.containsKey(assignments.get(0).getVar()) && keyProps.size() == 1 && newResources.containsKey(keyProps.get(0).getVar()) ) {
    xt.addText("new "+assignments.get(0).desc+" ("+keyProps.get(0).desc.substring(keyProps.get(0).desc.indexOf(".")+1)+")");
  } else if (newResources.size() == 1 && assignments.size() == 1 && newResources.containsKey(assignments.get(0).getVar()) && keyProps.size() == 0) {
    xt.addText("new "+assignments.get(0).desc);
  } else {
    xt.addText(txt.toString());        
}
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:10,代码来源:StructureMapUtilities.java

示例4: renderCoding

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderCoding(Coding c, XhtmlNode x, boolean showCodeDetails) {
  String s = "";
  if (c.hasDisplayElement())
    s = c.getDisplay();
  if (Utilities.noString(s))
    s = lookupCode(c.getSystem(), c.getCode());

  if (Utilities.noString(s))
    s = c.getCode();

  if (showCodeDetails) {
    x.addText(s+" (Details: "+describeSystem(c.getSystem())+" code "+c.getCode()+" = '"+lookupCode(c.getSystem(), c.getCode())+"', stated as '"+c.getDisplay()+"')");
  } else
    x.span(null, "{"+c.getSystem()+" "+c.getCode()+"}").addText(s);
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:16,代码来源:NarrativeGenerator.java

示例5: addRefToCode

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addRefToCode(XhtmlNode td, String target, String vslink, String code) {
  CodeSystem cs = context.fetchCodeSystem(target);
  String cslink = getCsRef(cs);
  XhtmlNode a = null;
  if (cslink != null) 
    a = td.ah(prefix+cslink+"#"+cs.getId()+"-"+code);
  else
    a = td.ah(prefix+vslink+"#"+code);
  a.addText(code);
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:11,代码来源:NarrativeGenerator.java

示例6: renderRange

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderRange(Range q, XhtmlNode x) {
  if (q.hasLow())
    x.addText(q.getLow().getValue().toString());
  else
    x.tx("?");
  x.tx("-");
  if (q.hasHigh())
    x.addText(q.getHigh().getValue().toString());
  else
    x.tx("?");
  if (q.getLow().hasUnit())
    x.tx(" "+q.getLow().getUnit());
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:14,代码来源:NarrativeGenerator.java

示例7: smartAddText

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void smartAddText(XhtmlNode p, String text) {
 if (text == null)
   return;

  String[] lines = text.split("\\r\\n");
  for (int i = 0; i < lines.length; i++) {
    if (i > 0)
      p.br();
    p.addText(lines[i]);
  }
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:12,代码来源:NarrativeGenerator.java

示例8: noteInput

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void noteInput(VariablesForProfiling vars, StructureMapGroupInputComponent inp, VariableMode mode, XhtmlNode xs) {
  VariableForProfiling v = vars.get(mode, inp.getName());
  if (v != null)
    xs.addText("Input: "+v.property.getPath());
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:6,代码来源:StructureMapUtilities.java

示例9: analyseSource

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private VariablesForProfiling analyseSource(String ruleId, TransformContext context, VariablesForProfiling vars, StructureMapGroupRuleSourceComponent src, XhtmlNode td) throws Exception {
  VariableForProfiling var = vars.get(VariableMode.INPUT, src.getContext());
  if (var == null)
    throw new FHIRException("Rule \""+ruleId+"\": Unknown input variable "+src.getContext());
  PropertyWithType prop = var.getProperty();

  boolean optional = false;
  boolean repeating = false;

  if (src.hasCondition()) {
    optional = true;
  }

  if (src.hasElement()) {
    Property element = prop.getBaseProperty().getChild(prop.types.getType(), src.getElement());
    if (element == null)
      throw new Exception("Rule \""+ruleId+"\": Unknown element name "+src.getElement());
    if (element.getDefinition().getMin() == 0)
      optional = true;
    if (element.getDefinition().getMax().equals("*"))
      repeating = true;
    VariablesForProfiling result = vars.copy(optional, repeating);
    TypeDetails type = new TypeDetails(CollectionStatus.SINGLETON);
    for (TypeRefComponent tr : element.getDefinition().getType()) {
      if (!tr.hasCode())
        throw new Error("Rule \""+ruleId+"\": Element has no type");
      ProfiledType pt = new ProfiledType(tr.getCode());
      if (tr.hasProfile())
        pt.addProfile(tr.getProfile());
      if (element.getDefinition().hasBinding())
        pt.addBinding(element.getDefinition().getBinding());
      type.addType(pt);
  } 
    td.addText(prop.getPath()+"."+src.getElement()); 
    if (src.hasVariable())
      result.add(VariableMode.INPUT, src.getVariable(), new PropertyWithType(prop.getPath()+"."+src.getElement(), element, null, type));
  return result;
  } else {
    td.addText(prop.getPath()); // ditto!
    return vars.copy(optional, repeating);
  }
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:43,代码来源:StructureMapUtilities.java

示例10: addObservationToTable

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addObservationToTable(XhtmlNode tr, ResourceWrapper obs, int i) {
  // TODO Auto-generated method stub

  // code (+bodysite)
  XhtmlNode td = tr.td();
  PropertyWrapper pw = getProperty(obs, "result");
  if (valued(pw)) {
    displayCodeableConcept(td, pw.value());
  }
  pw = getProperty(obs, "bodySite");
  if (valued(pw)) {
    td.tx(" (");
    displayCodeableConcept(td, pw.value());
    td.tx(")");
  }

  // value / dataAbsentReason (in red)
  td = tr.td();
  pw = getProperty(obs, "value[x]");
  if (valued(pw)) {
    if (pw.getTypeCode().equals("CodeableConcept"))
      displayCodeableConcept(td, pw.value());
    else if (pw.getTypeCode().equals("string"))
      displayText(td, pw.value());
    else
      td.addText(pw.getTypeCode()+" not rendered yet");
  }

  // units
  td = tr.td();
  td.tx("to do");

  // reference range
  td = tr.td();
  td.tx("to do");

  // flags (status other than F, interpretation, )
  td = tr.td();
  td.tx("to do");

  // issued if different to DR
  td = tr.td();
  td.tx("to do");
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:45,代码来源:NarrativeGenerator.java

示例11: renderIdentifier

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderIdentifier(Identifier ii, XhtmlNode x) {
  x.addText(displayIdentifier(ii));
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:4,代码来源:NarrativeGenerator.java

示例12: renderTiming

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderTiming(Timing s, XhtmlNode x) throws FHIRException {
  x.addText(displayTiming(s));
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:4,代码来源:NarrativeGenerator.java

示例13: renderAnnotation

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderAnnotation(Annotation annot, XhtmlNode x) {
  x.addText(annot.getText());
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:4,代码来源:NarrativeGenerator.java

示例14: renderAddress

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderAddress(Address address, XhtmlNode x) {
  x.addText(displayAddress(address));
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:4,代码来源:NarrativeGenerator.java

示例15: renderContactPoint

import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void renderContactPoint(ContactPoint contact, XhtmlNode x) {
  x.addText(displayContactPoint(contact));
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:4,代码来源:NarrativeGenerator.java


注:本文中的org.hl7.fhir.utilities.xhtml.XhtmlNode.addText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。