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

All Known Implementing Classes:
DefaultAuthor

public interface Author

This interface defines an Author by defining the necessary functions it should support. The AuthorPublications. The minimal attributes of an Publication are :


All Authors should also support an identification tag that the AuthorDatabase provides to enable other classes to distinguish between different authors.
Some other constraints on authors are as follows :

Author:
Jeegar T Maru
See Also:
AuthorDatabase, Topic

Method Summary
 void deactivate()
          Deactivates the Author explicitly which stops him/her from producing any more publications.
 boolean equals(Author authorInterface)
          Tests whether the current Author is the same as the specified one.
 int getId()
          Returns the unique identifier assigned by the AuthorDatabaseInterface of the Author as an integer
 Topic getTopic()
          Returns the Topic of the Author
 void initialize(int id, Topic topic)
          Initializes the Author with the specified identifier and Topic.
 void initialize(int id, Topic topic, int maximumAge)
          Initializes the Author with the specified identifier, Topic and the maximum age.
 boolean isActive()
          Tests whether the Author is active
 void yearEndNotification()
          Asks the Author to note the end of year.
 

Method Detail

initialize

public void initialize(int id,
                       Topic topic)
Initializes the Author with the specified identifier and Topic. Either of the initialization methods should be called before calling any other method of the Author.

Parameters:
id - Specifies the unique identifier of the author
topic - Specifies the topic of the author

initialize

public void initialize(int id,
                       Topic topic,
                       int maximumAge)
Initializes the Author with the specified identifier, Topic and the maximum age. Either of the initialization methods should be called before calling any other method of the Author.

Parameters:
id - Specifies the unique identifier of the author
topic - Specifies the topic of the author
maximumAge - Specifies the maximum age of the author

getId

public int getId()
Returns the unique identifier assigned by the AuthorDatabaseInterface of the Author as an integer

Returns:
the unique identifier of the author

getTopic

public Topic getTopic()
Returns the Topic of the Author

Returns:
the topic of the author

equals

public boolean equals(Author authorInterface)
Tests whether the current Author is the same as the specified one. This test should be based on the identification tag that the AuthorDatabase has assigned to both the Authors.

Parameters:
authorInterface - Specifies the author to be equated against
Returns:
true, if the current author is equal to the specified one

isActive

public boolean isActive()
Tests whether the Author is active

Returns:
true, if the author is active

deactivate

public void deactivate()
Deactivates the Author explicitly which stops him/her from producing any more publications.


yearEndNotification

public void yearEndNotification()
Asks the Author to note the end of year. The Author needs to update his/her age to reflect the fact.