Remote Systems
v6.4.1

com.ibm.etools.systems.localfilesubsys.impl
Class LocalVirtualFileImpl

java.lang.Object
  extended bycom.ibm.etools.systems.subsystems.impl.RemoteFileImpl
      extended bycom.ibm.etools.systems.localfilesubsys.impl.LocalFileImpl
          extended bycom.ibm.etools.systems.localfilesubsys.impl.LocalVirtualFileImpl
All Implemented Interfaces:
Cloneable, Comparable, IAdaptable, IRemoteContainer, IRemoteFile, IRemoteFileMutable, IRemotePropertyHolder, ISystemContainer

public class LocalVirtualFileImpl
extends LocalFileImpl


Field Summary
protected  VirtualChild _child
           
protected  File _parentArchive
           
 
Fields inherited from class com.ibm.etools.systems.localfilesubsys.impl.LocalFileImpl
copyright
 
Fields inherited from class com.ibm.etools.systems.subsystems.impl.RemoteFileImpl
_isStale, BINARY_FALSE, BINARY_TRUE, cacheAbsolutePath, canonicalPath, canRead, canWrite, classification, containingArchiveFullName, contents, context, debugMode, DIRECTORY_FALSE, DIRECTORY_TRUE, exists, fullyQualifiedName, isCached, isContainer, isDirectory, isHidden, isRoot, isVirtualFile, isVirtualFolder, label, lastModified, length, nameOnly, parentFile, pathOnly, properties, propertyStates, remoteObj, ROOT_FALSE, ROOT_TRUE, rootOnly, showReadOnly
 
Fields inherited from interface com.ibm.etools.systems.subsystems.IRemoteFile
CONNECTION_DELIMITER, ISROOT_NO, ISROOT_YES
 
Constructor Summary
LocalVirtualFileImpl(IRemoteFileContext context, VirtualChild child)
           
 
Method Summary
 boolean canRead()
          Returns true if the application can read this file.
 boolean canWrite()
          Returns true if the application can write to this file.
 int compareTo(Object other)
          Compare one remote file to another.
 boolean exists()
          Returns true if this folder or file actually exists.
 String getComment()
           
 long getCompressedSize()
           
 String getCompressionMethod()
           
 double getCompressionRatio()
           
 Object getFile()
          Get the object.
 Object getFile(String srcEncoding, boolean isText)
           
 File getFileWrapper()
          Return an object extending java.io.File and proxing this file.
 String getLabel()
          Get the display name for this file.
 long getLastModified()
          Returns the time (in milliseconds since epoch) this file was last modified.
 long getLength()
          Returns the length, in bytes, of this file.
 String getName()
          Get unqualified file name.
 File getParentArchive()
           
 VirtualChild getVirtualChild()
           
 String getVirtualFullName()
           
 String getVirtualFullPath()
           
 String getVirtualName()
           
 boolean isDirectory()
          Returns true if this represents a folder (eg: c:\\folder)
 boolean isVirtual()
          Returns true if this is a virtual file.
 void setCanRead(boolean can)
          Internal method called by the subsystem.
 void setCanWrite(boolean can)
          Internal method called by the subsystem.
 void setVirtualFullName(String string)
           
 void setVirtualFullPath(String string)
           
 void setVirtualName(String string)
           
 
Methods inherited from class com.ibm.etools.systems.localfilesubsys.impl.LocalFileImpl
clearCacheChecks, getClassification, getExpandedSize, isHidden, setExists, setFile, setIsHidden, setLastModified
 
Methods inherited from class com.ibm.etools.systems.subsystems.impl.RemoteFileImpl
clearCache, containsFilterKey, copyContentsTo, getAbsolutePath, getAbsolutePathPlusConnection, getAdapter, getAllFilterStrings, getCachedCopy, getCanonicalPath, getContainingArchiveFullName, getContents, getContents, getContext, getExtension, getFilterString, getLastModifiedDate, getLineSeparator, getLocalAbsolutePath, getParent, getParentName, getParentNoRoot, getParentRemoteFile, getParentRemoteFileSubSystem, getParentRemoteFileSubSystemFactory, getProperties, getProperty, getRoot, getSeparator, getSeparatorChar, getSystemConnection, hasContents, hasContents, isAncestorOf, isArchive, isBinary, isDescendantOf, isExecutable, isFile, isLink, isLocal, isPropertyStale, isRoot, isStale, isText, isUnix, isVirtualFile, isVirtualFolder, markAllPropertiesStale, markPropertyStale, markStale, replaceContent, setAbsolutePath, setClassification, setContainingArchiveFullName, setContents, setExists, setFilterString, setIsContainer, setIsLocal, setLabel, setLength, setLocalAbsolutePath, setName, setNameOnly, setParentRemoteFile, setProperties, setProperty, setVirtualFile, setVirtualFolder, showBriefPropertySet, showReadOnlyProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.subsystems.IRemoteFile
getAbsolutePath, getAbsolutePathPlusConnection, getAllFilterStrings, getCanonicalPath, getExtension, getFilterString, getLastModifiedDate, getLineSeparator, getParent, getParentName, getParentNoRoot, getParentRemoteFile, getParentRemoteFileSubSystem, getRoot, getSeparator, getSeparatorChar, getSystemConnection, isAncestorOf, isArchive, isBinary, isDescendantOf, isExecutable, isFile, isLink, isRoot, isText, setFilterString, showBriefPropertySet, showReadOnlyProperty
 
Methods inherited from interface com.ibm.etools.systems.subsystems.IRemoteContainer
copyContentsTo, getContents, hasContents, replaceContent, setContents
 
Methods inherited from interface com.ibm.etools.systems.model.ISystemContainer
getContents, hasContents, isStale, markStale
 
Methods inherited from interface com.ibm.etools.systems.subsystems.IRemotePropertyHolder
getProperties, getProperty, isPropertyStale, markAllPropertiesStale, markPropertyStale, setProperties, setProperty
 

Field Detail

_parentArchive

protected File _parentArchive

_child

protected VirtualChild _child
Constructor Detail

LocalVirtualFileImpl

public LocalVirtualFileImpl(IRemoteFileContext context,
                            VirtualChild child)
Method Detail

compareTo

public int compareTo(Object other)
              throws ClassCastException
Description copied from interface: IRemoteFile
Compare one remote file to another. This enables us to sort the files so they are shown folders-first, and in alphabetical order.

Specified by:
compareTo in interface IRemoteFile
Overrides:
compareTo in class RemoteFileImpl
Throws:
ClassCastException

getLastModified

public long getLastModified()
Description copied from interface: IRemoteFile
Returns the time (in milliseconds since epoch) this file was last modified.

Specified by:
getLastModified in interface IRemoteFile
Overrides:
getLastModified in class LocalFileImpl
See Also:
IRemoteFile.getLastModified()

getLength

public long getLength()
Description copied from interface: IRemoteFile
Returns the length, in bytes, of this file.

Specified by:
getLength in interface IRemoteFile
Overrides:
getLength in class LocalFileImpl

getFile

public Object getFile()
Description copied from interface: IRemoteFile
Get the object.

Specified by:
getFile in interface IRemoteFile
Overrides:
getFile in class RemoteFileImpl

getParentArchive

public File getParentArchive()

getName

public String getName()
Description copied from interface: IRemoteFile
Get unqualified file name. No root and no path. If this object represents only a root drive, this is the same as getRoot().

Specified by:
getName in interface IRemoteFile
Overrides:
getName in class RemoteFileImpl
See Also:
IRemoteFile.getName()

getVirtualChild

public VirtualChild getVirtualChild()

isVirtual

public boolean isVirtual()
Description copied from interface: IRemoteFile
Returns true if this is a virtual file.

Specified by:
isVirtual in interface IRemoteFile
Overrides:
isVirtual in class RemoteFileImpl

exists

public boolean exists()
Description copied from interface: IRemoteFile
Returns true if this folder or file actually exists.

Specified by:
exists in interface IRemoteFile
Overrides:
exists in class LocalFileImpl

getVirtualFullName

public String getVirtualFullName()

getVirtualFullPath

public String getVirtualFullPath()

getVirtualName

public String getVirtualName()

setVirtualFullName

public void setVirtualFullName(String string)

setVirtualFullPath

public void setVirtualFullPath(String string)

setVirtualName

public void setVirtualName(String string)

getLabel

public String getLabel()
Description copied from interface: IRemoteFile
Get the display name for this file. By default, this should be the same as the name If this object represents only a root drive, this is the same as getRoot().

Specified by:
getLabel in interface IRemoteFile
Overrides:
getLabel in class RemoteFileImpl
See Also:
IRemoteFile.getLabel()

isDirectory

public boolean isDirectory()
Description copied from interface: IRemoteFile
Returns true if this represents a folder (eg: c:\\folder)

Specified by:
isDirectory in interface IRemoteFile
Overrides:
isDirectory in class RemoteFileImpl
See Also:
IRemoteFile.isDirectory()

getFileWrapper

public File getFileWrapper()
Description copied from interface: IRemoteFile
Return an object extending java.io.File and proxing this file. The resulting File object only supports the non-streaming, non static methods.

Specified by:
getFileWrapper in interface IRemoteFile
Overrides:
getFileWrapper in class LocalFileImpl

canRead

public boolean canRead()
Description copied from interface: IRemoteFile
Returns true if the application can read this file.

Specified by:
canRead in interface IRemoteFile
Overrides:
canRead in class LocalFileImpl

canWrite

public boolean canWrite()
Description copied from interface: IRemoteFile
Returns true if the application can write to this file.

Specified by:
canWrite in interface IRemoteFile
Overrides:
canWrite in class LocalFileImpl

setCanRead

public void setCanRead(boolean can)
Description copied from class: RemoteFileImpl
Internal method called by the subsystem.

Specified by:
setCanRead in interface IRemoteFileMutable
Overrides:
setCanRead in class RemoteFileImpl
See Also:
RemoteFileImpl.setLastModified(long), RemoteFileImpl.setExists(boolean), RemoteFileImpl.setAbsolutePath(String, String, boolean, boolean), RemoteFileImpl.setCanWrite(boolean), RemoteFileImpl.setIsHidden(boolean)

setCanWrite

public void setCanWrite(boolean can)
Description copied from class: RemoteFileImpl
Internal method called by the subsystem.

Specified by:
setCanWrite in interface IRemoteFileMutable
Overrides:
setCanWrite in class RemoteFileImpl
See Also:
RemoteFileImpl.setLastModified(long), RemoteFileImpl.setExists(boolean), RemoteFileImpl.setAbsolutePath(String, String, boolean, boolean), RemoteFileImpl.setCanRead(boolean), RemoteFileImpl.setIsHidden(boolean)

getComment

public String getComment()
Specified by:
getComment in interface IRemoteFile
Overrides:
getComment in class LocalFileImpl

getCompressedSize

public long getCompressedSize()
Specified by:
getCompressedSize in interface IRemoteFile
Overrides:
getCompressedSize in class RemoteFileImpl

getCompressionMethod

public String getCompressionMethod()
Specified by:
getCompressionMethod in interface IRemoteFile
Overrides:
getCompressionMethod in class RemoteFileImpl

getCompressionRatio

public double getCompressionRatio()
Specified by:
getCompressionRatio in interface IRemoteFile
Overrides:
getCompressionRatio in class RemoteFileImpl

getFile

public Object getFile(String srcEncoding,
                      boolean isText)

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.