Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.plugin
Class DownloadableInfo

java.lang.Object
  extended by cytoscape.plugin.DownloadableInfo
Direct Known Subclasses:
PluginInfo, ThemeInfo

public abstract class DownloadableInfo
extends Object


Constructor Summary
DownloadableInfo()
           
DownloadableInfo(String ID)
           
DownloadableInfo(String ID, DownloadableInfo ParentObj)
           
 
Method Summary
 void addCytoscapeVersion(String cyVersion)
          Contains a list of all the Cytoscape versions this object is compatible with.
 boolean equals(Object Obj)
          Compare the two info objects.
 boolean equalsDifferentObjectVersion(Object Obj)
          Compares the ID and download URL of the two objects.
 String getCategory()
           
 String getCytoscapeVersion()
           
 List<String> getCytoscapeVersions()
           
 String getDescription()
           
 String getDownloadableURL()
           
 String getID()
           
abstract  Installable getInstallable()
           
 String getLicenseText()
           
 String getName()
           
 String getObjectUrl()
           
 String getObjectVersion()
           
 DownloadableInfo getParent()
           
 String getReleaseDate()
           
abstract  DownloadableType getType()
          Return the downloadable type of this object.
abstract  String htmlOutput()
           
 boolean isLicenseRequired()
           
 boolean isNewerObjectVersion(DownloadableInfo New)
          Compare the version of the object to the given object.
 boolean isPluginCompatibleWithCurrent()
           
 void setCategory(Category cat)
           
 void setCategory(String Category)
           
 void setDescription(String description)
           
 void setDownloadableURL(String url)
           
 void setLicense(String licenseText, boolean alwaysRequired)
          Sets the license information for the plugin.
 void setLicense(URL url)
          Sets the license information for the plugin.
 void setName(String name)
           
 void setObjectUrl(String url)
           
 void setObjectVersion(double objVersion)
           
 void setParent(DownloadableInfo ParentObj)
           
 void setReleaseDate(String date)
          TODO - would probably be better to use a date object
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DownloadableInfo

public DownloadableInfo()

DownloadableInfo

public DownloadableInfo(String ID)

DownloadableInfo

public DownloadableInfo(String ID,
                        DownloadableInfo ParentObj)
Method Detail

setLicense

public void setLicense(URL url)
Sets the license information for the plugin. Not required.

Parameters:
url - object where license can be downloaded from.

setLicense

public void setLicense(String licenseText,
                       boolean alwaysRequired)
Sets the license information for the plugin. Not required.

Parameters:
licenseText - string of license.
alwaysRequired - If the user expects the license to be required for both install and update at all times (true) or only at install (false)

setCategory

public void setCategory(String Category)
Parameters:
Category - Sets the category of the downloadable object.

setCategory

public void setCategory(Category cat)

setParent

public void setParent(DownloadableInfo ParentObj)

setName

public void setName(String name)
Parameters:
name - Sets the name of the downloadable object.

setDescription

public void setDescription(String description)
Parameters:
description - Sets the descriptoin of the downloadable object.

setDownloadableURL

public void setDownloadableURL(String url)
Parameters:
url - Sets the URL for the xml file describing all downloadable objects from any given project. (ex. http://cytoscape.org/plugins/plugin.xml)

setObjectUrl

public void setObjectUrl(String url)
Parameters:
url - Set the URL where this object can be downloaded from.

addCytoscapeVersion

public void addCytoscapeVersion(String cyVersion)
                         throws NumberFormatException
Contains a list of all the Cytoscape versions this object is compatible with.

Parameters:
cyVersion -
Throws:
NumberFormatException

setObjectVersion

public void setObjectVersion(double objVersion)
                      throws NumberFormatException
Parameters:
objVersion - Sets the version of this object.
Throws:
NumberFormatException

setReleaseDate

public void setReleaseDate(String date)
TODO - would probably be better to use a date object

Parameters:
date - Sets the release date of this object.

getLicenseText

public String getLicenseText()
Returns:
The text of the license for this plugin if available.

isLicenseRequired

public boolean isLicenseRequired()
Returns:
If the license is always required to be accepted for installs and updates this returns true. If it only is required at install time (never at update) returns false.

getInstallable

public abstract Installable getInstallable()

getType

public abstract DownloadableType getType()
Return the downloadable type of this object.


getParent

public DownloadableInfo getParent()
Returns:
The parent DownloadableInfo object for this object if it has one.

getObjectUrl

public String getObjectUrl()
Returns:
The URL this object can be downloaded from.

getCategory

public String getCategory()
Returns:
Category that describes this downloadable object.

getDownloadableURL

public String getDownloadableURL()
Returns:
Url that returns the document of available downloadable objects this object came from. Example http://cytoscape.org/plugins/plugins.xml

getObjectVersion

public String getObjectVersion()
Returns:
Version of the downloadable object.

getName

public String getName()
Returns:
Name of the downloadable object.

getDescription

public String getDescription()
Returns:
Description of the downloadable object.

getCytoscapeVersion

public String getCytoscapeVersion()
Returns:
Compatible Cytocape version of this object. BUG: THIS IS WRONG, I need to be getting the version that MATCHES the current version not the one that is newest!!

getCytoscapeVersions

public List<String> getCytoscapeVersions()
Returns:
All compatible Cytoscape versions.

getReleaseDate

public String getReleaseDate()
Returns:
Release date for this object.

getID

public String getID()
Returns:
Unique identifier for the downloadable object.

isNewerObjectVersion

public boolean isNewerObjectVersion(DownloadableInfo New)
Compare the version of the object to the given object.

Parameters:
New - Potentially newer DownloadableInfo object
Returns:
true if given version is newer

isPluginCompatibleWithCurrent

public boolean isPluginCompatibleWithCurrent()
Returns:
true if the plugin is compatible with the current version of Cytoscape. NOTE: It is assumed that if a plugin is listed as being compatible with the minor version number it is compatible with all bug fix versions.

equals

public boolean equals(Object Obj)
Compare the two info objects. If the ID, downloadable url and object version are the same they are considered to be the same object. Careful, this overwrites the Object.equals method

Overrides:
equals in class Object

equalsDifferentObjectVersion

public boolean equalsDifferentObjectVersion(Object Obj)
Compares the ID and download URL of the two objects. If they are the same the objects are considered to be equal regardless of version.

Parameters:
Obj -
Returns:

toString

public String toString()
Overrides:
toString in class Object
Returns:
Returns String of downloadable name and version ex. MyPlugin v.1.0

htmlOutput

public abstract String htmlOutput()

www.cytoscape.org