Security Identifier

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

Лицензия

Лицензия

Категории

Категории

IDE Инструменты разработки Безопасность
Группа

Группа

com.github.kelebra
Идентификатор

Идентификатор

security-identifier
Последняя версия

Последняя версия

0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Security Identifier
Domain model and utility methods for representation of securities identification on exchange
Ссылка на сайт

Ссылка на сайт

https://github.com/kelebra/security-identifier
Система контроля версий

Система контроля версий

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

Скачать security-identifier

Как подключить последнюю версию

<!-- 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"]

Зависимости

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
org.assertj : assertj-core jar 2.3.0
org.apache.pdfbox : pdfbox jar 2.0.0

Модули Проекта

Данный проект не имеет модулей.

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

Версии библиотеки

Версия
0.2
0.1