org.millscript.commons.vfs
Class AbstractVEntry<V extends VVolume>

java.lang.Object
  extended by org.millscript.commons.vfs.AbstractVEntry<V>
All Implemented Interfaces:
VEntry
Direct Known Subclasses:
AbstractVFile, AbstractVFolder

public abstract class AbstractVEntry<V extends VVolume>
extends java.lang.Object
implements VEntry

This class provides the skeletal implementation of a virtual filesystem entry,


Constructor Summary
protected AbstractVEntry(V vol, VFolder parent, java.lang.String name)
          Constructs a new virtual filesystem entry with the specified name, parent folder and volume.
 
Method Summary
 java.lang.StringBuffer appendAbsolutePath(java.lang.StringBuffer buffer)
          Appends the absolute path to this entry to the specified string buffer.
 java.lang.StringBuffer appendAbsolutePathOnVolume(java.lang.StringBuffer buffer)
          Appends the absolute path to this entry, from the root folder of this entries volume, to the specified string buffer.
 java.lang.String getAbsolutePath()
          Returns the absolute path to this entry.
 java.lang.String getAbsolutePathOnVolume()
          Returns the absolute path to this entry, on this entries volume.
 java.lang.String getMIMEType(java.lang.String fileName)
          Returns the MIME type for the specified file name.
 MIMETypeHandler getMIMETypeHandler(java.lang.String type)
          Returns a MIME type handler for the specified type.
 java.lang.String getName()
          Returns the name of this entry in the filesystem.
 VFolder getParent()
          Returns the parent folder for this entry.
 java.lang.String getRelativePath()
          Returns the relative path to this entry.
 java.lang.String getRelativePathOnVolume()
          Returns the relative path to this entry, on this entries volume.
 java.net.URI getURI()
          Returns the URI for this virtual filesystem entry.
 V getVolume()
          Returns the volume this entry is located on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.millscript.commons.vfs.VEntry
appendRelativePath, appendRelativePathOnVolume, appendURI, exists, toLocal
 

Constructor Detail

AbstractVEntry

protected AbstractVEntry(V vol,
                         VFolder parent,
                         java.lang.String name)
Constructs a new virtual filesystem entry with the specified name, parent folder and volume.

Parameters:
vol - the volume this entry is held on
parent - the parent folder for this entry
name - the name of the entry
Method Detail

appendAbsolutePath

public final java.lang.StringBuffer appendAbsolutePath(java.lang.StringBuffer buffer)
Description copied from interface: VEntry
Appends the absolute path to this entry to the specified string buffer. The path will be absolute path from the root volume.

Specified by:
appendAbsolutePath in interface VEntry
Parameters:
buffer - the string buffer to append the path to
Returns:
the specified StringBuffer with this entries path appended to it
See Also:
VEntry.appendAbsolutePath(java.lang.StringBuffer)

appendAbsolutePathOnVolume

public final java.lang.StringBuffer appendAbsolutePathOnVolume(java.lang.StringBuffer buffer)
Description copied from interface: VEntry
Appends the absolute path to this entry, from the root folder of this entries volume, to the specified string buffer. The path will be absolute from the volume this entry belongs to.

Specified by:
appendAbsolutePathOnVolume in interface VEntry
Parameters:
buffer - the string buffer to append the path to
Returns:
the specified StringBuffer with this entries path appended to it
See Also:
VEntry.appendAbsolutePathOnVolume(java.lang.StringBuffer)

getAbsolutePath

public final java.lang.String getAbsolutePath()
Description copied from interface: VEntry
Returns the absolute path to this entry.

Specified by:
getAbsolutePath in interface VEntry
Returns:
the absolute path string for this entry
See Also:
VEntry.getAbsolutePath()

getAbsolutePathOnVolume

public final java.lang.String getAbsolutePathOnVolume()
Description copied from interface: VEntry
Returns the absolute path to this entry, on this entries volume.

Specified by:
getAbsolutePathOnVolume in interface VEntry
Returns:
the absolute path string for this entry
See Also:
VEntry.getAbsolutePathOnVolume()

getMIMEType

public final java.lang.String getMIMEType(java.lang.String fileName)
Description copied from interface: VEntry
Returns the MIME type for the specified file name.

Specified by:
getMIMEType in interface VEntry
Parameters:
fileName - the file name to get a MIME type for
Returns:
a String holding the MIME type for the specified file name
See Also:
VEntry.getMIMEType(java.lang.String)

getMIMETypeHandler

public final MIMETypeHandler getMIMETypeHandler(java.lang.String type)
Description copied from interface: VEntry
Returns a MIME type handler for the specified type.

Specified by:
getMIMETypeHandler in interface VEntry
Parameters:
type - the MIME type to get a handler for
Returns:
a MIMETypeHandler for the specified type
See Also:
VEntry.getMIMETypeHandler(java.lang.String)

getName

public final java.lang.String getName()
Description copied from interface: VEntry
Returns the name of this entry in the filesystem.

Specified by:
getName in interface VEntry
Returns:
this entries name
See Also:
VEntry.getName()

getRelativePath

public final java.lang.String getRelativePath()
Description copied from interface: VEntry
Returns the relative path to this entry.

Specified by:
getRelativePath in interface VEntry
Returns:
the relative path string for this entry
See Also:
VEntry.getRelativePath()

getRelativePathOnVolume

public final java.lang.String getRelativePathOnVolume()
Description copied from interface: VEntry
Returns the relative path to this entry, on this entries volume.

Specified by:
getRelativePathOnVolume in interface VEntry
Returns:
the relative path string for this entry
See Also:
VEntry.getRelativePathOnVolume()

getParent

public final VFolder getParent()
Description copied from interface: VEntry
Returns the parent folder for this entry.

Specified by:
getParent in interface VEntry
Returns:
the parent folder for this entry
See Also:
VEntry.getParent()

getURI

public final java.net.URI getURI()
Description copied from interface: VEntry
Returns the URI for this virtual filesystem entry.

Specified by:
getURI in interface VEntry
Returns:
a URI for this entry
See Also:
VEntry.getURI()

getVolume

public final V getVolume()
Description copied from interface: VEntry
Returns the volume this entry is located on.

Specified by:
getVolume in interface VEntry
Returns:
the VVolume for this entry
See Also:
VEntry.getVolume()


Copyright © 2005-2007 Open World Ltd. All Rights Reserved.