use of org.hl7.fhir.utilities.xls.XLSXmlParser in project kindling by HL7.
the class BindingsFixer method checkBindings.
private static void checkBindings(File f) throws Exception {
System.out.println(f.getName());
XLSXmlParser xls = new XLSXmlParser(new FileInputStream(f), f.getName());
Sheet sheet = xls.getSheets().get("Bindings");
if (sheet != null) {
String sfx = "";
processSheet(xls, sheet, Utilities.getDirectoryForFile(f.getAbsolutePath()), sfx);
}
}
use of org.hl7.fhir.utilities.xls.XLSXmlParser in project kindling by HL7.
the class SourceParser method loadPrimitives.
private void loadPrimitives() throws Exception {
XLSXmlParser xls = new XLSXmlParser(new CSFileInputStream(dtDir + "primitives.xml"), "primitives");
new XLSXmlNormaliser(dtDir + "primitives.xml", exceptionIfExcelNotNormalised).go();
Sheet sheet = xls.getSheets().get("Imports");
for (int row = 0; row < sheet.rows.size(); row++) {
processImport(sheet, row);
}
sheet = xls.getSheets().get("Patterns");
for (int row = 0; row < sheet.rows.size(); row++) {
processStringPattern(sheet, row);
}
}
use of org.hl7.fhir.utilities.xls.XLSXmlParser in project kindling by HL7.
the class SourceParser method loadCompartments.
private void loadCompartments() throws FileNotFoundException, Exception {
XLSXmlParser xml = new XLSXmlParser(new CSFileInputStream(srcDir + "compartments.xml"), "compartments.xml");
new XLSXmlNormaliser(srcDir + "compartments.xml", exceptionIfExcelNotNormalised).go();
Sheet sheet = xml.getSheets().get("compartments");
for (int row = 0; row < sheet.rows.size(); row++) {
Compartment c = new Compartment();
c.setName(sheet.getColumn(row, "Name"));
if (!c.getName().startsWith("!")) {
c.setTitle(sheet.getColumn(row, "Title"));
c.setDescription(sheet.getColumn(row, "Description"));
c.setIdentity(sheet.getColumn(row, "Identification"));
c.setMembership(sheet.getColumn(row, "Inclusion"));
definitions.getCompartments().add(c);
}
}
sheet = xml.getSheets().get("resources");
for (int row = 0; row < sheet.rows.size(); row++) {
String mn = sheet.getColumn(row, "Resource");
if (!Utilities.noString(mn) && !mn.startsWith("!")) {
ResourceDefn r = definitions.getResourceByName(mn);
for (Compartment c : definitions.getCompartments()) {
c.getResources().put(r, sheet.getColumn(row, c.getName()));
}
}
}
}
Aggregations