edu.iu.iv.modeling.tarl.author
Interface AuthorManager

All Known Implementing Classes:
DefaultAuthorManager

public interface AuthorManager

This interface defines all the high-level functions related to the Author environment. The TarlExecuter solely uses this interface to deal with the Author environment. Some of these functions are initializing the Authors environment, producing an Author, terminating the current year, retreiving the author database, computing the co-authorship graph and cleaning up the Author environment.

Author:
Jeegar T Maru
See Also:
AuthorParameters

Method Summary
 void addAuthor(Topic topic)
          Adds an Author to the environment with the specified Topic.
 void cleanUpAuthor()
          Cleans up the Author environment.
 AuthorGroup getAuthors()
          Returns the group of Authors.
 void initializeAuthors(AuthorParameters authorParameters)
          Initializes the Author environment to enable various operations on the Authors.
 java.util.Collection partitionActiveAuthors()
          Returns the Collection of AuthorsTopicBuckets.
 void terminateCurrentYear()
          Terminates the current year for the Author environment.
 

Method Detail

initializeAuthors

public void initializeAuthors(AuthorParameters authorParameters)
Initializes the Author environment to enable various operations on the Authors. This function should be called before calling any other function in AuthorManager.

Parameters:
authorParameters - Specifies the model parameters related to authors

addAuthor

public void addAuthor(Topic topic)
               throws TarlException
Adds an Author to the environment with the specified Topic.

Parameters:
topic - Specifies the topic for the author
Throws:
TarlException - if the specified parameters are insufficient to construct an author

partitionActiveAuthors

public java.util.Collection partitionActiveAuthors()
Returns the Collection of AuthorsTopicBuckets. Each AuthorsTopicBucket contains a fixed number of randomly chosen Authors. AuthorsTopicBuckets are mutually exclusive and exhaustive of the entire AuthorDatabase in the system. The number of Authors in each AuthorsTopicBucket should be (number of co-authors + 1). The number of Authors in a few AuthorsTopicBuckets could be less than (number of co-authors + 1).

Returns:
the collection of author groups

terminateCurrentYear

public void terminateCurrentYear()
Terminates the current year for the Author environment. The function should take the necessary steps that should be taken when the current year ends (for example, notifying authors about year termination).


getAuthors

public AuthorGroup getAuthors()
Returns the group of Authors. This function can be used to generate the Author-Publication graph at the TarlExecuter level where it has access to the group of Authors and Publications.

Returns:
the group of authors in the system

cleanUpAuthor

public void cleanUpAuthor()
Cleans up the Author environment. It is responsible for freeing up resources that the Author environment has used for its execution.