public void keyAssignment(String context, String desc) { keyProps.add(new StringPair(context, desc)); txt.append(desc); } public void commit(XhtmlNode xt) {
public void appendIfNotNull(String s) { if (!Utilities.noString(s)) append(s); } }
public void valueAssignment(String context, String desc) { assignments.add(new StringPair(context, desc)); txt.append(desc); }
public String showTemplateIds(Element element) { List<Element> list = getChildren(element, "templateId"); CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (Element e : list) { if (e.hasAttribute("extension")) b.append(e.getAttribute("root")+"::"+e.getAttribute("extension")); else b.append(e.getAttribute("root")); } return b.toString(); }
private static String renderType(List<TypeRefComponent> type) { if (type == null || type.isEmpty()) return ""; CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (TypeRefComponent c : type) b.append(renderType(c)); return b.toString(); }
public String summary() { CommaSeparatedStringBuilder s = new CommaSeparatedStringBuilder(); CommaSeparatedStringBuilder t = new CommaSeparatedStringBuilder(); for (VariableForProfiling v : list) if (v.mode == VariableMode.INPUT) s.append(v.summary()); else t.append(v.summary()); return "source variables ["+s.toString()+"], target variables ["+t.toString()+"]"; } }
public String summary() { CommaSeparatedStringBuilder s = new CommaSeparatedStringBuilder(); CommaSeparatedStringBuilder t = new CommaSeparatedStringBuilder(); for (Variable v : list) if (v.mode == VariableMode.INPUT) s.append(v.summary()); else t.append(v.summary()); return "source variables ["+s.toString()+"], target variables ["+t.toString()+"]"; } }
private String describeTypes(List<TypeRefComponent> types) { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (TypeRefComponent t : types) { b.append(t.getCode()); } return b.toString(); }
private String commas(List<StringType> discriminator) { CommaSeparatedStringBuilder c = new CommaSeparatedStringBuilder(); for (StringType id : discriminator) c.append(id.asStringValue()); return c.toString(); }
private String describeTypes(List<TypeRefComponent> types) { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (TypeRefComponent t : types) { b.append(t.getCode()); } return b.toString(); }
private String describeTypes(List<TypeRefComponent> types) { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (TypeRefComponent t : types) { b.append(t.getCode()); } return b.toString(); }
private String commas(List<StringType> discriminator) { CommaSeparatedStringBuilder c = new CommaSeparatedStringBuilder(); for (StringType id : discriminator) c.append(id.asStringValue()); return c.toString(); }
private String describeTypes(List<TypeRefComponent> types) { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (TypeRefComponent t : types) { b.append(t.getCode()); } return b.toString(); }
private static String renderCoding(List<Coding> codes) { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (Coding c : codes) b.append(renderCoding(c)); return b.toString(); }
private String validateQuestionnaireResponseItemType(List<ValidationMessage> errors, Element element, NodeStack stack, String... types) { List<Element> values = new ArrayList<Element>(); element.getNamedChildrenWithWildcard("value[x]", values); if (values.size() > 0) { NodeStack ns = stack.push(values.get(0), -1, null, null); CommaSeparatedStringBuilder l = new CommaSeparatedStringBuilder(); for (String s : types) { l.append(s); if (values.get(0).getName().equals("value"+Utilities.capitalize(s))) return(s); } if (types.length == 1) rule(errors, IssueType.STRUCTURE, values.get(0).line(), values.get(0).col(), ns.getLiteralPath(), false, "Answer value must be of type "+types[0]); else rule(errors, IssueType.STRUCTURE, values.get(0).line(), values.get(0).col(), ns.getLiteralPath(), false, "Answer value must be one of the types "+l.toString()); } return null; }
public String typeSummary() { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (TypeRefComponent tr : type) { if (tr.hasCode()) b.append(tr.getCode()); } return b.toString(); }
private String validateQuestionnaireResponseItemType(List<ValidationMessage> errors, Element element, NodeStack stack, String... types) { List<Element> values = new ArrayList<Element>(); element.getNamedChildrenWithWildcard("value[x]", values); if (values.size() > 0) { NodeStack ns = stack.push(values.get(0), -1, null, null); CommaSeparatedStringBuilder l = new CommaSeparatedStringBuilder(); for (String s : types) { l.append(s); if (values.get(0).getName().equals("value"+Utilities.capitalize(s))) return(s); } if (types.length == 1) rule(errors, IssueType.STRUCTURE, values.get(0).line(), values.get(0).col(), ns.getLiteralPath(), false, "Answer value must be of type "+types[0]); else rule(errors, IssueType.STRUCTURE, values.get(0).line(), values.get(0).col(), ns.getLiteralPath(), false, "Answer value must be one of the types "+l.toString()); } return null; }
public static String describeExtensionContext(StructureDefinition ext) { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (StringType t : ext.getContext()) b.append(t.getValue()); if (!ext.hasContextType()) throw new Error("no context type on "+ext.getUrl()); switch (ext.getContextType()) { case DATATYPE: return "Use on data type: "+b.toString(); case EXTENSION: return "Use on extension: "+b.toString(); case RESOURCE: return "Use on element: "+b.toString(); default: return "??"; } }
public static String describeExtensionContext(StructureDefinition ext) { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (StringType t : ext.getContext()) b.append(t.getValue()); if (!ext.hasContextType()) throw new Error("no context type on "+ext.getUrl()); switch (ext.getContextType()) { case DATATYPE: return "Use on data type: "+b.toString(); case EXTENSION: return "Use on extension: "+b.toString(); case RESOURCE: return "Use on element: "+b.toString(); case MAPPING: return "Use where element has mapping: "+b.toString(); default: return "??"; } }
private ValidationResult validateCode(Coding code, CodeSystem cs) { ConceptDefinitionComponent cc = findCodeInConcept(cs.getConcept(), code.getCode()); if (cc == null) return new ValidationResult(IssueSeverity.ERROR, "Unknown Code "+code+" in "+cs.getUrl()); if (code.getDisplay() == null) return new ValidationResult(cc); CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); if (cc.hasDisplay()) { b.append(cc.getDisplay()); if (code.getDisplay().equalsIgnoreCase(cc.getDisplay())) return new ValidationResult(cc); } for (ConceptDefinitionDesignationComponent ds : cc.getDesignation()) { b.append(ds.getValue()); if (code.getDisplay().equalsIgnoreCase(ds.getValue())) return new ValidationResult(cc); } return new ValidationResult(IssueSeverity.WARNING, "Display Name for "+code+" must be one of '"+b.toString()+"'", cc); }