Class GeneArgService

All Implemented Interfaces:
EntityArgService<Gene, GeneService>

@Service public class GeneArgService extends AbstractEntityArgService<Gene, GeneService>
  • Constructor Details

  • Method Details

    • getEntity

      @NonNull public Gene getEntity(AbstractEntityArg<?, Gene, GeneService> entityArg) throws jakarta.ws.rs.NotFoundException, jakarta.ws.rs.BadRequestException
      Retrieve the entity represented by this argument.
      Specified by:
      getEntity in interface EntityArgService<Gene, GeneService>
      Overrides:
      getEntity in class AbstractEntityArgService<Gene, GeneService>
      Throws:
      jakarta.ws.rs.BadRequestException - if more than one gene match the supplied gene argument
      jakarta.ws.rs.NotFoundException - if the entity does not exist
    • getEntityWithTaxon

      @NonNull public Gene getEntityWithTaxon(GeneArg<?> entityArg, Taxon taxon)
      Obtain a gene from a specific taxon.
      Throws:
      jakarta.ws.rs.BadRequestException - if more than one gene match the supplied gene argumen in the given taxon
    • getEntitiesWithTaxon

      public List<Gene> getEntitiesWithTaxon(GeneArg<?> genes, Taxon taxon)
      Obtain genes from a specific taxon.
    • getEntitiesWithTaxon

      public List<Gene> getEntitiesWithTaxon(GeneArrayArg genes, Taxon taxon)
      Obtain genes from a specific taxon.
    • getGenes

      public Slice<GeneValueObject> getGenes(int offset, int limit)
    • getGenesByCursor

      public CursorPage<GeneValueObject> getGenesByCursor(@Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to getGenes(int, int): keyset pagination over genes, always sorted by ascending id (the primary key, indexed and unique).
    • getGenesInTaxon

      public Slice<GeneValueObject> getGenesInTaxon(Taxon taxon, int offset, int limit)
    • getGenesInTaxonByCursor

      public CursorPage<GeneValueObject> getGenesInTaxonByCursor(Taxon taxon, @Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to getGenesInTaxon(Taxon, int, int): keyset pagination over the genes belonging to a single taxon, always sorted by ascending id (the primary key, indexed and unique) — see CURSOR_PAGINATION_STEP1_PLAN.md step 1g. The path-derived taxon.id = ? constraint is preserved (composed into the Filters before the DAO call) so the cursor-mode result is restricted to the same taxon that the offset-mode result would be. The cursor DAO currently restricts cursors to single-component id sorts (recce sec. 3.4 — to be lifted in phase B once the index audit is complete).
    • getGenesInTaxon

      public List<GeneValueObject> getGenesInTaxon(GeneArrayArg arg, Taxon taxon)
      Returns:
      a collection of Gene value objects..
    • getGeneLocation

      public List<PhysicalLocationValueObject> getGeneLocation(GeneArg<?> geneArg)
      Returns all known locations of the gene(s) that this GeneArg represents.
      Returns:
      collection of physical location objects.
    • getGeneLocationInTaxon

      public List<PhysicalLocationValueObject> getGeneLocationInTaxon(GeneArg<?> arg, Taxon taxon)
      Returns all known locations of the gene that this GeneArg represents.
      Parameters:
      taxon - the taxon to limit the search to. Can be null.
      Returns:
      collection of physical location objects.
    • getGeneGoTerms

      public List<GeneOntologyTermValueObject> getGeneGoTerms(GeneArg<?> arg)
      Returns GO terms for the gene that this GeneArg represents.
    • getGeneGoTermsInTaxon

      public List<GeneOntologyTermValueObject> getGeneGoTermsInTaxon(GeneArg<?> geneArg, Taxon taxon)
      Obtain GO terms for the gene in the given taxon.
    • getGeneProbes

      public Slice<CompositeSequenceValueObject> getGeneProbes(GeneArg<?> geneArg, int offset, int limit)
      Obtain probes for the gene across all platforms.
    • getGeneProbesByCursor

      public CursorPage<CompositeSequenceValueObject> getGeneProbesByCursor(GeneArg<?> geneArg, @Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to getGeneProbes(GeneArg, int, int): keyset pagination over the probes (composite sequences) mapped to a single gene across all platforms — see CURSOR_PAGINATION_STEP1_PLAN.md step 1m. Always sorted by ascending cs.id (the primary key, indexed and unique) because the cursor DAO restricts cursors to single-component id sorts until the index audit lands.

      Resolves the gene from the GeneArg (matching the offset call getEntity(geneArg) in getGeneProbes(GeneArg, int, int)) before delegating to the service. useGene2Cs is held at true to match the offset variant.

    • getGeneProbesInTaxon

      public Slice<CompositeSequenceValueObject> getGeneProbesInTaxon(GeneArg<?> geneArg, Taxon taxon, int offset, int limit)
      Obtain probes for the gene in the given taxon across all platforms.
    • getGeneProbesInTaxonByCursor

      public CursorPage<CompositeSequenceValueObject> getGeneProbesInTaxonByCursor(GeneArg<?> geneArg, Taxon taxon, @Nullable Cursor cursor, int limit)
      Cursor-mode counterpart to getGeneProbesInTaxon(GeneArg, Taxon, int, int): keyset pagination over the probes (composite sequences) mapped to a single gene in the given taxon across all platforms — see CURSOR_PAGINATION_STEP1_PLAN.md step 1n. Always sorted by ascending cs.id (the primary key, indexed and unique) because the cursor DAO restricts cursors to single-component id sorts until the index audit lands.

      Resolves the gene via getEntityWithTaxon(GeneArg, Taxon) (matching the offset call in getGeneProbesInTaxon(GeneArg, Taxon, int, int)) so the path-derived taxon scope is enforced at gene-resolution time — identical scope to the offset variant. The resolved Gene is then passed to CompositeSequenceService.loadValueObjectsForGeneByCursor(Gene, Cursor, int, boolean) which performs the actual keyset walk over the gene→probe join (step 1m DAO). useGene2Cs is held at true to match the offset variant.