Security Identifier

Domain model and utility methods for representation of securities identification on exchange

License

License

Categories

Categories

IDE Development Tools Security
GroupId

GroupId

com.github.kelebra
ArtifactId

ArtifactId

security-identifier
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Security Identifier
Domain model and utility methods for representation of securities identification on exchange
Project URL

Project URL

https://github.com/kelebra/security-identifier
Source Code Management

Source Code Management

https://github.com/kelebra/security-identifier.git

Download security-identifier

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.kelebra/security-identifier/ -->
<dependency>
    <groupId>com.github.kelebra</groupId>
    <artifactId>security-identifier</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.kelebra/security-identifier/
implementation 'com.github.kelebra:security-identifier:0.2'
// https://jarcasting.com/artifacts/com.github.kelebra/security-identifier/
implementation ("com.github.kelebra:security-identifier:0.2")
'com.github.kelebra:security-identifier:jar:0.2'
<dependency org="com.github.kelebra" name="security-identifier" rev="0.2">
  <artifact name="security-identifier" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.kelebra', module='security-identifier', version='0.2')
)
libraryDependencies += "com.github.kelebra" % "security-identifier" % "0.2"
[com.github.kelebra/security-identifier "0.2"]

Dependencies

test (3)

Group / Artifact Type Version
junit : junit jar 4.11
org.assertj : assertj-core jar 2.3.0
org.apache.pdfbox : pdfbox jar 2.0.0

Project Modules

There are no modules declared in this project.

security-identifier

Build Status Maven Central
The main intention for creation of this library is to have standart domain model across financial institutions for representing security identifiers and their validations.

Currently supported security identifiers:

Quick start

<dependency>
  <groupId>com.github.kelebra</groupId>
  <artifactId>security-identifier</artifactId>
  <version>0.2</version>
</dependency>

Classes representing security identifiers

Security identifier Class
ISIN com.github.kelebra.security.identifier.Isin
CUSIP com.github.kelebra.security.identifier.Cusip
SEDOL com.github.kelebra.security.identifier.Sedol

All of them are successors of SecurityIdentifier class which is intendent to be used in case when you want to have generic representation and do not worry about actual underlying type.

Create particular security identifier:

Isin isin = Isin.from("US0378331005");
Sedol sedol = Sedol.from("0263494");
Cusip cusip = Cusip.from("037833100");

Parse any security identifier:

SecurityIdentifierFactory.from("US0378331005"); // creates Isin instance
SecurityIdentifierFactory.from("0263494"); // creates Sedol instance
SecurityIdentifierFactory.from("037833100"); // creates Cusip instance

Defining security identifier type:

SecurityIdentifierFactory.getType("US0378331005"); // returns SecurityIdentifierType.ISIN
SecurityIdentifierFactory.getType("0263494"); // returns SecurityIdentifierType.SEDOL
SecurityIdentifierFactory.getType("037833100"); // returns SecurityIdentifierType.CUSIP

Validations applied when creating an instance of security identifier:

Security identifier Must have country code Is alpha numeric Required length Check digit validation algorithm Additional requirements
ISIN + + 12 Luhn's algorithm
CUSIP - + 9 Modulo 10 hashing algorithm
SEDOL - + 7 Modulo 10 hashing algorithm GB country code for ISIN conversion

Create security identifier without check digit check:

new IsinBuilder().withoutCheckOfCheckDigit().build("US0378331006"); // creates Isin instance
new SedolBuilder().withoutCheckOfCheckDigit().build("0263497"); // creates Sedol instance
new CusipBuilder().withoutCheckOfCheckDigit().build("037833101"); // creates Cusip instance

Versions

Version
0.2
0.1