test_class.declarator: dbWriter
test_class.modifier: private
test_class.original_string: private ScoreDistributionWriter dbWriter;
test_class.type: ScoreDistributionWriter
test_class.var_name: dbWriter
test_class.file: phenol-annotations/src/test/java/org/monarchinitiative/phenol/annotations/scoredist/H2ScoreDistributionWriterTest.java
test_class.identifier: H2ScoreDistributionWriterTest
test_case.body: @Test
    void write_int_key_scoredistribution() throws Exception{
  
      Map<TermId, ObjectScoreDistribution> scoreDistributionMap = new HashMap<>();
      TermId tid1 = TermId.of("HP:1");
  
      SortedMap<Double, Double> sortedMap = ImmutableSortedMap.of(0.0, 0.2, 0.5, 0.6, 1.0, 1.0);
      scoreDistributionMap.put(tid1, new ObjectScoreDistribution(tid1, 2, 3, sortedMap));
  
      ScoreDistribution integerScoreDistribution = new ScoreDistribution(2, scoreDistributionMap);
  
      Assertions.assertDoesNotThrow(() -> dbWriter.write(2, integerScoreDistribution));
  
    }
test_case.class_method_signature: H2ScoreDistributionWriterTest.write_int_key_scoredistribution()
test_case.full_signature: @Test void write_int_key_scoredistribution()
test_case.identifier: write_int_key_scoredistribution
test_case.invocations: of of put assertDoesNotThrow write
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void write_int_key_scoredistribution()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(H2ScoreDistributionWriter.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(H2ScoreDistributionWriter.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: pathDb
focal_class.modifier: private final
focal_class.original_string: private final String pathDb;
focal_class.type: String
focal_class.var_name: pathDb
focal_class.declarator: tableName
focal_class.modifier: private final
focal_class.original_string: private final String tableName;
focal_class.type: String
focal_class.var_name: tableName
focal_class.declarator: conn
focal_class.modifier: private final
focal_class.original_string: private final Connection conn;
focal_class.type: Connection
focal_class.var_name: conn
focal_class.declarator: H2_DROP_TABLE_STATEMENT = "DROP TABLE %s"
focal_class.modifier: private static final
focal_class.original_string: private static final String H2_DROP_TABLE_STATEMENT = "DROP TABLE %s";
focal_class.type: String
focal_class.var_name: H2_DROP_TABLE_STATEMENT
focal_class.declarator: H2_CREATE_TABLE_STATEMENTS =
        new String[] {
          "CREATE TABLE %s (num_terms INT, object_id VARCHAR, sample_size INT, scores OTHER, p_values OTHER)",
          "CREATE INDEX ON %s (num_terms)",
          "CREATE UNIQUE INDEX ON %s (num_terms, object_id)"
        }
focal_class.modifier: private static final
focal_class.original_string: private static final String[] H2_CREATE_TABLE_STATEMENTS =
        new String[] {
          "CREATE TABLE %s (num_terms INT, object_id VARCHAR, sample_size INT, scores OTHER, p_values OTHER)",
          "CREATE INDEX ON %s (num_terms)",
          "CREATE UNIQUE INDEX ON %s (num_terms, object_id)"
        };
focal_class.type: String[]
focal_class.var_name: H2_CREATE_TABLE_STATEMENTS
focal_class.declarator: H2_INSERT_STATEMENT =
        "INSERT INTO %s (num_terms, object_id, sample_size, scores, p_values) VALUES (?, ?, ?, ?, ?)"
focal_class.modifier: private static final
focal_class.original_string: private static final String H2_INSERT_STATEMENT =
        "INSERT INTO %s (num_terms, object_id, sample_size, scores, p_values) VALUES (?, ?, ?, ?, ?)";
focal_class.type: String
focal_class.var_name: H2_INSERT_STATEMENT
focal_class.file: phenol-annotations/src/main/java/org/monarchinitiative/phenol/annotations/scoredist/H2ScoreDistributionWriter.java
focal_class.identifier: H2ScoreDistributionWriter
focal_class.interfaces: implements ScoreDistributionWriter
focal_class.class_method_signature: H2ScoreDistributionWriter.H2ScoreDistributionWriter(String pathDb, String dataTableName, boolean resetTableIfExists)
focal_class.full_signature: public  H2ScoreDistributionWriter(String pathDb, String dataTableName, boolean resetTableIfExists)
focal_class.identifier: H2ScoreDistributionWriter
focal_class.modifiers: public
focal_class.parameters: (String pathDb, String dataTableName, boolean resetTableIfExists)
focal_class.signature:  H2ScoreDistributionWriter(String pathDb, String dataTableName, boolean resetTableIfExists)
focal_class.class_method_signature: H2ScoreDistributionWriter.openConnection(boolean resetTableIfExists)
focal_class.full_signature: private Connection openConnection(boolean resetTableIfExists)
focal_class.identifier: openConnection
focal_class.modifiers: private
focal_class.parameters: (boolean resetTableIfExists)
focal_class.return: Connection
focal_class.signature: Connection openConnection(boolean resetTableIfExists)
focal_class.class_method_signature: H2ScoreDistributionWriter.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: H2ScoreDistributionWriter.write(int numTerms, ScoreDistribution scoreDistribution, int resolution)
focal_class.full_signature: @Override public void write(int numTerms, ScoreDistribution scoreDistribution, int resolution)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (int numTerms, ScoreDistribution scoreDistribution, int resolution)
focal_class.return: void
focal_class.signature: void write(int numTerms, ScoreDistribution scoreDistribution, int resolution)
focal_class.class_method_signature: H2ScoreDistributionWriter.writeObjectScoreDistribution(
        int numTerms, ObjectScoreDistribution dist, int resolution)
focal_class.full_signature: private void writeObjectScoreDistribution(
        int numTerms, ObjectScoreDistribution dist, int resolution)
focal_class.identifier: writeObjectScoreDistribution
focal_class.modifiers: private
focal_class.parameters: (
        int numTerms, ObjectScoreDistribution dist, int resolution)
focal_class.return: void
focal_class.signature: void writeObjectScoreDistribution(
        int numTerms, ObjectScoreDistribution dist, int resolution)
focal_method.body: @Override
    public void write(int numTerms, ScoreDistribution scoreDistribution, int resolution)
        throws PhenolException {
      for (TermId objectId : scoreDistribution.getObjectIds()) {
        final ObjectScoreDistribution dist = scoreDistribution.getObjectScoreDistribution(objectId);
        writeObjectScoreDistribution(numTerms, dist, resolution);
      }
    }
focal_method.class_method_signature: H2ScoreDistributionWriter.write(int numTerms, ScoreDistribution scoreDistribution, int resolution)
focal_method.full_signature: @Override public void write(int numTerms, ScoreDistribution scoreDistribution, int resolution)
focal_method.identifier: write
focal_method.invocations: getObjectIds getObjectScoreDistribution writeObjectScoreDistribution
focal_method.modifiers: @Override public
focal_method.parameters: (int numTerms, ScoreDistribution scoreDistribution, int resolution)
focal_method.return: void
focal_method.signature: void write(int numTerms, ScoreDistribution scoreDistribution, int resolution)