/** * Represents an incident. (Does not contain events. Event links itself to Incident.) * @param time {Time} * @param numbers {Number} * @param title {String} * @param summary {String} */ function Incident(time, number, title, summary) { //========== public read-only members ==========// this.time = time; this.number = number; this.title = title; this.summary = summary; this.expanded = true; //========== public methods ==========// this.html = html; this.setSummary = setSummary; //========== private methods ==========// this.formatHeader = formatHeader; /** Setter for summary field */ function setSummary(description) { this.summary = description; } /** /** * @return The html representation of this incident; */ function html() { return "" + "" + "" + "" + "" + "" + "" + "
" + this.formatHeader() + "
" + this.summary + "
"; } /** * @return The html of the rectangle that contains the expand/collapse symbol, time, * incident number * and incident title. */ function formatHeader() { return "" + "" + "" + "" + "" + "" + "" + "
Time: " + this.time.format() + "" + this.number + "" + this.title + "
"; } }