Top Description Fields Constructors Methods
org.apache.poi.poifs.filesystem

public abstract Class EntryNode

extends Object
implements Entry
Class Inheritance
All Implemented Interfaces
org.apache.poi.poifs.filesystem.Entry
Known Direct Subclasses
org.apache.poi.poifs.filesystem.DirectoryNode, org.apache.poi.poifs.filesystem.DocumentNode
Imports
org.apache.poi.poifs.property.Property

Abstract implementation of Entry Extending classes should override isDocument() or isDirectory(), as appropriate Extending classes must override isDeleteOK()

Field Summary

Modifier and TypeField and Description
private DirectoryNode
private Property

Constructor Summary

AccessConstructor and Description
protected
EntryNode(final Property
the Property for this Entry
property
,
final DirectoryNode
the parent of this entry
parent
)

create a DocumentNode.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the Entry was successfully deleted, else false
delete
()

Implements org.apache.poi.poifs.filesystem.Entry.delete.

Delete this Entry.

public String

Returns:

name
getName
()

Implements org.apache.poi.poifs.filesystem.Entry.getName.

get the name of the Entry

public DirectoryEntry

Returns:

this Entry's parent; null iff this is the root Entry
getParent
()

Implements org.apache.poi.poifs.filesystem.Entry.getParent.

get this Entry's parent (the DocumentEntry that owns this Entry).

protected Property

Returns:

the property backing this entry
getProperty
()

grant access to the property

protected abstract boolean

Returns:

true if it's ok to delete the underlying store, else false
isDeleteOK
()

extensions use this method to verify internal rules regarding deletion of the underlying store.

public boolean

Returns:

true if the Entry is a DirectoryEntry, else false
isDirectoryEntry
()

Implements org.apache.poi.poifs.filesystem.Entry.isDirectoryEntry.

is this a DirectoryEntry?

public boolean

Returns:

true if the Entry is a DocumentEntry, else false
isDocumentEntry
()

Implements org.apache.poi.poifs.filesystem.Entry.isDocumentEntry.

is this a DocumentEntry?

protected boolean

Returns:

true if so, else false
isRoot
()

is this the root of the tree?

public boolean

Returns:

true if the operation succeeded, else false
renameTo
(final String
the new name for this Entry
newName
)

Implements org.apache.poi.poifs.filesystem.Entry.renameTo.

Rename this Entry.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_parentback to summary
private DirectoryNode _parent
_propertyback to summary
private Property _property

Constructor Detail

EntryNodeback to summary
protected EntryNode(final Property property, final DirectoryNode parent)

create a DocumentNode. This method is not public by design; it is intended strictly for the internal use of extending classes

Parameters
property:Property

the Property for this Entry

parent:DirectoryNode

the parent of this entry

Method Detail

deleteback to summary
public boolean delete()

Implements org.apache.poi.poifs.filesystem.Entry.delete.

Delete this Entry. This operation should succeed, but there are special circumstances when it will not: If this Entry is the root of the Entry tree, it cannot be deleted, as there is no way to create another one. If this Entry is a directory, it cannot be deleted unless it is empty.

Returns:boolean

true if the Entry was successfully deleted, else false

getNameback to summary
public String getName()

Implements org.apache.poi.poifs.filesystem.Entry.getName.

get the name of the Entry

Returns:String

name

getParentback to summary
public DirectoryEntry getParent()

Implements org.apache.poi.poifs.filesystem.Entry.getParent.

get this Entry's parent (the DocumentEntry that owns this Entry). All Entry objects, except the root Entry, has a parent.

Returns:DirectoryEntry

this Entry's parent; null iff this is the root Entry

getPropertyback to summary
protected Property getProperty()

grant access to the property

Returns:Property

the property backing this entry

isDeleteOKback to summary
protected abstract boolean isDeleteOK()

extensions use this method to verify internal rules regarding deletion of the underlying store.

Returns:boolean

true if it's ok to delete the underlying store, else false

isDirectoryEntryback to summary
public boolean isDirectoryEntry()

Implements org.apache.poi.poifs.filesystem.Entry.isDirectoryEntry.

is this a DirectoryEntry?

Returns:boolean

true if the Entry is a DirectoryEntry, else false

isDocumentEntryback to summary
public boolean isDocumentEntry()

Implements org.apache.poi.poifs.filesystem.Entry.isDocumentEntry.

is this a DocumentEntry?

Returns:boolean

true if the Entry is a DocumentEntry, else false

isRootback to summary
protected boolean isRoot()

is this the root of the tree?

Returns:boolean

true if so, else false

renameToback to summary
public boolean renameTo(final String newName)

Implements org.apache.poi.poifs.filesystem.Entry.renameTo.

Rename this Entry. This operation will fail if: There is a sibling Entry (i.e., an Entry whose parent is the same as this Entry's parent) with the same name. This Entry is the root of the Entry tree. Its name is dictated by the Filesystem and many not be changed.

Parameters
newName:String

the new name for this Entry

Returns:boolean

true if the operation succeeded, else false