package org.sitenv.service.ccda.smartscorecard.model;

import java.util.List;

public class Category {
	
	
	public Category(boolean isFailingConformance,String categoryName)
	{
		this.isFailingConformance = isFailingConformance;
		this.categoryName = categoryName;
	}
	
	public Category()
	{
		
	}
	
	// scorecard properties
	private String categoryName;
	private String categoryGrade;
	private int categoryNumericalScore;
	private List<CCDAScoreCardRubrics> categoryRubrics;
	private int numberOfIssues;	
	
	// referenceccdavalidator properties
	private boolean isFailingConformance;
	// e.g. description, xPath, Line Number, etc.
	// TODO: this is convenient here but we don't NEED it but it makes for less front-end processing
	// Options:
	// 1. We populate this (referenceErrors)
	// 2. We override categoryRubrics with the related reference results
	// 3. We do not populate this, and delete it from the class. Instead, we have the front end 
	// loop the results in the current ReferenceResult instance and match the section name to populate 
	private List<ReferenceError> referenceErrors;
	
	public String getCategoryName() {
		return categoryName;
	}
	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}
	public String getCategoryGrade() {
		return categoryGrade;
	}
	public void setCategoryGrade(String categoryGrade) {
		this.categoryGrade = categoryGrade;
	}
	public List<CCDAScoreCardRubrics> getCategoryRubrics() {
		return categoryRubrics;
	}
	public void setCategoryRubrics(List<CCDAScoreCardRubrics> categoryRubrics) {
		this.categoryRubrics = categoryRubrics;
	}
	public int getNumberOfIssues() {
		return numberOfIssues;
	}
	public void setNumberOfIssues(int numberOfIssues) {
		this.numberOfIssues = numberOfIssues;
	}
	public int getCategoryNumericalScore() {
		return categoryNumericalScore;
	}
	public void setCategoryNumericalScore(int categoryNumericalScore) {
		this.categoryNumericalScore = categoryNumericalScore;
	}
	public boolean isFailingConformance() {
		return isFailingConformance;
	}
	public void setFailingConformance(boolean isFailingConformance) {
		this.isFailingConformance = isFailingConformance;
	}
	public List<ReferenceError> getReferenceErrors() {
		return referenceErrors;
	}
	public void setReferenceErrors(List<ReferenceError> referenceErrors) {
		this.referenceErrors = referenceErrors;
	}	
	
}

@@ -48,16 +48,44 @@
 model;%0A%0A
+import java.util.ArrayList;%0A
 import j
@@ -174,16 +174,17 @@
 ormance,
+ 
 String c
@@ -283,24 +283,88 @@
 tegoryName;%0A
+%09%09this.categoryRubrics = new ArrayList%3CCCDAScoreCardRubrics%3E();%0A
 %09%7D%0A%09%0A%09public
@@ -675,520 +675,8 @@
 ce;%0A
-%09// e.g. description, xPath, Line Number, etc.%0A%09// TODO: this is convenient here but we don't NEED it but it makes for less front-end processing%0A%09// Options:%0A%09// 1. We populate this (referenceErrors)%0A%09// 2. We override categoryRubrics with the related reference results%0A%09// 3. We do not populate this, and delete it from the class. Instead, we have the front end %0A%09// loop the results in the current ReferenceResult instance and match the section name to populate %0A%09private List%3CReferenceError%3E referenceErrors;%0A
 %09%0A%09p
@@ -1755,206 +1755,8 @@
 ce;%0A
-%09%7D%0A%09public List%3CReferenceError%3E getReferenceErrors() %7B%0A%09%09return referenceErrors;%0A%09%7D%0A%09public void setReferenceErrors(List%3CReferenceError%3E referenceErrors) %7B%0A%09%09this.referenceErrors = referenceErrors;%0A
 %09%7D%09%0A

Set categoryRubrics to empty array for failing sections to match format