Class GoldenPath

java.lang.Object
ubic.gemma.core.goldenpath.GoldenPath
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
GoldenPathQuery, GoldenPathSequenceAnalysis

public abstract class GoldenPath extends Object implements AutoCloseable
Perform useful queries against GoldenPath (UCSC) databases.
Author:
pavlidis
  • Field Details

    • log

      protected static final org.apache.commons.logging.Log log
  • Constructor Details

    • GoldenPath

      public GoldenPath(Taxon taxon)
      Create a GoldenPath database for a given taxon.

      If any post-createDataSource(Taxon) step throws (typically the probe inside createJdbcTemplateFromConfig(HikariDataSource, Taxon) when the configured goldenpath host is unreachable or the per-taxon schema does not exist), the partially-allocated HikariDataSource is closed before the exception propagates. Without this cleanup the Hikari pool leaks on every failed construction — try-with-resources at the call site does NOT cover constructor failure, since close() only fires for resources that were fully bound to the try-resource variable.

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getDataSource

      protected DataSource getDataSource()
    • getJdbcTemplate

      protected org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
    • getSearchedDatabase

      protected ExternalDatabase getSearchedDatabase()
    • getDatabaseName

      public String getDatabaseName()
      Returns:
      the name of the GoldenPath database being read, which is the genome assembly: hg38, mm39, rn8
    • getTaxon

      public Taxon getTaxon()