1 2 17 18 19 package org.apache.poi.poifs.filesystem; 20 21 import java.util.*; 22 23 import org.apache.poi.poifs.dev.POIFSViewable; 24 import org.apache.poi.poifs.property.DocumentProperty; 25 26 31 32 public class DocumentNode 33 extends EntryNode 34 implements DocumentEntry, POIFSViewable 35 { 36 37 private POIFSDocument _document; 39 40 47 48 DocumentNode(final DocumentProperty property, final DirectoryNode parent) 49 { 50 super(property, parent); 51 _document = property.getDocument(); 52 } 53 54 59 60 POIFSDocument getDocument() 61 { 62 return _document; 63 } 64 65 66 67 72 73 public int getSize() 74 { 75 return getProperty().getSize(); 76 } 77 78 79 80 81 86 87 public boolean isDocumentEntry() 88 { 89 return true; 90 } 91 92 93 94 95 102 103 protected boolean isDeleteOK() 104 { 105 return true; 106 } 107 108 109 110 111 117 118 public Object [] getViewableArray() 119 { 120 return new Object [ 0 ]; 121 } 122 123 130 131 public Iterator getViewableIterator() 132 { 133 List components = new ArrayList(); 134 135 components.add(getProperty()); 136 components.add(_document); 137 return components.iterator(); 138 } 139 140 147 148 public boolean preferArray() 149 { 150 return false; 151 } 152 153 159 160 public String getShortDescription() 161 { 162 return getName(); 163 } 164 165 166 } 168 | Popular Tags |