Class FileTransferID
- java.lang.Object
-
- org.eclipse.ecf.core.identity.BaseID
-
- org.eclipse.ecf.provider.filetransfer.identity.FileTransferID
-
- All Implemented Interfaces:
Serializable
,Comparable
,Principal
,org.eclipse.core.runtime.IAdaptable
,ID
,IFileID
public class FileTransferID extends BaseID implements IFileID
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileTransferID(Namespace namespace, URI uri)
FileTransferID(Namespace namespace, URL url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFilename()
Get the file name from this IFileID.protected String
getFileNameOnly()
URI
getURI()
Get the URI associated with the file identified by this IFileID.URL
getURL()
Get the url associated with the file identified by this IFileID.protected int
namespaceCompareTo(BaseID o)
protected boolean
namespaceEquals(BaseID o)
Called byNamespace.testIDEquals(BaseID, BaseID)
.protected String
namespaceGetName()
Called byNamespace.getNameForID(BaseID)
.protected int
namespaceHashCode()
Called byNamespace.getHashCodeForID(BaseID)
.String
toString()
-
Methods inherited from class org.eclipse.ecf.core.identity.BaseID
compareTo, equals, getAdapter, getName, getNamespace, hashCode, namespaceToExternalForm, toExternalForm
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.eclipse.ecf.core.identity.ID
equals, getName, getNamespace, hashCode, toExternalForm
-
-
-
-
Method Detail
-
namespaceCompareTo
protected int namespaceCompareTo(BaseID o)
Description copied from class:BaseID
- Specified by:
namespaceCompareTo
in classBaseID
- Parameters:
o
- the other ID to compare to. Will not benull
.- Returns:
- the appropriate value as per
Comparable
contract.
-
namespaceEquals
protected boolean namespaceEquals(BaseID o)
Description copied from class:BaseID
Called byNamespace.testIDEquals(BaseID, BaseID)
.- Specified by:
namespaceEquals
in classBaseID
- Parameters:
o
- the other ID to test against. May benull
.- Returns:
true
if this ID is equal to the given ID.false
otherwise.
-
namespaceGetName
protected String namespaceGetName()
Description copied from class:BaseID
Called byNamespace.getNameForID(BaseID)
.- Specified by:
namespaceGetName
in classBaseID
- Returns:
- String name for this ID. Must not be
null
. Value returned should be unique within this Namespace.
-
namespaceHashCode
protected int namespaceHashCode()
Description copied from class:BaseID
Called byNamespace.getHashCodeForID(BaseID)
.- Specified by:
namespaceHashCode
in classBaseID
- Returns:
- int hashCode for this ID. Returned value must be unique within this process.
-
getFilename
public String getFilename()
Description copied from interface:IFileID
Get the file name from this IFileID. This will return just the filename portion of a more complex file ID, e.g. index.html from IFileID created with value "http://www.composent.com/index.html"- Specified by:
getFilename
in interfaceIFileID
- Returns:
- String just the file name and extension (if any) for this given
IFileID. Will not be
null
.
-
getURL
public URL getURL() throws MalformedURLException
Description copied from interface:IFileID
Get the url associated with the file identified by this IFileID.- Specified by:
getURL
in interfaceIFileID
- Returns:
- URL associated with this IFileID. Will not be null.
- Throws:
MalformedURLException
- thrown if URL cannot be created for this IFileID
-
getFileNameOnly
protected String getFileNameOnly()
-
toString
public String toString()
-
getURI
public URI getURI() throws URISyntaxException
Description copied from interface:IFileID
Get the URI associated with the file identified by this IFileID.- Specified by:
getURI
in interfaceIFileID
- Returns:
- URI associated with this IFileID. Will not be
null
. - Throws:
URISyntaxException
- thrown if URI cannot be created for this IFileID.- Since:
- 3.2
-
-