gpt4 book ai didi

org.hl7.fhir.utilities.xml.XMLUtil.getNamedChildren()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 08:20:40 30 4
gpt4 key购买 nike

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

XMLUtil.getNamedChildren介绍

暂无

代码示例

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

public static void deleteByName(Element e, String name) {
 List<Element> matches = getNamedChildren(e, name);
 for (Element m : matches)
  e.removeChild(m);    
}

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

@Override
public void getNamedChildren(String name, List<WrapperElement> list) {
 List<Element> el = new ArrayList<Element>();
 XMLUtil.getNamedChildren(element, name, el);
 for (Element e : el)
  list.add(new DOMWrapperElement(e));
}

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

private String getRubric(Element cls, String kind) {
 List<Element> rubrics = new ArrayList<Element>(); 
 XMLUtil.getNamedChildren(cls, "Rubric", rubrics);
 for (Element r : rubrics) {
  if (r.getAttribute("kind").equals(kind))
   return XMLUtil.getNamedChild(r,  "Label").getTextContent();
 }
 return null;
}

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

private void processPanes(Element panes) {
 for (Element pane : XMLUtil.getNamedChildren(panes, "Pane"))
  processPane(pane);        
}

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

private void processWorksheet(Element wk) throws FHIRException  {
 Element tbl = XMLUtil.getNamedChild(wk, "Table");
 processTable(tbl);
 for (Element row : XMLUtil.getNamedChildren(tbl, "Row"))
  processRow(row);      
 for (Element col : XMLUtil.getNamedChildren(tbl, "Column"))
  processCol(col);      
 for (Element wo : XMLUtil.getNamedChildren(wk, "WorksheetOptions"))
  processOptions(wo);      
}

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

private String readData(Element cell, int col, String s) throws DOMException, FHIRException  {
 List<Element> data = new ArrayList<Element>(); 
 XMLUtil.getNamedChildren(cell, "Data", data); // cell.getElementsByTagNameNS(XLS_NS, "Data");
 if (data.size() == 0)
  return "";
 check(data.size() == 1, "Multiple Data encountered ("+Integer.toString(data.size())+" @ col "+Integer.toString(col)+" - "+cell.getTextContent()+" ("+s+"))");
 Element d = data.get(0);
 String type = d.getAttributeNS(XLS_NS, "Type");
 if ("Boolean".equals(type)) {
  if (d.getTextContent().equals("1"))
   return "True";
  else
   return "False";
 } else if ("String".equals(type)) {
  return d.getTextContent();
 } else if ("Number".equals(type)) {
  return d.getTextContent();
 } else if ("DateTime".equals(type)) {
  return d.getTextContent();
 } else if ("Error".equals(type)) {
  return null;
 } else 
  throw new FHIRException("Cell Type is not known ("+d.getAttributeNodeNS(XLS_NS, "Type")+") in "+getLocation());
}

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

private String readData(Element cell, int col, String s) throws DOMException, FHIRException  {
 List<Element> data = new ArrayList<Element>(); 
 XMLUtil.getNamedChildren(cell, "Data", data); // cell.getElementsByTagNameNS(XLS_NS, "Data");
 if (data.size() == 0)
  return "";
 check(data.size() == 1, "Multiple Data encountered ("+Integer.toString(data.size())+" @ col "+Integer.toString(col)+" - "+cell.getTextContent()+" ("+s+"))");
 Element d = data.get(0);
 String type = d.getAttributeNS(XLS_NS, "Type");
 if ("Boolean".equals(type)) {
  if (d.getTextContent().equals("1"))
   return "True";
  else
   return "False";
 } else if ("String".equals(type)) {
  return d.getTextContent();
 } else if ("Number".equals(type)) {
  return d.getTextContent();
 } else if ("DateTime".equals(type)) {
  return d.getTextContent();
 } else if ("Error".equals(type)) {
  return null;
 } else 
  throw new FHIRException("Cell Type is not known ("+d.getAttributeNodeNS(XLS_NS, "Type")+") in "+getLocation());
}

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

private void processOptions(Element wo) {
 XMLUtil.deleteByName(wo, "Unsynced");
 XMLUtil.deleteByName(wo, "Panes");
 for (Element panes : XMLUtil.getNamedChildren(wo, "Panes"))
  processPanes(panes);      
}

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

XMLUtil.deleteByName(xw, "WindowTopY");
for (Element wk : XMLUtil.getNamedChildren(root, "Worksheet"))
 processWorksheet(wk);

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

vs.addIdentifier(new Identifier().setValue(identifier.getAttribute("uid")));
List<Element> authors = new ArrayList<Element>(); 
XMLUtil.getNamedChildren(XMLUtil.getNamedChild(doc.getDocumentElement(), "Authors"), "Author", authors);
for (Element a : authors)
 if (!a.getAttribute("name").contains("+"))
cs.setHierarchyMeaning(CodeSystemHierarchyMeaning.CLASSIFIEDWITH);
authors = new ArrayList<Element>(); 
XMLUtil.getNamedChildren(XMLUtil.getNamedChild(doc.getDocumentElement(), "Authors"), "Author", authors);
for (Element a : authors)
 if (!a.getAttribute("name").contains("+"))
XMLUtil.getNamedChildren(doc.getDocumentElement(), "Class", classes);
for (Element cls : classes) {
 processClass(cls, concepts, cs);

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

public static void deleteByName(Element e, String name) {
 List<Element> matches = getNamedChildren(e, name);
 for (Element m : matches)
  e.removeChild(m);    
}

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

XMLUtil.getNamedChildren(cls, "SubClass", children);
if (children.size() > 0)
 CodeSystemUtilities.setNotSelectable(define, concept);

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

private void processPanes(Element panes) {
 for (Element pane : XMLUtil.getNamedChildren(panes, "Pane"))
  processPane(pane);        
}

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

private String getRubric(Element cls, String kind) {
 List<Element> rubrics = new ArrayList<Element>(); 
 XMLUtil.getNamedChildren(cls, "Rubric", rubrics);
 for (Element r : rubrics) {
  if (r.getAttribute("kind").equals(kind))
   return XMLUtil.getNamedChild(r,  "Label").getTextContent();
 }
 return null;
}

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

@Override
public void getNamedChildren(String name, List<WrapperElement> list) {
 List<Element> el = new ArrayList<Element>();
 XMLUtil.getNamedChildren(element, name, el);
 for (Element e : el)
  list.add(new DOMWrapperElement(e));
}

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

private void processWorksheet(Element wk) throws FHIRException  {
 Element tbl = XMLUtil.getNamedChild(wk, "Table");
 processTable(tbl);
 for (Element row : XMLUtil.getNamedChildren(tbl, "Row"))
  processRow(row);      
 for (Element col : XMLUtil.getNamedChildren(tbl, "Column"))
  processCol(col);      
 for (Element wo : XMLUtil.getNamedChildren(wk, "WorksheetOptions"))
  processOptions(wo);      
}

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

private String readData(Element cell, int col, String s) throws DOMException, FHIRException  {
 List<Element> data = new ArrayList<Element>(); 
 XMLUtil.getNamedChildren(cell, "Data", data); // cell.getElementsByTagNameNS(XLS_NS, "Data");
 if (data.size() == 0)
  return "";
 check(data.size() == 1, "Multiple Data encountered ("+Integer.toString(data.size())+" @ col "+Integer.toString(col)+" - "+cell.getTextContent()+" ("+s+"))");
 Element d = data.get(0);
 String type = d.getAttributeNS(XLS_NS, "Type");
 if ("Boolean".equals(type)) {
  if (d.getTextContent().equals("1"))
   return "True";
  else
   return "False";
 } else if ("String".equals(type)) {
  return d.getTextContent();
 } else if ("Number".equals(type)) {
  return d.getTextContent();
 } else if ("DateTime".equals(type)) {
  return d.getTextContent();
 } else if ("Error".equals(type)) {
  return null;
 } else 
  throw new FHIRException("Cell Type is not known ("+d.getAttributeNodeNS(XLS_NS, "Type")+") in "+getLocation());
}

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

private String readData(Element cell, int col, String s) throws DOMException, FHIRException  {
 List<Element> data = new ArrayList<Element>(); 
 XMLUtil.getNamedChildren(cell, "Data", data); // cell.getElementsByTagNameNS(XLS_NS, "Data");
 if (data.size() == 0)
  return "";
 check(data.size() == 1, "Multiple Data encountered ("+Integer.toString(data.size())+" @ col "+Integer.toString(col)+" - "+cell.getTextContent()+" ("+s+"))");
 Element d = data.get(0);
 String type = d.getAttributeNS(XLS_NS, "Type");
 if ("Boolean".equals(type)) {
  if (d.getTextContent().equals("1"))
   return "True";
  else
   return "False";
 } else if ("String".equals(type)) {
  return d.getTextContent();
 } else if ("Number".equals(type)) {
  return d.getTextContent();
 } else if ("DateTime".equals(type)) {
  return d.getTextContent();
 } else if ("Error".equals(type)) {
  return null;
 } else 
  throw new FHIRException("Cell Type is not known ("+d.getAttributeNodeNS(XLS_NS, "Type")+") in "+getLocation());
}

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

private void processOptions(Element wo) {
 XMLUtil.deleteByName(wo, "Unsynced");
 XMLUtil.deleteByName(wo, "Panes");
 for (Element panes : XMLUtil.getNamedChildren(wo, "Panes"))
  processPanes(panes);      
}

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

XMLUtil.getNamedChildren(cls, "SubClass", children);
if (children.size() > 0)
 CodeSystemUtilities.setNotSelectable(define, concept);

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com