edu.iu.iv.modeling.tarl.author
Class AbstractAuthorUtility

java.lang.Object
  |
  +--edu.iu.iv.modeling.tarl.author.AbstractAuthorUtility
Direct Known Subclasses:
DefaultAuthorUtility

public abstract class AbstractAuthorUtility
extends java.lang.Object

This abstract class defines the functions in order to filter Authors based on their attributes. Some of the functions that it fulfils are filtering based on the Topic and whether he/she is active.

Author:
Jeegar T Maru
See Also:
Author, AuthorGroup

Constructor Summary
AbstractAuthorUtility()
           
 
Method Summary
static AuthorGroup filterOnTopicEquality(AuthorGroup authorGroup, Topic topic)
          Filters based on the Topic of Author on the conditions of equality with the specified Topic.
static AuthorGroup getAllActiveAuthors(AuthorGroup authorGroup)
          Filters out Authors that are deactivated.
static java.util.Collection partitionOnTopic(AuthorGroup authorGroup)
          Partitions the Authors on the basis of Topic.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAuthorUtility

public AbstractAuthorUtility()
Method Detail

filterOnTopicEquality

public static AuthorGroup filterOnTopicEquality(AuthorGroup authorGroup,
                                                Topic topic)
Filters based on the Topic of Author on the conditions of equality with the specified Topic. It returns a group of all the Authors which have the specified Topic.

Parameters:
authorGroup - Specifies the group of authors on which to apply the filter
topic - Specifies the topic of author to be equated against
Returns:
the group of authors which belong to the specified topic

getAllActiveAuthors

public static AuthorGroup getAllActiveAuthors(AuthorGroup authorGroup)
Filters out Authors that are deactivated. It returns a group of all the Authors which are active.

Parameters:
authorGroup - Specifies the group of authors on which to apply the filter
Returns:
the group of all the authors in the group that are active

partitionOnTopic

public static java.util.Collection partitionOnTopic(AuthorGroup authorGroup)
Partitions the Authors on the basis of Topic. The method returns a Collection of AuthorsTopicBuckets each with a diferent Topic.

Returns:
the collection of authors-topic buckets each with a different topic