diff options
author | Avik Sengupta <avik@apache.org> | 2003-11-01 02:20:51 +0000 |
---|---|---|
committer | Avik Sengupta <avik@apache.org> | 2003-11-01 02:20:51 +0000 |
commit | 4f21a40671d9faa73dfce139350992b862b6a372 (patch) | |
tree | 9660050ce5ee5000c826c0e801215087226442f9 /src | |
parent | a09e297f9cdc23ced9d188e991a5f127751794d5 (diff) | |
download | poi-4f21a40671d9faa73dfce139350992b862b6a372.tar.gz poi-4f21a40671d9faa73dfce139350992b862b6a372.zip |
getters and setters for ClassID - addendum to bug 22195, by Kirill Jacobson
sync from branch
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353431 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
3 files changed, 40 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/poifs/filesystem/DirectoryEntry.java b/src/java/org/apache/poi/poifs/filesystem/DirectoryEntry.java index 135a2ba4e2..a85e7e9cb8 100644 --- a/src/java/org/apache/poi/poifs/filesystem/DirectoryEntry.java +++ b/src/java/org/apache/poi/poifs/filesystem/DirectoryEntry.java @@ -59,6 +59,8 @@ import java.io.*; import java.util.*; +import org.apache.poi.hpsf.ClassID; + /** * This interface defines methods specific to Directory objects * managed by a Filesystem instance. @@ -160,5 +162,20 @@ public interface DirectoryEntry public DirectoryEntry createDirectory(final String name) throws IOException; + + /** + * Gets the storage clsid of the directory entry + * + * @return storage Class ID + */ + public ClassID getStorageClsid(); + + /** + * Sets the storage clsid for the directory entry + * + * @param clsidStorage storage Class ID + */ + public void setStorageClsid(ClassID clsidStorage); + } // end public interface DirectoryEntry diff --git a/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java b/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java index d7c670c252..feeb74771d 100644 --- a/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java +++ b/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java @@ -59,6 +59,7 @@ import java.io.*; import java.util.*; +import org.apache.poi.hpsf.ClassID; import org.apache.poi.poifs.dev.POIFSViewable; import org.apache.poi.poifs.property.DirectoryProperty; import org.apache.poi.poifs.property.DocumentProperty; @@ -346,6 +347,26 @@ public class DirectoryNode return rval; } + /** + * Gets the storage clsid of the directory entry + * + * @return storage Class ID + */ + public ClassID getStorageClsid() + { + return getProperty().getStorageClsid(); + } + + /** + * Sets the storage clsid for the directory entry + * + * @param clsidStorage storage Class ID + */ + public void setStorageClsid(ClassID clsidStorage) + { + getProperty().setStorageClsid(clsidStorage); + } + /* ********** END implementation of DirectoryEntry ********** */ /* ********** START implementation of Entry ********** */ diff --git a/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java b/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java index 3d173aa46e..3a62e3e1f0 100644 --- a/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java +++ b/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java @@ -423,6 +423,8 @@ public class POIFSFileSystem DirectoryNode new_dir = ( DirectoryNode ) parent.createDirectory(name); + new_dir.setStorageClsid( property.getStorageClsid() ); + processProperties( small_blocks, big_blocks, (( DirectoryProperty ) property).getChildren(), new_dir); |