Public Member Functions | |
Resource (File associatedFile) | |
Constructs a Resource from a particular file. | |
int | compareTo (Object otherObj) |
Comparator method to sort resources in order from highest to lowest relevance. | |
File | getAssociatedFile () |
Accessor method for associatedFile. | |
String | getFileName () |
A getter for fileName. | |
double | getRelevance () |
Accessor method for relevance. | |
void | setRelevance (double relevance) |
Setter method for relevance. | |
String | toString () |
Returns a string representation of this Resource. | |
Private Member Functions | |
void | readObject (ObjectInputStream in) throws IOException, ClassNotFoundException |
Allows serialization to deal with files correctly. | |
Private Attributes | |
transient File | associatedFile |
The file system object represented by this resource. | |
String | fileName |
The name of the file to set as a resource. | |
double | relevance |
The relevance value of this resource to whatever it is being displayed with. | |
Static Private Attributes | |
static final long | serialVersionUID = 903129020567497504L |
Prevent serialization collisions. |
edu.cmu.hcii.calo.model.Resource.Resource | ( | File | associatedFile | ) |
Constructs a Resource from a particular file.
associatedFile | the file associated with the resource |
int edu.cmu.hcii.calo.model.Resource.compareTo | ( | Object | otherObj | ) |
Comparator method to sort resources in order from highest to lowest relevance.
otherObj | the object to compare this one to |
File edu.cmu.hcii.calo.model.Resource.getAssociatedFile | ( | ) |
Accessor method for associatedFile.
String edu.cmu.hcii.calo.model.Resource.getFileName | ( | ) |
A getter for fileName.
double edu.cmu.hcii.calo.model.Resource.getRelevance | ( | ) |
Accessor method for relevance.
void edu.cmu.hcii.calo.model.Resource.readObject | ( | ObjectInputStream | in | ) | throws IOException, ClassNotFoundException [private] |
Allows serialization to deal with files correctly.
in | the input stream to read from |
IOException | ||
ClassNotFoundException |
void edu.cmu.hcii.calo.model.Resource.setRelevance | ( | double | relevance | ) |
Setter method for relevance.
relevance | the relevance to set |
String edu.cmu.hcii.calo.model.Resource.toString | ( | ) |
Returns a string representation of this Resource.
Useful only for debugging.
final long edu.cmu.hcii.calo.model.Resource.serialVersionUID = 903129020567497504L [static, private] |
Prevent serialization collisions.
transient File edu.cmu.hcii.calo.model.Resource.associatedFile [private] |
The file system object represented by this resource.
String edu.cmu.hcii.calo.model.Resource.fileName [private] |
The name of the file to set as a resource.
double edu.cmu.hcii.calo.model.Resource.relevance [private] |
The relevance value of this resource to whatever it is being displayed with.