@Override public ExportedDocument read() throws IOException { if (doc != null) { if (readDone && !enableRepeatedReads) { return null; } else { readDone = true; return new ExportedDocumentImpl(doc); } } doc = null; return null; }
@Override public ExportedDocument read() throws IOException { if (iterator.hasNext()) { DocumentModel docModel = iterator.next(); return new ExportedDocumentImpl(docModel, inlineBlobs); } return null; }
@Override public ExportedDocument read() throws IOException { if (docList == null || docList.isEmpty()) { return null; } return new ExportedDocumentImpl(docList.remove(0)); }
@Override public ExportedDocument read() throws IOException { if (docList == null || docList.isEmpty()) { return null; } return new ExportedDocumentImpl(docList.remove(0)); }
@Override public ExportedDocument read() throws IOException { if (iterator.hasNext()) { DocumentModel docModel = iterator.next(); if (pathSegmentsToRemove > 0) { // remove unwanted leading segments return new ExportedDocumentImpl(docModel, docModel.getPath().removeFirstSegments(pathSegmentsToRemove), inlineBlobs); } else { return new ExportedDocumentImpl(docModel, inlineBlobs); } } return null; }
private ExportedDocument createDocument(ZipEntry dirEntry) throws IOException { ExportedDocument xdoc = new ExportedDocumentImpl(); String dirPath = dirEntry.getName(); // TODO -> some processing on the path? xdoc.setPath(new Path(dirPath).removeTrailingSeparator()); // read the main document ZipEntry entry = zip.getEntry(dirPath + ExportConstants.DOCUMENT_FILE); InputStream in = zip.getInputStream(entry); try { Document doc = readXML(in); doc.setDocument(doc); } finally { in.close(); } return null; }
ExportedDocument xdoc = new ExportedDocumentImpl(); xdoc.setPath(new Path("/")); xdoc.setDocument(loadXML(entry)); ExportedDocument xdoc = new ExportedDocumentImpl(); xdoc.setPath(new Path(name).removeTrailingSeparator()); for (int i = 0; i < count; i++) {
ExportedDocument xdoc = new ExportedDocumentImpl(); xdoc.setPath(new Path("/")); xdoc.setDocument(loadXML(entry)); ExportedDocument xdoc = new ExportedDocumentImpl(); xdoc.setPath(new Path(name).removeTrailingSeparator()); for (String childEntryName : childEntries) {
ExportedDocument xdoc = new ExportedDocumentImpl(); for (File file : dir.listFiles()) { if (file.isFile()) {
if (pathSegmentsToRemove > 0) { result = new ExportedDocumentImpl(docModel, docModel.getPath().removeFirstSegments(pathSegmentsToRemove), inlineBlobs); } else { result = new ExportedDocumentImpl(docModel, inlineBlobs);