本文整理汇总了Java中org.hl7.fhir.utilities.xhtml.XhtmlNode.tr方法的典型用法代码示例。如果您正苦于以下问题:Java XhtmlNode.tr方法的具体用法?Java XhtmlNode.tr怎么用?Java XhtmlNode.tr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hl7.fhir.utilities.xhtml.XhtmlNode
的用法示例。
在下文中一共展示了XhtmlNode.tr方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateProperties
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void generateProperties(XhtmlNode x, CodeSystem cs, String lang) {
if (cs.hasProperty()) {
x.para().b().tx(context.translator().translate("xhtml-gen-cs", "Properties", lang));
XhtmlNode tbl = x.table("grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Code", lang));
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "URL", lang));
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Description", lang));
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Type", lang));
for (PropertyComponent p : cs.getProperty()) {
tr = tbl.tr();
tr.td().tx(p.getCode());
tr.td().tx(p.getUri());
tr.td().tx(p.getDescription());
tr.td().tx(p.hasType() ? p.getType().toCode() : "");
}
}
}
示例2: addLanguageRow
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addLanguageRow(ValueSetExpansionContainsComponent c, XhtmlNode t, List<String> langs) {
XhtmlNode tr = t.tr();
tr.td().addText(c.getCode());
for (String lang : langs) {
String d = null;
for (Extension ext : c.getExtension()) {
if (ToolingExtensions.EXT_TRANSLATION.equals(ext.getUrl())) {
String l = ToolingExtensions.readStringExtension(ext, "lang");
if (lang.equals(l))
d = ToolingExtensions.readStringExtension(ext, "content");;
}
}
tr.td().addText(d == null ? "" : d);
}
for (ValueSetExpansionContainsComponent cc : c.getContains()) {
addLanguageRow(cc, t, langs);
}
}
示例3: addTableHeaderRowStandard
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private XhtmlNode addTableHeaderRowStandard(XhtmlNode t, boolean hasHierarchy, boolean hasDisplay, boolean definitions, boolean comments, boolean version, boolean deprecated, String lang) {
XhtmlNode tr = t.tr();
if (hasHierarchy)
tr.td().b().tx("Lvl");
tr.td().attribute("style", "white-space:nowrap").b().tx(context.translator().translate("xhtml-gen-cs", "Code", lang));
if (hasDisplay)
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Display", lang));
if (definitions)
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Definition", lang));
if (deprecated)
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Deprecated", lang));
if (comments)
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Comments", lang));
if (version)
tr.td().b().tx(context.translator().translate("xhtml-gen-cs", "Version", lang));
return tr;
}
示例4: generate
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
public boolean generate(ResourceContext rcontext, OperationDefinition opd) throws EOperationOutcome, FHIRException, IOException {
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
x.h2().addText(opd.getName());
x.para().addText(Utilities.capitalize(opd.getKind().toString())+": "+opd.getName());
x.para().tx("The official URL for this operation definition is: ");
x.pre().tx(opd.getUrl());
addMarkdown(x, opd.getDescription());
if (opd.getSystem())
x.para().tx("URL: [base]/$"+opd.getCode());
for (CodeType c : opd.getResource()) {
if (opd.getType())
x.para().tx("URL: [base]/"+c.getValue()+"/$"+opd.getCode());
if (opd.getInstance())
x.para().tx("URL: [base]/"+c.getValue()+"/[id]/$"+opd.getCode());
}
x.para().tx("Parameters");
XhtmlNode tbl = x.table( "grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx("Use");
tr.td().b().tx("Name");
tr.td().b().tx("Cardinality");
tr.td().b().tx("Type");
tr.td().b().tx("Binding");
tr.td().b().tx("Documentation");
for (OperationDefinitionParameterComponent p : opd.getParameter()) {
genOpParam(rcontext, tbl, "", p);
}
addMarkdown(x, opd.getComment());
inject(opd, x, NarrativeStatus.GENERATED);
return true;
}
示例5: addObservationToTable
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addObservationToTable(XhtmlNode tbl, ObservationNode o, int i) {
XhtmlNode tr = tbl.tr();
if (o.obs == null) {
XhtmlNode td = tr.td().colspan("6");
td.i().tx("This Observation could not be resolved");
} else {
addObservationToTable(tr, o.obs, i);
// todo: contained observations
}
for (ObservationNode c : o.contained) {
addObservationToTable(tbl, c, i+1);
}
}
示例6: addExpansionRowToTable
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addExpansionRowToTable(XhtmlNode t, ValueSetExpansionContainsComponent c, int i, boolean doLevel, boolean doSystem, boolean doDefinition, List<UsedConceptMap> maps, CodeSystem allCS, List<String> langs) {
XhtmlNode tr = t.tr();
XhtmlNode td = tr.td();
String tgt = makeAnchor(c.getSystem(), c.getCode());
td.an(tgt);
if (doLevel) {
td.addText(Integer.toString(i));
td = tr.td();
}
String s = Utilities.padLeft("", '\u00A0', i*2);
td.attribute("style", "white-space:nowrap").addText(s);
addCodeToTable(c.getAbstract(), c.getSystem(), c.getCode(), c.getDisplay(), td);
if (doSystem) {
td = tr.td();
td.addText(c.getSystem());
}
td = tr.td();
if (c.hasDisplayElement())
td.addText(c.getDisplay());
if (doDefinition) {
CodeSystem cs = allCS;
if (cs == null)
cs = context.fetchCodeSystem(c.getSystem());
td = tr.td();
if (cs != null)
td.addText(CodeSystemUtilities.getCodeDefinition(cs, c.getCode()));
}
for (UsedConceptMap m : maps) {
td = tr.td();
List<TargetElementComponentWrapper> mappings = findMappingsForCode(c.getCode(), m.getMap());
boolean first = true;
for (TargetElementComponentWrapper mapping : mappings) {
if (!first)
td.br();
first = false;
XhtmlNode span = td.span(null, mapping.comp.getEquivalence().toString());
span.addText(getCharForEquivalence(mapping.comp));
addRefToCode(td, mapping.group.getTarget(), m.getLink(), mapping.comp.getCode());
if (!Utilities.noString(mapping.comp.getComment()))
td.i().tx("("+mapping.comp.getComment()+")");
}
}
for (Extension ext : c.getExtension()) {
if (ToolingExtensions.EXT_TRANSLATION.equals(ext.getUrl())) {
String lang = ToolingExtensions.readStringExtension(ext, "lang");
if (!Utilities.noString(lang) && !langs.contains(lang))
langs.add(lang);
}
}
for (ValueSetExpansionContainsComponent cc : c.getContains()) {
addExpansionRowToTable(t, cc, i+1, doLevel, doSystem, doDefinition, maps, allCS, langs);
}
}
示例7: generateComposition
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private boolean generateComposition(ResourceContext rcontext, XhtmlNode x, ValueSet vs, boolean header, List<UsedConceptMap> maps) throws FHIRException, IOException {
boolean hasExtensions = false;
List<String> langs = new ArrayList<String>();
if (header) {
XhtmlNode h = x.h2();
h.addText(vs.getName());
addMarkdown(x, vs.getDescription());
if (vs.hasCopyrightElement())
generateCopyright(x, vs);
}
XhtmlNode p = x.para();
p.tx("This value set includes codes from the following code systems:");
XhtmlNode ul = x.ul();
XhtmlNode li;
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
hasExtensions = genInclude(rcontext, ul, inc, "Include", langs, maps) || hasExtensions;
}
for (ConceptSetComponent exc : vs.getCompose().getExclude()) {
hasExtensions = genInclude(rcontext, ul, exc, "Exclude", langs, maps) || hasExtensions;
}
// now, build observed languages
if (langs.size() > 0) {
Collections.sort(langs);
x.para().b().tx("Additional Language Displays");
XhtmlNode t = x.table( "codes");
XhtmlNode tr = t.tr();
tr.td().b().tx("Code");
for (String lang : langs)
tr.td().b().addText(describeLang(lang));
for (ConceptSetComponent c : vs.getCompose().getInclude()) {
for (ConceptReferenceComponent cc : c.getConcept()) {
addLanguageRow(cc, t, langs);
}
}
}
return hasExtensions;
}
示例8: addTableRow
import org.hl7.fhir.utilities.xhtml.XhtmlNode; //导入方法依赖的package包/类
private void addTableRow(XhtmlNode t, String name, String value) {
XhtmlNode tr = t.tr();
tr.td().addText(name);
tr.td().addText(value);
}