public XDGFSheet(SheetType sheet, XDGFDocument document) { try { _sheet = sheet; _document = document; for (CellType cell: sheet.getCellArray()) { if (_cells.containsKey(cell.getN())) throw new POIXMLException("Unexpected duplicate cell " + cell.getN()); // this shouldn't happen _cells.put(cell.getN(), new XDGFCell(cell)); } // only geometry sections can have duplicate names // sections can be found in the master too, if there are no attributes here! // no idea if I have a master in this space. go figure. for (SectionType section: sheet.getSectionArray()) { String name = section.getN(); if (name.equals("Geometry")) { _geometry.put(section.getIX(), new GeometrySection(section, this)); } else if (name.equals("Character")) { _character = new CharacterSection(section, this); } else { _sections.put(name, XDGFSection.load(section, this)); } } } catch (POIXMLException e) { throw XDGFException.wrap(this.toString(), e); } }
public XDGFSheet(SheetType sheet, XDGFDocument document) { try { _sheet = sheet; _document = document; for (CellType cell: sheet.getCellArray()) { if (_cells.containsKey(cell.getN())) throw new POIXMLException("Unexpected duplicate cell " + cell.getN()); // this shouldn't happen _cells.put(cell.getN(), new XDGFCell(cell)); } // only geometry sections can have duplicate names // sections can be found in the master too, if there are no attributes here! // no idea if I have a master in this space. go figure. for (SectionType section: sheet.getSectionArray()) { String name = section.getN(); if (name.equals("Geometry")) { _geometry.put(section.getIX(), new GeometrySection(section, this)); } else if (name.equals("Character")) { _character = new CharacterSection(section, this); } else { _sections.put(name, XDGFSection.load(section, this)); } } } catch (POIXMLException e) { throw XDGFException.wrap(this.toString(), e); } }