Semantic Expression of LEI Data

The semantic architecture of LEI.INFO

The architecture of LEI.INFO service is based on the transformation of the standard XML-based data model used by the LEI system (called LEI CDF) to the modern RDF-based Semantic Data Model.

In addition to that, LEI.INFO is implemented according to the rules of Linked Open Data principles (see: Linked Data on W3C site)

These rules allow for the single LEI identifier (the LEI URI), for example:

http://lei.info/254900UIZS15MTA7H075

to be used as a reference to:

  • visual information in the web page,
  • data for software agents and
  • QR-CODE for physical media (like paper prints)

(A note: the last reference goes beyond classical Linked Data principles)

This is illustrated in the following diagram:

Data Formats Available

When the LEI URI is used to request data, it can be returned in multiple formats according to the needs of the user. The choice of the format is specified by the proper HTTP Accept Header of your request:

  • application/rdf+xml
  • application/x-turtle
  • application/n-triples
  • application/trig
  • text/rdf+n3
  • application/n-quads
  • application/ld+json
  • application/owl+xml
  • text/turtle
  • application/trix
  • text/n3
  • text/plain
  • text/application/x-nquads
  • text/xml

(A note: the last request “text/xml” returns the original LEI CDF format for the given LEI)

For example, for many, the most comprehensive representation of the data is Turtle. The following code represents it for the URI: https://lei.info/254900UIZS15MTA7H075:

@base <graph://lei.info/254900UIZS15MTA7H075>.

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.

[] owl:imports <http://lei.info/gleio/>.
<http://lei.info/254900UIZS15MTA7H075> <http://lei.info/gleio/hasInitialRegistrationDate> "2017-12-06T21:05:05.857Z"^^xsd:dateTime;
<http://lei.info/gleio/identifies> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206>;
<http://lei.info/gleio/isRegisteredBy> <http://lei.info/5493001KJTIIGC8Y1R12#entity>;
<http://ontologies.makolab.com/oc/hasLastManifestation> <http://lei.info/254900UIZS15MTA7H075#GLEIManifestation-20171206>;
<http://ontologies.makolab.com/oc/hasManifestation> <http://lei.info/254900UIZS15MTA7H075#GLEIManifestation-20171206>;
a <http://lei.info/gleio/GlobalLegalEntityIdentifier>,
<http://lei.info/gleio/LegalEntityIdentifier>,
<http://ontologies.makolab.com/oc/VariableEntity>.
<http://lei.info/254900UIZS15MTA7H075#BusinessLegalEntityIdentifier> <http://lei.info/gleio/hasBusinessIdentifierCode> "P16000038944"^^xsd:string;
<http://lei.info/gleio/identifies> <http://lei.info/254900UIZS15MTA7H075#entity>;
<http://lei.info/gleio/isRegisteredBy> <http://lei.info/gleio/business-registries/RA000603>;
a <http://lei.info/gleio/BusinessLegalEntityIdentifier>,
<http://lei.info/gleio/LegalEntityIdentifier>,
<http://ontologies.makolab.com/oc/VariableEntity>.
<http://lei.info/254900UIZS15MTA7H075#GLEIManifestation-20171206> <http://lei.info/gleio/hasGLEICode> "254900UIZS15MTA7H075"^^xsd:string;
<http://lei.info/gleio/hasNextRenewalDate> "2018-12-06T21:05:05.858Z"^^xsd:dateTime;
<http://lei.info/gleio/hasPrimaryValidationAuthority> <http://lei.info/gleio/RA000603>;
<http://lei.info/gleio/hasRegistrationStatus> <http://lei.info/gleio/Issued>;
<http://lei.info/gleio/hasUpdateDate> "2017-12-06T21:05:05.857Z"^^xsd:dateTime;
<http://lei.info/gleio/hasValidationSource> <http://lei.info/gleio/FullyCorroborated>;
<http://ontologies.makolab.com/oc/isLastManifestationOf> <http://lei.info/254900UIZS15MTA7H075>;
<http://ontologies.makolab.com/oc/isManifestationOf> <http://lei.info/254900UIZS15MTA7H075>;
a <http://lei.info/gleio/GLEIManifestation>,
<http://ontologies.makolab.com/oc/VariableEntityManifestation>.
<http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206> <http://lei.info/gleio/hasAddressOfLegalFormation> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-LEGAL_ADDRESS>;
<http://lei.info/gleio/hasHeadquartersAddress> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-HEADQUARTERS_ADDRESS>;
<http://lei.info/gleio/hasLegalEntityStatus> <http://lei.info/gleio/Active>;
<http://lei.info/gleio/hasLegalForm> <http://lei.info/gleio/LegalForm-8888>;
<http://lei.info/gleio/hasLegalJurisdiction> <http://lei.info/gleio/subdivisions/US-FL>;
<http://lei.info/gleio/hasLegalName> <http://lei.info/254900UIZS15MTA7H075#LegalName>;
<http://lei.info/gleio/hasOtherLegalForm> "Corporation";
<http://lei.info/gleio/hasUpdateDate> "2017-12-06T21:05:05.857Z"^^xsd:dateTime;
<http://lei.info/gleio/isIdentifiedBy> <http://lei.info/254900UIZS15MTA7H075>;
<http://ontologies.makolab.com/oc/isLastManifestationOf> <http://lei.info/254900UIZS15MTA7H075#entity>;
<http://ontologies.makolab.com/oc/isManifestationOf> <http://lei.info/254900UIZS15MTA7H075#entity>;
a <http://lei.info/gleio/LegalEntityManifestation>,
<http://ontologies.makolab.com/oc/VariableEntityManifestation>;
<http://www.w3.org/2004/02/skos/core#prefLabel> "MakoLab USA Inc."^^xsd:string.
<http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-HEADQUARTERS_ADDRESS> <http://lei.info/gleio/hasCityName> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-HEADQUARTERS_ADDRESS-City>;
<http://lei.info/gleio/hasCountry> <http://lei.info/gleio/countries/US>;
<http://lei.info/gleio/hasPostalCode> "32641"^^xsd:string;
<http://lei.info/gleio/hasStreetAddressDescription> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-HEADQUARTERS_ADDRESS-StreetDescription>;
<http://lei.info/gleio/hasSubdivision> <http://lei.info/gleio/subdivisions/US-FL>;
a <http://lei.info/gleio/Address>,
<http://lei.info/gleio/GeographicalLocation>.
<http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-HEADQUARTERS_ADDRESS-City> <http://lei.info/gleio/hasLiteralRepresentation> "Gainesville"^^xsd:string;
a <http://lei.info/gleio/EntityName>.
<http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-HEADQUARTERS_ADDRESS-StreetDescription> <http://lei.info/gleio/hasLiteralRepresentation> "2153 S.E. Hawthrone Road"^^xsd:string;
a <http://lei.info/gleio/EntityName>.
<http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-LEGAL_ADDRESS> <http://lei.info/gleio/hasCityName> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-LEGAL_ADDRESS-City>;
<http://lei.info/gleio/hasCountry> <http://lei.info/gleio/countries/US>;
<http://lei.info/gleio/hasPostalCode> "33756"^^xsd:string;
<http://lei.info/gleio/hasStreetAddressDescription> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-LEGAL_ADDRESS-StreetDescription>;
<http://lei.info/gleio/hasSubdivision> <http://lei.info/gleio/subdivisions/US-FL>;
a <http://lei.info/gleio/Address>,
<http://lei.info/gleio/GeographicalLocation>.
<http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-LEGAL_ADDRESS-City> <http://lei.info/gleio/hasLiteralRepresentation> "CLEARWATER"^^xsd:string;
a <http://lei.info/gleio/EntityName>.
<http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206-LEGAL_ADDRESS-StreetDescription> <http://lei.info/gleio/hasLiteralRepresentation> "1222 S MISSOURI AVE"^^xsd:string;
a <http://lei.info/gleio/EntityName>.
<http://lei.info/254900UIZS15MTA7H075#LegalName> <http://lei.info/gleio/hasLiteralRepresentation> "MakoLab USA Inc."^^xsd:string;
<http://lei.info/gleio/hasPreferredASCIITransliteratedLiteralRepresentation> "MakoLab USA Inc."^^xsd:string;
a <http://lei.info/gleio/EntityName>.
<http://lei.info/254900UIZS15MTA7H075#entity> <http://lei.info/gleio/isIdentifiedBy> <http://lei.info/254900UIZS15MTA7H075#BusinessLegalEntityIdentifier>;
<http://ontologies.makolab.com/oc/hasLastManifestation> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206>;
<http://ontologies.makolab.com/oc/hasManifestation> <http://lei.info/254900UIZS15MTA7H075#LegalEntityManifestation-20171206>;
a <http://lei.info/gleio/LegalEntity>,
<http://ontologies.makolab.com/oc/VariableEntity>.

The consumption of the LEI data becomes very easy in most programming environments. For example in Python it can be done in just few lines of code:

import rdflib
g=rdflib.Graph()
g.parse("https://lei.info/254900UIZS15MTA7H075")

(As we see, in Python we do not even need to specify the format – it is automatically negotiated between your code and LEI.INFO).

If you application does not support content negotiation, for most of the formats you can use the URI extensions to request it:

URI extension Returned format
.rdf application/rdf+xml
.nt application/n-triples
.trig application/trig
.nq application/n-quads
.jsonld application/ld+json
.owl application/owl+xml
.ttl text/turtle
.trix application/trix
.n3 text/n3
.txt text/plain
.xml* text/xml*
.csv text/csv

* extension .xml causes the return of the original xml representation of LEI CDF file format.

 

All the terms used in the returned LEI data, like, e.g.:

http://lei.info/gleio/identifies

http://lei.info/gleio/BusinessLegalEntityIdentifier

http://lei.info/gleio/hasLegalJurisdiction

have their definitions in the GLEIO Ontology (see below).

There are also terms from “Ontology of Change” created by MakoLab: http://ontologies.makolab.com/oc for example:

http://ontologies.makolab.com/oc/isLastManifestationOf

The use of the Ontology of Change enabled the direct representation of the history of the LEI record in the data returned by our service.

The GLEIO Ontology

General Legal Entity Identifier Ontology (GLEIO) is a concrete RDF/OWL specification of LEI data that is not only compliant with LEI Common Data File Format (LEI CDF) but also allows for representation of changes of LEI and the related LEI reference data over time.

Creating the ontology, we focused on benefits that can be gained by using semantic representation. Among them are: clear semantics of the LEI data, global persistent identification of the entities allowing for dereferencing URIs and retrieving information about the entities, flexibility of the representation allowing for easy extensibility (e.g., in the scope of Linked Open Data environment), possibility of using the content negotiation mechanism and finally, easy accessing and sharing of current and historical LEI data by the SPARQL endpoint.

The ontology documentation is available at: http://lei.info/gleio/. All the terms that the ontology defines can be used directly in your browser to obtain their definitions. For example:

http://lei.info/gleio/hasUpdateDate

returns:

You can also download the white paper that describes the ontology.

It is worth noting that the GLEIO Ontology was appreciated by the organizers of 9th IAOA International Conference on Formal Ontology in Information Systems (FOIS 2016) were it won the runner-up position. The competition paper is available from CEUR Workshop Proceedings.

 

Querying LEI data using SPARQL

SPARQL is the query language for RDF data stores. It allows for advanced querying the stores using graph patterns, their conjunctions and disjunctions and supports multiple features like query aggregation, subqueries, value testing and more. The result of SPARQL query can be a result set or another RDF graph.

LEI.INFO uses AllegroGraph RDF triple store and SPARQL 1.1 query engine.

The SPARQL end point is available at: https://lei.info/sparql

For example, the following query:


PREFIX voc: <http://lei.info/voc/l1/>

SELECT distinct ?glei ?legalName
WHERE {
GRAPH ?graph {
?glei voc:legalName ?legalName .
?glei voc:legalAddress ?legalAddress .
?legalAddress voc:country "KY" . #Cayman Islands
       }
}

Will return the Legal Entities registered in Cayman Islands.

The first few lines of the response: