|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.iu.iv.modeling.tarl.publication.impl.DefaultPublication
This class defines a default implementation of a PublicationInterface. Publications are represented by the following attributes :
Publication as an integer Topic of the Publication Authors who have collaborated for the Publication as an AuthorGroup Publications as a PublicationGroup
DefaultTopic,
DefaultAuthorGroup,
DefaultPublicationGroup,
Publication| Constructor Summary | |
DefaultPublication()
Creates a new instance of a default Publication |
|
DefaultPublication(int id,
int year,
Topic topic,
AuthorGroup authors)
Creates a new instance for an Publication with the specified id and Topic. |
|
DefaultPublication(int id,
int year,
Topic topic,
AuthorGroup authors,
PublicationGroup citations)
Creates a new instance for a Publication with the specified id, Topic, authors and citations |
|
| Method Summary | |
void |
addCitation(Publication citation)
Adds a Citation to the group of citations of the Publication |
boolean |
equals(Publication publication)
Tests whether the current Publication is the same as the Publication given by the parameter |
AuthorGroup |
getAuthors()
Returns the Authors of the Publication |
PublicationGroup |
getCitations()
Returns the Citations of the Publication |
int |
getId()
Returns the id of the Publication |
Topic |
getTopic()
Returns the Topic of the Publication |
int |
getYear()
Returns the year of Publication |
void |
initialize(int id,
int year,
Topic topic,
AuthorGroup authors)
Initializes an instance of a Publication with the specified id, Topic and the group of Authors |
void |
initialize(int id,
int year,
Topic topic,
AuthorGroup authors,
PublicationGroup citations)
Initializes an instance of a Publication with the specified id, Topic, the group of Authors and the group of Publications |
java.lang.String |
toString()
Returns the details of the Publication as a String |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DefaultPublication()
Publication
public DefaultPublication(int id,
int year,
Topic topic,
AuthorGroup authors)
throws TarlException
Publication with the specified id and Topic. A Publication should have an id, a year of publication, a Topic and a set of authors at the very least.
id - Specifies the unique id for the newly instantiated Publicationtopic - Specifies the topic for the newly instantiated Publicationauthors - Specifies the authors who have contributed for the newly instantiated Publication
TarlException - if topic or authors are not specified
public DefaultPublication(int id,
int year,
Topic topic,
AuthorGroup authors,
PublicationGroup citations)
throws TarlException
Publication with the specified id, Topic, authors and citations
id - Specifies the unique id for the newly instantiated Publicationtopic - Specifies the topic for the newly instantiated Publicationauthors - Specifies the authors who have contributed for the newly instantiated Publicationcitations - Specifies the citations for the the newly instantiated Publication
TarlException - if there are no topics or authors specified| Method Detail |
public void initialize(int id,
int year,
Topic topic,
AuthorGroup authors)
throws TarlException
Publication with the specified id, Topic and the group of Authors
initialize in interface Publicationid - Specifies the unique identifier for the publicationtopic - Specifies the topic for the publicationauthors - Specifies the authors who have contributed for the publicationyear - Specifies the year of publication
TarlException - if topic or authors are not specified
public void initialize(int id,
int year,
Topic topic,
AuthorGroup authors,
PublicationGroup citations)
throws TarlException
Publication with the specified id, Topic, the group of Authors and the group of Publications
initialize in interface Publicationid - Specifies the unique id for the newly instantiated Publicationtopic - Specifies the topic for the newly instantiated Publicationauthors - Specifies the authors who have contributed for the newly instantiated Publicationcitations - Specifies the citations for the the newly instantiated Publicationyear - Specifies the year of publication
TarlException - if there are no topics or authors specifiedpublic int getId()
Publication
getId in interface Publicationpublic int getYear()
Publication
getYear in interface Publicationpublic Topic getTopic()
Topic of the Publication
getTopic in interface Publicationpublic AuthorGroup getAuthors()
Authors of the Publication
getAuthors in interface Publicationpublic PublicationGroup getCitations()
Publication
getCitations in interface Publicationpublic void addCitation(Publication citation)
Publication
citation - Specifies the citation to be added to the grouppublic boolean equals(Publication publication)
Publication is the same as the Publication given by the parameter
equals in interface Publicationpublication - Specifies the publication to be equated against
public java.lang.String toString()
Publication as a String
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||