1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
| package com.labosun.articlewriter.bo;
import java.util.ArrayList;
import java.util.List;
/**
* This class represents an Article.<br />
* <br />
* To follow the template, this class should be rendered as follow :<br />
* <html><br />
* <head><br />
* <!-- JS and CSS --><br />
* <title>{title}</title><br />
* <keywords>{keywords}</keywords><br />
* <author>{author}</author><br />
* </head><br />
* <body><br />
* {content}<br />
* </body><br />
* </html><br />
*
* @author Vivien Barousse
*/
public class Article {
/**
* Article's title
*/
private String title;
/**
* Article's keywords
*/
private String keywords;
/**
* Article's author
*/
private String author;
/**
* Article's content
*/
private List<ArticleContent> content;
/**
* Instanciate a new article
*/
public Article() {
content = new ArrayList<ArticleContent>();
}
/**
* Instantiate a new article, with specified title, keywords, author and content.
* Some parameters can eventually be null
* @param title Article's title
* @param keywords Article's keywords
* @param author Article's author
* @param content Article's content
*/
public Article(String title, String keywords, String author, List<ArticleContent> content) {
this.title = title;
this.keywords = keywords;
this.author = author;
this.content = content;
if (this.content == null)
this.content = new ArrayList<ArticleContent>();
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getKeywords() {
return keywords;
}
public void setKeywords(String keywords) {
this.keywords = keywords;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public List<ArticleContent> getContent() {
return content;
}
public void setContent(List<ArticleContent> content) {
this.content = content;
}
} |