Class: ActiveSanction::Sources::OfacSdn

Inherits:
Ofac
  • Object
show all
Defined in:
lib/active_sanction/sources/ofac_sdn.rb

Overview

The US Specially Designated Nationals list: the largest and most frequently screened sanctions list there is, and the one whose format dictates most of what the parsing toolkits have to handle.

snapshot = ActiveSanction::Sources[:ofac_sdn].new.sync

Three files, one list

OFAC publishes the SDN list as three headerless CSVs joined on ent_num:

SDN.CSV   19,321 rows   primary names, type, programs, remarks
ALT.CSV   20,147 rows   aliases -- more of them than there are entities
ADD.CSV   25,078 rows   addresses

Each is fetched and cached independently by Base, because they change independently; the join happens in Ofac#parse, which the consolidated list uses too -- the two files are the same twelve columns and are read by the same code.

What is left here is the declaration: which list this is, and where its three files live. Everything else, including the free-text remarks parsing that gives the list its secondary identifiers, is in Ofac.

Instance Attribute Summary

Attributes inherited from Base

#cache, #fetcher, #instrumenter, #logger

Method Summary

Methods inherited from Base

#authority, #column_shapes, #column_tallies, #file_key, #floors, #format, #fresh?, #initialize, #inspect, #jurisdiction, #key, #parse, #parse_argument, published_remarks, #retrieve, #snapshot, #source_version, #stale?, #sync, #url, #urls, #warnings

Methods included from Definition

#authority, #declarations, #declared?, #declared_floors, #declared_urls, #file_key, #floor, #floors, #format, #jurisdiction, #key, key!, #licence_notice, #licence_url, #multi_url?, #to_h, #url, #urls