package org.pharmgkb.pharmcat.reporter.resultsJSON;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.stream.Collectors;
import org.pharmgkb.pharmcat.haplotype.model.GeneCall;
import org.pharmgkb.pharmcat.haplotype.model.Variant;
import org.pharmgkb.pharmcat.reporter.model.CPICException;


public class GeneReport {

  private String m_gene;
  private Set<String> m_diplotypes;
  private SortedSet<Variant> m_variants = new TreeSet<>();
  private List<CPICException> m_exceptList = new ArrayList<>();

  public GeneReport(GeneCall call) {
    m_gene = call.getGene();
    m_diplotypes = call.getDiplotypes().stream()
        .map(m -> call.getGene() + ":" + m.getName())
        .collect(Collectors.toSet());
    m_variants.addAll(call.getVariants());
  }

  public Set<String> getDips(){
    return m_diplotypes;
  }

  public String getGene(){
    return m_gene;
  }

  public List<CPICException> getExceptionList(){
    return m_exceptList;
  }

  public void addException( CPICException except ){
    m_exceptList.add(except);
  }

  public SortedSet<Variant> getVariants() {
    return m_variants;
  }
}


@@ -379,16 +379,100 @@
 tion;%0A%0A%0A
+/**%0A * This class is used to help collect Gene-related data for later reporting%0A */%0A
 public c
@@ -675,16 +675,125 @@
 t%3C%3E();%0A%0A
+  /**%0A   * public constructor%0A   * @param call a %7B@link GeneCall%7D that has been made by the Haplotyper%0A   */%0A
   public
@@ -1031,32 +1031,96 @@
 riants());%0A  %7D%0A%0A
+  /**%0A   * Diplotypes that have been called for this gene%0A   */%0A
   public Set%3CStr
@@ -1161,24 +1161,71 @@
 types;%0A  %7D%0A%0A
+  /**%0A   * The gene symbol for this gene%0A   */%0A
   public Str
@@ -1259,24 +1259,88 @@
 _gene;%0A  %7D%0A%0A
+  /**%0A   * The list of exceptions that apply to this gene%0A   */%0A
   public Lis
@@ -1489,24 +1489,80 @@
 cept);%0A  %7D%0A%0A
+  /**%0A   * The variants that constitute this gene%0A   */%0A
   public Sor

Add javadoc to GeneReport