org.apache.oodt.cas.pushpull.protocol
Class ProtocolPath

java.lang.Object
  extended by org.apache.oodt.cas.pushpull.protocol.ProtocolPath
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HttpPath

public class ProtocolPath
extends Object
implements Serializable

This class wraps up a URL for a given path, and whether the path specified by the URL is a dirctory or not

Author:
bfoster
See Also:
Serialized Form

Field Summary
protected  boolean isDir
          Specifies whether this path is a path to a directory or file
protected  String path
          The string verion of the path in the URL
protected  boolean relativeToHOME
           
protected  String remotePath
           
 
Constructor Summary
ProtocolPath()
           
ProtocolPath(String path, boolean isDir)
           
 
Method Summary
protected  String checkForDelimiters(String path)
           
 boolean equals(Object path)
           
 String getDownloadFileName()
          Returns the file name that is used when downloading the file
 String getDownloadPath()
          Returns the path that is used when downloading the file
 String getFileName()
          Return the name of the file for which this path belongs
 String getParentDirPath()
           
 ProtocolPath getParentPath()
           
 String getPathString()
           
 boolean isDirectory()
          Tells whether this path is a path to a directory or not
 boolean isRelativeToHOME()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

path

protected String path
The string verion of the path in the URL


remotePath

protected String remotePath

relativeToHOME

protected boolean relativeToHOME

isDir

protected boolean isDir
Specifies whether this path is a path to a directory or file

Constructor Detail

ProtocolPath

public ProtocolPath()

ProtocolPath

public ProtocolPath(String path,
                    boolean isDir)
Method Detail

checkForDelimiters

protected String checkForDelimiters(String path)

isRelativeToHOME

public boolean isRelativeToHOME()

getPathString

public String getPathString()

getFileName

public String getFileName()
Return the name of the file for which this path belongs

Returns:
The Path file name.

getDownloadPath

public String getDownloadPath()
Returns the path that is used when downloading the file

Returns:
The downloading path

getDownloadFileName

public String getDownloadFileName()
Returns the file name that is used when downloading the file

Returns:
The name used during downloading.

isDirectory

public boolean isDirectory()
Tells whether this path is a path to a directory or not

Returns:
True if this Path is a directory

equals

public boolean equals(Object path)
Overrides:
equals in class Object

getParentDirPath

public String getParentDirPath()
                        throws MalformedURLException
Throws:
MalformedURLException

toString

public String toString()
Overrides:
toString in class Object

getParentPath

public ProtocolPath getParentPath()
                           throws MalformedURLException
Throws:
MalformedURLException


Copyright © 1999-2011 Apache OODT. All Rights Reserved.