public class Publication
extends java.lang.Object
Constructor and Description |
---|
Publication(Manifestation document)
creates a new
Publication -object from a document |
Publication(java.lang.String docNumber,
java.util.ArrayList<java.lang.String> authors,
java.util.ArrayList<java.lang.String> title)
creates a new
Publication -object |
Publication(java.lang.String docNumber,
java.lang.String isbn,
java.util.ArrayList<java.lang.String> authors,
java.util.ArrayList<java.lang.String> title,
java.lang.String publisher,
java.lang.String place,
java.lang.String year)
creates a new
Publication -object |
Modifier and Type | Method and Description |
---|---|
void |
addAuthor(java.lang.String author)
adds an author to the author list
|
void |
addTitle(java.lang.String titlePart)
adds a part to the title
|
java.util.ArrayList<java.lang.String> |
getAuthors()
returns the authors of the publication
|
java.lang.String |
getDocNumber()
returns the document number of the publication
|
java.lang.String |
getIsbn()
returns the ISBN of the publication
|
int |
getLevDist(Publication other)
returns the Levenshtein distance comparing the authors and title of two
publications
|
java.lang.String |
getPlace()
returns the place the publication was published
|
java.lang.String |
getPublisher()
returns the publisher of the publication
|
java.util.ArrayList<java.lang.String> |
getTitle()
returns the title of the publication
|
java.lang.String |
getType()
returns the type of the publication
|
java.lang.String |
getYear()
returns the year the publication was published
|
void |
setAuthors(java.util.ArrayList<java.lang.String> newAuthors)
sets the authors of the publication
|
void |
setDocNumber(java.lang.String newDocNumber)
sets the document number of the publication
|
void |
setIsbn(java.lang.String newIsbn)
sets the ISBN of the publication
|
void |
setPlace(java.lang.String newPlace)
sets the place the publication was published
|
void |
setPublisher(java.lang.String newPublisher)
sets the publisher of the publication
|
void |
setTitle(java.util.ArrayList<java.lang.String> newTitle)
sets the title of the publication
|
void |
setYear(java.lang.String newYear)
sets the year the publication was published
|
public Publication(java.lang.String docNumber, java.util.ArrayList<java.lang.String> authors, java.util.ArrayList<java.lang.String> title)
Publication
-objectdocNumber
- the document numberauthors
- the authors of the publicationtitle
- the title of the publicationpublic Publication(Manifestation document)
Publication
-object from a documentdocument
- the documentpublic Publication(java.lang.String docNumber, java.lang.String isbn, java.util.ArrayList<java.lang.String> authors, java.util.ArrayList<java.lang.String> title, java.lang.String publisher, java.lang.String place, java.lang.String year)
Publication
-objectdocNumber
- the document numberisbn
- the isbn of the publicationauthors
- the authors of the publicationtitle
- the title of the publicationpublisher
- the publisher of the publicationplace
- the place where the publication was publishedyear
- the year the publication was publishedpublic java.lang.String getDocNumber()
public java.lang.String getType()
public java.lang.String getIsbn()
public java.util.ArrayList<java.lang.String> getAuthors()
public java.util.ArrayList<java.lang.String> getTitle()
public java.lang.String getPublisher()
public java.lang.String getPlace()
public java.lang.String getYear()
public void setDocNumber(java.lang.String newDocNumber)
newDocNumber
- the document numberpublic void setIsbn(java.lang.String newIsbn)
newIsbn
- the ISBNpublic void addAuthor(java.lang.String author)
author
- the name of the authorpublic void setAuthors(java.util.ArrayList<java.lang.String> newAuthors)
newAuthors
- list of author namespublic void addTitle(java.lang.String titlePart)
titlePart
- part of title to be addedpublic void setTitle(java.util.ArrayList<java.lang.String> newTitle)
newTitle
- the title of the publicationpublic void setPublisher(java.lang.String newPublisher)
newPublisher
- the name of the publisherpublic void setPlace(java.lang.String newPlace)
newPlace
- the name of the placepublic void setYear(java.lang.String newYear)
newYear
- the yearpublic int getLevDist(Publication other)
other
- other Publication
-object to be compared to