Skip to content

Commit

Permalink
libcovebods: For 0.4 use Draft202012Validator and directory based schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Sep 13, 2024
1 parent ebf380d commit a082538
Show file tree
Hide file tree
Showing 24 changed files with 1,626 additions and 61 deletions.
2 changes: 1 addition & 1 deletion libcovebods/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"schema_url_host": _schema_folder,
},
"0.4": {
"schema_url": os.path.join(_schema_folder, "schema-0-4-0.json"),
"schema_url": os.path.join(_schema_folder, "schema-0-4-0"),
"schema_url_host": _schema_folder,
},
},
Expand Down
50 changes: 50 additions & 0 deletions libcovebods/data/schema-0-4-0/codelist-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:codelists",
"version": "0.4",
"title": "Codelist schema",
"description": "Schema for BODS codelist CSV files.",
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"title",
"description"
],
"additionalProperties": false,
"properties": {
"code": {
"title": "code",
"description": "The value to use in BODS data. Codes should match the letter case of external codes (e.g. ISO 4217) and should be camel case, otherwise.",
"type": "string",
"minLength": 1,
"pattern": "^[^\\s].*[^\\s]$"
},
"title": {
"title": "title",
"description": "A short title for the code.",
"type": "string",
"minLength": 1,
"pattern": "^[^\\s].*[^\\s]$"
},
"description": {
"title": "description",
"description": "A longer-form description of the code.",
"type": "string",
"minLength": 1,
"pattern": "^[^\\s].*[^\\s]$"
},
"technical note": {
"title": "technical note",
"description": "Notes on the application of the code.",
"type": [
"string",
"null"
]
}
}
},
"minItems": 1,
"uniqueItems": true
}
7 changes: 7 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/addressType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
code,title,description
placeOfBirth,Place of birth,The place where a person was born. A town (in the `address` field) and `country` may be sufficient information. This MUST only apply to the `placeOfBirth` field for natural persons.
residence,Residential address,An address where someone lives. This MUST only apply to natural persons.
registered,Registered address,An official address for delivering statutory mail and legal notices which must be provided to company registers. This MUST only apply to entities.
service,Service address,An address which can be used as an alternative to a residential address for the purpose of receiving post. This MUST only apply to natural persons.
alternative,Alternative address,An address provided in addition to the primary address for this entity or person that is neither a service nor a registered address.
business,Business address,A place where the entity conducts its business.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
code,title,description
commenting,Commenting,"The description field provides contextual comments for a field, object or statement."
correcting,Correcting,"The value of this field, object or statement has been corrected, using the method in the description field or from the original value given in the description field."
identifying,Identifying,"The value of this field, object or statement has been augmented or processed for the purpose of identifying natural persons or legal entities, using the method in the description field."
linking,Linking,"The description explains how linked material relates to the field, object or statement. A URL to linked material MUST be provided in the `url` field."
transformation,Transformation,"The values of this field, object or statement have been changed from their original form using the method in the description field. The transformed representation may be provided in the `transformedContent` field."
4 changes: 4 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/directOrIndirect.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
code,title,description
direct,Direct,The interest is held directly.
indirect,Indirect,The interest is held through one or more intermediate entities (including arrangements).
unknown,Unknown,The interest may be direct or indirect.
6 changes: 6 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/entitySubtype.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
code,title,description
governmentDepartment,Government department,"An element of government with executive responsibilities. These terms are often used to designate such a body: ministry, department, bureau or office. This MUST be used with `entityType.type` 'stateBody'."
stateAgency,State Agency,A body overseeing or administering elements of public policy. State agencies may have responsibilities which are devolved from government departments or from the state's legislative body. This MUST be used with `entityType.type` 'stateBody.
other,Other,Any other type of entity.
trust,Trust,A trust or trust like arrangement. An arrangement where a settlor transfers ownership of assets to trustees to control for the benefit of beneficiaries. This MUST be used with `entityType.type` 'arrangement' or 'legalEntity'.
nomination,Nomination,An agreement where a nominator instructs a nominee to act on their behalf in a specified capacity. This MUST be used with `entityType.type` 'arrangement'.
8 changes: 8 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/entityType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
code,title,description
registeredEntity,Registered Entity,"A legal entity created through an act of official registration. In most cases, registered entities have an officially issued identifier."
legalEntity,Legal entity,"A body with distinct legal personality, such as an international institution or statutory corporation, but which is not otherwise uniquely identified in some official register."
arrangement,Arrangement,"A legal arrangement, agreement, contract or other mechanism via which one or more natural or legal persons can associate to exert ownership or control over an entity. Parties to an arrangement have no other form of collective legal identity."
anonymousEntity,Anonymous entity,"An entity that has been identified, but for which identifying information is being withheld. The reason for non-disclosure should be given in the accompanying `unspecifiedEntityDetails` field."
unknownEntity,Unknown entity,An entity that has not been identified.
state,State,"A country, nation or community with legal sovereignty within a territory."
stateBody,State body,A core administrative or legislative unit within a state's apparatus.
24 changes: 24 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/interestType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
code,title,description
shareholding,Shareholding,An economic interest in an entity gained by holding shares.
votingRights,Voting rights,"A controlling interest in an entity gained by holding shares. Defined as the right of shareholders to vote on matters of corporate policy, including decisions on the makeup of the board of directors, issuing securities, initiating corporate actions and making substantial changes in the corporation's operations."
appointmentOfBoard,Appointment of board,A controlling interest in an entity. Defined as the absolute right to appoint members of the board of directors.
otherInfluenceOrControl,Other influence or control,"Any influence or control in an entity that is distinct from being a shareholder, having voting rights or having the absolute right to appoint to the board."
seniorManagingOfficial,Senior managing official,A controlling interest in an entity gained by employment. Defined as the person who exercises control over the management of the entity.
settlor,Settlor,"A person who, either actually or by operation of law, creates a trust. They may be referred to by other names such as a trustor, a grantor or a donor. This should also be used for a person with a settlor-equivalent role in any legal arrangement that is similar to a trust."
trustee,Trustee,A person who administers a trust for the benefit of a third party and in whom the legal title of the trust property is vested either by declaration of the settlor or by operation of law. This should also be used for a person with a trustee-equivalent role in any legal arrangement that is similar to a trust.
protector,Protector,"A person appointed to protect the interests or wishes of the settlor, providing influence and guidance to the trustee who administers the trust. This should also be used for a person with a protector-equivalent role in any legal arrangement that is similar to a trust."
beneficiaryOfLegalArrangement,Beneficiary of a legal arrangement,A person who benefits from a trust or other legal arrangement's holdings or activities.
rightsToSurplusAssetsOnDissolution,Rights to surplus assets on dissolution,The right to a share in the amount of an asset or resource that exceeds the portion that is utilized upon the winding up of an entity.
rightsToProfitOrIncome,Rights to receive profits or income,An economic interest in an entity. Defined as beneficial ownership rights beyond those otherwise implied by ownership structures that are granted by contract.
rightsGrantedByContract,Rights granted by contract,An interest that is granted by contract.
conditionalRightsGrantedByContract,Conditional rights granted by contract,An interest that exists only if some contractual condition is met.
controlViaCompanyRulesOrArticles,Control via company rules or articles,Control of an entity gained through a provision in company articles or by shareholder agreement.
controlByLegalFramework,Control by legal framework,"Control of an entity gained through a legal framework, such as a combination of legislation (primary and secondary). This type of interest is created by governments and legislators in order to establish and guide agencies and entities linked to the state."
boardMember,Board member,One of a group of people constituted as the strategic decision-making body of an organization.
boardChair,Board chair,The person holding the most power and authority on the board of directors.
unknownInterest,Unknown interest,"The interestedParty is known to have an interest in the subject of this Relationship Statement, but the nature of the interest is unknown."
unpublishedInterest,Unpublished interest,The nature of this interest is known but is not published.
enjoymentAndUseOfAssets,Enjoyment and use of assets,The use of assets belonging to an entity.
rightToProfitOrIncomeFromAssets,Right to profit or income from assets,"The right to derive profits, income or both from assets belonging to an entity."
nominee,Nominee,A person who agrees to act on behalf of the nominator in a specified capacity.
nominator,Nominator,A person who instructs a nominee to act on their behalf in a specified capacity.
7 changes: 7 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/nameType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
code,title,description
legal,Legal name,"A name that identifies the person for legal, administrative and other official purposes. A person's legal name will usually be the one that is found on official government documents."
translation,Translation of name,A translation of the person's legal name in a different language.
transliteration,Transliteration of name,A transliteration of the person's legal name in a different script.
former,Former name,A name that the person has used in the past.
alternative,Alternative name,"Another name that the person is known by. This might be an alias, a nickname or a name that the person is also known as (aka)."
birth,Birth name,The legal name of the person at birth.
4 changes: 4 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/personType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
code,title,description
knownPerson,Known person,"A natural person who has been identified, and information such as names, identifiers or biographical information can be provided about them."
anonymousPerson,Anonymous person,"A natural person who has been identified, but identifying information is being withheld. The reason for non-disclosure should be given in the accompanying `unspecifiedPersonDetails` field."
unknownPerson,Unknown person,A natural person whose identity has not been discovered or confirmed.
4 changes: 4 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/recordStatus.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
code,title,description
new,New Record,This is the first Statement published pertaining to the record referenced by `recordId`.
updated,Updated Record,This Statement updates information published in a prior Statement pertaining to the record referenced by `recordId`.
closed,Closed Record,This is the final Statement published pertaining to the record referenced by `recordId`.
4 changes: 4 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/recordType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
code,title,description,technical note
person,Person,"The Record Details in this Statement contain information about a natural person at a particular point in time.",The recordDetails object should be validated using the Person Record schema.
entity,Entity,"The Record Details in this Statement contain information that identifies and describes an entity at a particular point in time.",The recordDetails object should be validated using the Entity Record schema.
relationship,Relationship,"The Record Details in this Statement describe the interests held by an interested party in a subject (an entity) at a particular point in time.",The recordDetails object should be validated using the Relationship Record schema.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
code,title,description
isin,International Securities Identification Number (ISIN),Scheme for unique identification of securities internationally. Securities are issued 12-character identifiers. Full details of the scheme are specified by ISO 6166.
figi,Financial Instrument Global identifier (FIGI),Scheme for unique identification of securities internationally. Securities are issued 12-character identifiers. Full details of the scheme are specified as an Object Management Group standard: https://www.omg.org/spec/FIGI/.
cusip,Committee on Uniform Securities Identification Procedures (CUSIP) Number,Scheme for unique identification of securites in North America. Securities are issued 9-character identifiers. The scheme is managed by the American Bankers Association and specified as ANSI X9.6.
cins,CUSIP International Numbering System (CINS),Scheme for unique identification of securities issued outside North America. Securities are issued 9-character identifiers. The scheme is managed by the American Bankers Association and specified as ANSI X9.6.
6 changes: 6 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/sourceType.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
code,title,description
selfDeclaration,Self declaration,"The information was provided by the person or entity referred to from `declarationSubject`, or by their authorised representative."
officialRegister,Official register,The information was taken from an official register.
thirdParty,Third party,"The information was provided by a third party, not directly related to the person, entity or interests described by this statement."
primaryResearch,Primary research,The information was provided as a result of research into primary sources.
verified,Verified,The information has been verified through the process documented in the associated description.
8 changes: 8 additions & 0 deletions libcovebods/data/schema-0-4-0/codelists/unspecifiedReason.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
code,title,description
noBeneficialOwners,No beneficial owners,There are no beneficial owners who need to disclose ownership according to the rules under which this statement is made.
subjectUnableToConfirmOrIdentifyBeneficialOwner,Subject unable to confirm or identify beneficial owner,"The subject of this Relationship Statement has, as the disclosing party, been unwilling or unable to confirm the existence identify a beneficial owner."
interestedPartyHasNotProvidedInformation,Interested party has not provided information,The interested party in this Relationship Statement has not provided enough information to identify or confirm the identity of the beneficial owner.
subjectExemptFromDisclosure,Subject exempt from disclosure,The subject of this Relationship Statement is not required to disclose its beneficial owner.
interestedPartyExemptFromDisclosure,Interested party exempt from disclosure,The interested party in this Relationship Statement is exempt from having their identity disclosed.
unknown,Unknown reason,The reason an interested party cannot be provided is not known.
informationUnknownToPublisher,Information unknown to the publisher of the data,A publisher does not have access to information on this person or entity. This should not generally be used in situations where one party has the responsibility to provide such information.
Loading

0 comments on commit a082538

Please sign in to comment.