|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uka.ipd.consensus.impl.SuperSubclassImpl
TODO
Constructor Summary | |
protected |
SuperSubclassImpl(Topic subclass,
Topic superclass,
Association assoc)
|
Method Summary | |
Rating |
addRating(User rater,
double value)
Adds a rating for the given user to this element. |
int |
compareTo(Object other)
|
boolean |
equals(Object other)
|
double |
getAverageRatingValue()
Returns the average value (the arithmetic mean) of all current ratings for this element. |
String |
getId()
Returns the id of the element that is unique within the ontology. |
Rating |
getRating(User rater)
Returns the rating of the given user for this element. |
Collection |
getRatings()
Returns a collection of all current Rating objects (from different users) for this element. |
int |
getRatingsCount()
Returns the number of ratings for this element. |
Topic |
getSubclass()
Returns the subclass topic of a superclass-subclass-relationship between two topics. |
Topic |
getSuperclass()
Returns the superclass topic of a superclass-subclass-relationship between two topics. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected SuperSubclassImpl(Topic subclass, Topic superclass, Association assoc)
Method Detail |
public Topic getSuperclass()
SuperSubclass
getSuperclass
in interface SuperSubclass
null
public Topic getSubclass()
SuperSubclass
getSubclass
in interface SuperSubclass
null
public String getId()
Rateable
getId
in interface Rateable
null
)public Rating addRating(User rater, double value) throws RatingManagerException, DynamicRightsManagerException
Rateable
RatingManager
methods.
addRating
in interface Rateable
rater
- the user who wants to add or change the ratingvalue
- the new value
DynamicRightsManagerException
- if the user is not allowed to rate this element
RatingManagerException
- if the rating could not be created/changedRatingManager
,
DynamicRightsManager.mayAddRating(Rating, Rateable)
public Collection getRatings()
Rateable
getRatings()
methods of RatingManager
.
getRatings
in interface Rateable
null
Rating
,
RatingManager
public int getRatingsCount()
Rateable
getRatingsCount
in interface Rateable
public Rating getRating(User rater)
Rateable
getRatings()
methods of RatingManager
.
getRating
in interface Rateable
rater
- the user who's rating shall be returned
null
if the user hasn't rated this element yetRatingManager
public double getAverageRatingValue()
Rateable
getAverageRatingValue
in interface Rateable
public boolean equals(Object other)
public int hashCode()
public int compareTo(Object other)
compareTo
in interface Comparable
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |