|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines the PublicationDatabase which is used to store all the Publications ever produced in the system. The interface is responsible for actions like initializing the database, adding a new Publication to the database, iterating through each Publication of the database, removing all the Publications from the database, etc.
Apart from these functions, the major responsibility of the interface is to tag each Publication with a unique identifier which distinguishes it from other Publications.
PublicationGroup,
PublicationManager| Method Summary | |
void |
addPublication(int year,
Topic topic,
AuthorGroup authors)
Adds a new Publication to the database with the specified year of publication, Topic and the group of Authors. |
void |
addPublication(int year,
Topic topic,
AuthorGroup authors,
PublicationGroup citations)
Adds a new Publication to the database with the specified year of publication, Topic and the group of Authors and the group of Publications. |
Publication |
getNextPublication()
Returns the next Publication in the database while iteration |
PublicationGroup |
getPublications()
Returns all the Publications in the database |
boolean |
hasMorePublications()
Tests whether the database has more Publications for iteration |
void |
removeAll()
Removes all the Publications from the database |
void |
resetSearchIndex()
Resets the Search Index to the start of the list of Publications. |
int |
size()
Returns the number of Publications in the database |
| Method Detail |
public void addPublication(int year,
Topic topic,
AuthorGroup authors)
throws TarlException
Publication to the database with the specified year of publication, Topic and the group of Authors. The system should store the Publication for retreival in the future. It is assumed that the Publication has no citations at all.
year - Specifies the year of publicationtopic - Specifies the topic that the publication belongs toauthors - Specifies the group of authors who have collaborated for the publication
TarlException - if the specified parameters are insufficient to construct a publication
public void addPublication(int year,
Topic topic,
AuthorGroup authors,
PublicationGroup citations)
throws TarlException
Publication to the database with the specified year of publication, Topic and the group of Authors and the group of Publications. The system should store the Publication for retreival in the future.
year - Specifies the year of publicationtopic - Specifies the topic that the publication belongs toauthors - Specifies the group of authors who have collaborated for the publicationcitations - Specifies the group of citations for the publication
TarlException - if the specified parameters are insufficient to construct a publicationpublic PublicationGroup getPublications()
Publications in the database
public int size()
Publications in the database
public void resetSearchIndex()
Publications. This function is called just before iterating through the Publications.
public boolean hasMorePublications()
Publications for iteration
public Publication getNextPublication()
throws java.util.NoSuchElementException
Publication in the database while iteration
java.util.NoSuchElementException - if the database has no more publicationspublic void removeAll()
Publications from the database
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||