getters and setters for ClassID - addendum to bug 22195, by Kirril Jacobson

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/branches/REL_2_BRANCH@353430 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Avik Sengupta 2003-11-01 02:20:06 +00:00
parent f23535d9f5
commit 3769595bfb
3 changed files with 40 additions and 0 deletions

View File

@ -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

View File

@ -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 ********** */

View File

@ -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);