Interface IDMaker

All Known Implementing Classes:
IDMaker.ByName, IDMaker.ByURN

public interface IDMaker
Interface for objects that define how to make an ID for a sequence.

Nine times out of ten, you will use one of HashSequenceDB.byURN or HashSequenceDB.byName, but once in a blue-moon, you will want some other systematic way of retrieveing Sequences. This interface is here to allow you to plug in this functionality if you need it.

Author:
Matthew Pocock
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IDMaker
    A simple implementation of IDMaker that hashes by sequence name.
    static final IDMaker
    A simple implementation of IDMaker that hashes by URN.
  • Method Summary

    Modifier and Type
    Method
    Description
    Calculate the id for a sequence.
  • Field Details

    • byURN

      static final IDMaker byURN
      A simple implementation of IDMaker that hashes by URN.
    • byName

      static final IDMaker byName
      A simple implementation of IDMaker that hashes by sequence name.
  • Method Details

    • calcID

      Calculate the id for a sequence.

      Each unique sequence should return a unique ID.

      Parameters:
      seq - the sequence to ID
      Returns:
      the id for the sequence