@Override protected void countImages() { // count number of images files = (String[]) poi.getDocumentList().toArray(new String[0]); Arrays.sort(files, new Comparator<String>() { @Override public int compare(String o1, String o2) { final Integer n1 = getImageNumber(o1, -1); final Integer n2 = getImageNumber(o2, -1); return n1.compareTo(n2); } }); core.get(0).imageCount = 0; for (String file : files) { String uname = file.toUpperCase(); uname = uname.substring(uname.indexOf(File.separator) + 1); if (uname.endsWith("CONTENTS") && (uname.startsWith("IMAGE") || uname.indexOf("ITEM") != -1) && poi.getFileSize(file) > 1024) { int imageNumber = getImageNumber(file, 0); if (imageNumber >= getImageCount()) { core.get(0).imageCount++; } } } super.countImages(); coordinates = new int[getSeriesCount() * getImageCount()][4]; }
@Override protected void countImages() { // count number of images files = (String[]) poi.getDocumentList().toArray(new String[0]); Arrays.sort(files, new Comparator<String>() { @Override public int compare(String o1, String o2) { final Integer n1 = getImageNumber(o1, -1); final Integer n2 = getImageNumber(o2, -1); return n1.compareTo(n2); } }); core.get(0).imageCount = 0; for (String file : files) { String uname = file.toUpperCase(); uname = uname.substring(uname.indexOf(File.separator) + 1); if (uname.endsWith("CONTENTS") && (uname.startsWith("IMAGE") || uname.indexOf("ITEM") != -1) && poi.getFileSize(file) > 1024) { int imageNumber = getImageNumber(file, 0); if (imageNumber >= getImageCount()) { core.get(0).imageCount++; } } } super.countImages(); coordinates = new int[getSeriesCount() * getImageCount()][4]; }
@Test public void testDocuments() { Vector<String> documents = service.getDocumentList(); for (String document : documents) { if (document.equals(WORKBOOK_DOCUMENT)) { return; } } fail("Unable to find document: " + WORKBOOK_DOCUMENT); }
private String mapOIBFiles() throws FormatException, IOException { String oifName = null; String infoFile = null; final List<String> list = poi.getDocumentList(); for (String name : list) { if (name.endsWith("OibInfo.txt")) {
private String mapOIBFiles() throws FormatException, IOException { String oifName = null; String infoFile = null; final List<String> list = poi.getDocumentList(); for (String name : list) { if (name.endsWith("OibInfo.txt")) {
Vector<String> fileList = poi.getDocumentList();
Vector<String> fileList = poi.getDocumentList();
final List<String> allFiles = poi.getDocumentList(); if (allFiles.isEmpty()) { throw new FormatException(
final List<String> allFiles = poi.getDocumentList(); if (allFiles.isEmpty()) { throw new FormatException(
Vector<String> documents = poi.getDocumentList();
Vector<String> documents = poi.getDocumentList();