Rev 1870 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1870 | Rev 1871 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | import com.owlike.genson.Genson; |
3 | import com.owlike.genson.Genson; |
4 | import com.owlike.genson.GensonBuilder; |
4 | import com.owlike.genson.GensonBuilder; |
5 | import org.apache.log4j.Logger; |
5 | import org.apache.log4j.Logger; |
6 | import org.json.JSONException; |
6 | import org.json.JSONException; |
7 | import org.json.JSONObject; |
7 | import org.json.JSONObject; |
- | 8 | import pt.estgp.estgweb.domain.Course; |
|
8 | import pt.estgp.estgweb.domain.utils.JsonView; |
9 | import pt.estgp.estgweb.domain.utils.JsonView; |
9 | import pt.estgp.estgweb.utils.documentBuilder.Document; |
10 | import pt.estgp.estgweb.utils.documentBuilder.Document; |
10 | import pt.estgp.estgweb.utils.documentBuilder.DocumentSection; |
11 | import pt.estgp.estgweb.utils.documentBuilder.DocumentSection; |
11 | 12 | ||
12 | import java.util.Date; |
13 | import java.util.Date; |
Line 18... | Line 19... | ||
18 | public class CourseReportDocument extends 5+0%2Fdocs%2Fapi+Document">Document implements JsonView |
19 | public class CourseReportDocument extends 5+0%2Fdocs%2Fapi+Document">Document implements JsonView |
19 | { |
20 | { |
20 | 21 | ||
21 | private static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(CourseReportDocument.class); |
22 | private static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(CourseReportDocument.class); |
22 | 23 | ||
- | 24 | private 1.5.0/docs/api/java/lang/String.html">String courseCode; |
|
- | 25 | private 1.5.0/docs/api/java/lang/String.html">String courseName; |
|
- | 26 | private 1.5.0/docs/api/java/lang/String.html">String year; |
|
- | 27 | ||
- | 28 | ||
- | 29 | ||
23 | public CourseReportDocument() |
30 | public CourseReportDocument() |
24 | { |
31 | { |
25 | 32 | ||
26 | } |
33 | } |
27 | 34 | ||
- | 35 | public 1.5.0/docs/api/java/lang/String.html">String getCourseCode() { |
|
- | 36 | return courseCode; |
|
- | 37 | } |
|
- | 38 | ||
- | 39 | public void setCourseCode(1.5.0/docs/api/java/lang/String.html">String courseCode) { |
|
- | 40 | this.courseCode = courseCode; |
|
- | 41 | } |
|
- | 42 | ||
- | 43 | public 1.5.0/docs/api/java/lang/String.html">String getCourseName() { |
|
- | 44 | return courseName; |
|
- | 45 | } |
|
- | 46 | ||
- | 47 | public void setCourseName(1.5.0/docs/api/java/lang/String.html">String courseName) { |
|
- | 48 | this.courseName = courseName; |
|
- | 49 | } |
|
- | 50 | ||
28 | public void init() |
51 | public 1.5.0/docs/api/java/lang/String.html">String getYear() { |
- | 52 | return year; |
|
- | 53 | } |
|
- | 54 | ||
- | 55 | public void setYear(1.5.0/docs/api/java/lang/String.html">String year) { |
|
- | 56 | this.year = year; |
|
- | 57 | } |
|
- | 58 | ||
- | 59 | public void init(Course c,1.5.0/docs/api/java/lang/String.html">String year) |
|
29 | { |
60 | { |
- | 61 | setYear(year); |
|
- | 62 | setCourseCode(c.getCode()); |
|
- | 63 | setCourseName(c.getName()); |
|
30 | 64 | ||
31 | //1 - Introducao |
65 | //1 - Introducao |
32 | IntroSection introSection = new IntroSection(); |
66 | IntroSection introSection = new IntroSection(); |
33 | introSection.init(); |
67 | introSection.init(); |
34 | getSections().add(introSection); |
68 | getSections().add(introSection); |