package org.pharmgkb.pharmcat.reporter.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;


/**
 * This class packs together the main guideline and the groups of diplotype-specific annotations
 *
 * @author Ryan Whaley
 */
public class GuidelinePackage {

  @SerializedName("guideline")
  @Expose
  private DosingGuideline guideline;
  @SerializedName("annotationGroups")
  @Expose
  private List<Group> groups = new ArrayList<>();
  @SerializedName("genePhenotypes")
  @Expose
  private Map<String,Map<String,String>> phenotypeMap = new HashMap<>();

  public DosingGuideline getGuideline() {
    return guideline;
  }

  public void setGuideline(DosingGuideline guideline) {
    this.guideline = guideline;
  }

  public List<Group> getGroups() {
    return groups;
  }

  public void setGroups(List<Group> groups) {
    this.groups = groups;
  }

  /**
   * This is a map of: "Gene Symbol" -> "Allele Name" -> "Phenotype". This can be used in conjuction with the
   * "genePhenotypes" property in the {@link Group} object.
   * @return a Mapping of gene+allele -> phenotype
   */
  public Map<String, Map<String,String>> getPhenotypeMap() {
    return phenotypeMap;
  }

  public void setPhenotypeMap(Map<String, Map<String,String>> phenotypeMap) {
    this.phenotypeMap = phenotypeMap;
  }

  @Override
  public String toString() {
    if (guideline != null) {
      return guideline.getName();
    }
    else {
      return super.toString();
    }
  }
}

@@ -1037,17 +1037,20 @@
 ymbol%22 -
-%3E
+&gt;
  %22Allele
@@ -1057,17 +1057,20 @@
  Name%22 -
-%3E
+&gt;
  %22Phenot
@@ -1214,17 +1214,20 @@
 allele -
-%3E
+&gt;
  phenoty

Fix javadoc