Class NonNumericIdentificationKeyCreator

Non-numeric identification key creator.

Hierarchy

Properties

identificationKeyType: IdentificationKeyType
prefixType: PrefixType
length: number
referenceCharacterSet: CharacterSet
referenceValidator: CharacterSetValidator

Constructors

  • Constructor. Called internally by PrefixManager non-numeric identification key creator getters; should not be called by other code.

    Parameters

    • prefixManager: PrefixManager

      Prefix manager.

    • identificationKeyType: IdentificationKeyType

      Identification key type.

    • length: number

      Length.

    • referenceCharacterSet: CharacterSet

      Reference character set.

    • requiresCheckCharacterPair: boolean = false

      True if the identification key requires a check character pair.

    Returns NonNumericIdentificationKeyCreator

Accessors

  • get requiresCheckCharacterPair(): boolean
  • Determine if the identification key requires a check character pair.

    Returns boolean

  • get prefixManager(): PrefixManager
  • Returns PrefixManager

  • get prefix(): string
  • Returns string

  • get referenceLength(): number
  • Returns number

Methods

  • Get the character set validator for a character set.

    Parameters

    Returns CharacterSetValidator

    Character set validator.

  • Pad an identification key on the left with zeroes for validation purposes. This is done to align an identification key with a position offset for any error message that may be thrown by the reference validator.

    Parameters

    • identificationKey: string

      Identification key.

    • validation: undefined | IdentificationKeyValidation

      Identification key validation parameters.

    Returns string

    Padded identification key.

  • Create an identification key with a reference.

    Parameters

    • reference: string

      Reference.

    Returns string

    Identification key.

  • Create multiple identification keys with references.

    Parameters

    • references: Iterable<string, any, any>

      References.

    Returns IterableIterator<string, any, any>

    Identification keys.

  • Parameters

    Returns void

  • Validate an identification key and throw an exception if validation fails.

    Parameters

    Returns void

  • Validate the prefix within an identification key.

    Parameters

    • partialIdentificationKey: string

      Partial identification key.

    • OptionalpositionOffset: number

      Position offset within a larger string.

    Returns void

  • Initialize the prefix manager. This method is in lieu of a constructor due to the mixin architecture.

    Parameters

    • prefixManager: PrefixManager

      Prefix manager.

    • prefix: string

      Prefix within prefix manager to use to calculate reference length.

    • checkAllowance: number

      Number of characters to allow for check digit or check character pair.

    Returns void