edu.iu.iv.modeling.tarl.publication.impl
Class DefaultPublicationManager

java.lang.Object
  |
  +--edu.iu.iv.modeling.tarl.publication.impl.DefaultPublicationManager
All Implemented Interfaces:
PublicationManager

public class DefaultPublicationManager
extends java.lang.Object
implements PublicationManager

This class defines a default implementation of the PublicationManagerInterface which manages the group of publications. It uses an instance of the PublicationDatabase to perform its tasks.

Author:
Jeegar T Maru
See Also:
DefaultPublicationDatabase, PublicationManager

Constructor Summary
DefaultPublicationManager()
          Creates a new instance of a PublicationManager with the default current year 0
DefaultPublicationManager(PublicationParameters publicationParameters)
          Creates a new instance of a PublicationManager with the given current year
 
Method Summary
 void cleanUpPublication()
          Cleans up the publication environment by removing all the instances of the Publications from the database
 PublicationGroup getPublications()
          Returns all the Publications in the environment
 void initializePublications(PublicationParameters publicationParameters, java.io.File agingFunctionFile)
          Initializes the Publications environment with the specified model parameters
 void producePublications(AuthorsTopicBucket authorsTopicBucket)
          Produces the Publications for the specified authors and topic
 void producePublicationsAtStart(AuthorsTopicBucket authorsTopicBucket)
          Produces the Publications for the specified authors and topic at the very start of the model
 void terminateCurrentYear()
          Terminates the current year.
 java.lang.String toString()
          Returns the details of the PublicationDatabase as a String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultPublicationManager

public DefaultPublicationManager()
Creates a new instance of a PublicationManager with the default current year 0


DefaultPublicationManager

public DefaultPublicationManager(PublicationParameters publicationParameters)
Creates a new instance of a PublicationManager with the given current year

Parameters:
publicationParameters - Specifies the model parameters related to publication environment
Method Detail

initializePublications

public void initializePublications(PublicationParameters publicationParameters,
                                   java.io.File agingFunctionFile)
Initializes the Publications environment with the specified model parameters

Specified by:
initializePublications in interface PublicationManager
Parameters:
publicationParameters - Specifies the publication parameters for the model

producePublicationsAtStart

public void producePublicationsAtStart(AuthorsTopicBucket authorsTopicBucket)
                                throws TarlException
Produces the Publications for the specified authors and topic at the very start of the model

Specified by:
producePublicationsAtStart in interface PublicationManager
Parameters:
authorsTopicBucket - Specifies the authors and topic for the new publications
Throws:
TarlException - if the new publications cannot be initialized

producePublications

public void producePublications(AuthorsTopicBucket authorsTopicBucket)
                         throws TarlException
Produces the Publications for the specified authors and topic

Specified by:
producePublications in interface PublicationManager
Parameters:
authorsTopicBucket - Specifies the authors and topic for the new publications
Throws:
TarlException - if the new publications cannot be initialized

terminateCurrentYear

public void terminateCurrentYear()
Terminates the current year. This method is called so that the PublicationManager can update its internal copy of current_year.

Specified by:
terminateCurrentYear in interface PublicationManager

getPublications

public PublicationGroup getPublications()
Returns all the Publications in the environment

Specified by:
getPublications in interface PublicationManager
Returns:
the group of publications in the environment

cleanUpPublication

public void cleanUpPublication()
Cleans up the publication environment by removing all the instances of the Publications from the database

Specified by:
cleanUpPublication in interface PublicationManager

toString

public java.lang.String toString()
Returns the details of the PublicationDatabase as a String

Overrides:
toString in class java.lang.Object
Returns:
a string describing the publication database