<commit_before>Catalogue Data Model
--------------------

![Catalogue Data Object Model](../Catalogue-Data-Object.png)

Catalogue Data Model includes all Objects to be handled by the Catalogue functionality including:

-	Hyperty Descriptors
-	Protocol Stub Descriptors
-	Idp Proxy Descriptors
-	Hyperty Interceptors Descriptors
-	Hyperty Runtime Descriptors
-	Data Object Schemas

All Catalogue Data Objects have the following attributes:

| **Attribute Name**   | **Attribute Type**       | **Mandatory** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                              |
|----------------------|:------------------------:|:-------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **cguid**            |          string          |      yes      | Catalogue Global Unique identifier of the Catalogue Object (e.g. Hyperty descriptor, ProtocolStub descriptor, etc) enabling the same object to be stored and discovered in different Catalogues. That means, *guid* corresponds to `<resource-type-id>` per [BNF of Resource Path](https://github.com/reTHINK-project/architecture/blob/master/docs/interface-design/resource-path.md). *Couldn't we have problems with too long URL paths?* |
| **type**             |   CatalogueObjectType    |      yes      | Indicates the type of Catalogue Data Object e.g. Hyperty, ProtocolStub, etc                                                                                                                                                                                                                                                                                                                                                                  |
| **version**          |          string          |      yes      | Indicates the version of Catalogue Data Object e.g. 0.1, 0.2, etc                                                                                                                                                                                                                                                                                                                                                                            |
|                      |                          |               |                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **objectName**       |          string          |      yes      | human-understable name of the catalogue object e.g. "My Awesome Hyperty".                                                                                                                                                                                                                                                                                                                                                                    |
| **sourcePackageURL** |          string          |      yes      | A string containing the URL from where the source code package of the corresponding catalogue object, e.g. deployable packages containing executable code for Hyperties or ProtoStubs, can be downloaded. **Question: should this only be the pure URL or should it also include the protocol used to download it, i.e. http://xxxxx or ftp://xxxxx etc)**                                                                                   |
| **sourcePackage**    |          string          |      no       | The deployable packages of the catalogue object (i.e. the executable of the Hyperty or ProtoStubs). Note: The *sourcePackage* attribute must be present if the *sourcePackageURL* points to this attribute.                                                                                                                                                                                                                                  |
| **language**         | DataObjectSourceLanguage |      yes      | The programming language used in the SourcePackage.SourceCode e.g. Javascript ECMA5 for Hyperties or JSON-Schema for Data Object Schemas. The main purpose of this attribute is to make reTHINK agnostic of the programming language used.                                                                                                                                                                                                   |
| **signature**        |          string          |      no       | Enables integrity and authenticity verification of Data Object catalogue.                                                                                                                                                                                                                                                                                                                                                                    |

The detailed description of the SourcePackage is described below.

| **Attribute Name**      | **Attribute Type** | **Mandatory** | **Description**                                                                                                                                   |
|-------------------------|:------------------:|:-------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------|
| **encoding**            |       string       |      yes      | Encoding used in the SourceCode in case we have non-printable characters                                                                          |
| **SourceCodeClassname** |       string       |      yes      | The Classname of the SourceCode e.g. "AwesomeHyperty"                                                                                             |<commit_msg>update to hyperty catalogue data model<commit_after>Catalogue Data Model
--------------------

![Catalogue Data Object Model](../Catalogue-Data-Object.png)

Catalogue Data Model includes all Objects to be handled by the Catalogue functionality including:

-	Hyperty Descriptors
-	Protocol Stub Descriptors
-	Idp Proxy Descriptors
-	Hyperty Interceptors Descriptors
-	Hyperty Runtime Descriptors
-	Data Object Schemas

All Catalogue Data Objects have the following attributes:

| **Attribute Name**   | **Attribute Type**       | **Mandatory** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                              |
|----------------------|:------------------------:|:-------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **cguid**            |          string          |      yes      | Catalogue Global Unique identifier of the Catalogue Object (e.g. Hyperty descriptor, ProtocolStub descriptor, etc) enabling the same object to be stored and discovered in different Catalogues. That means, *guid* corresponds to `<resource-type-id>` per [BNF of Resource Path](https://github.com/reTHINK-project/architecture/blob/master/docs/interface-design/resource-path.md). *Couldn't we have problems with too long URL paths?* **Attention: Need to update the figure to read cguid instead of guid.** |
| **type**             |   CatalogueObjectType    |      yes      | Indicates the type of Catalogue Data Object e.g. Hyperty, ProtocolStub, etc                                                                                                                                                                                                                                                                                                                                                                  |
| **version**          |          string          |      yes      | Indicates the version of Catalogue Data Object e.g. 0.1, 0.2, etc                                                                                                                                                                                                                                                                                                                                                                            |
|                      |                          |               |                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **objectName**       |          string          |      yes      | human-understable name of the catalogue object e.g. "My Awesome Hyperty".                                                                                                                                                                                                                                                                                                                                                                    |
| **sourcePackageURL** |          string          |      yes      | A string containing the URL from where the source code package of the corresponding catalogue object, e.g. deployable packages containing executable code for Hyperties or ProtoStubs, can be downloaded. **Question: should this only be the pure URL or should it also include the protocol used to download it, i.e. http://xxxxx or ftp://xxxxx etc)**                                                                                   |
| **sourcePackage**    |          string          |      no       | The deployable packages of the catalogue object (i.e. the executable of the Hyperty or ProtoStubs). Note: The *sourcePackage* attribute must be present if the *sourcePackageURL* points to this attribute.                                                                                                                                                                                                                                  |
| **language**         | DataObjectSourceLanguage |      yes      | The programming language used in the SourcePackage.SourceCode e.g. Javascript ECMA5 for Hyperties or JSON-Schema for Data Object Schemas. The main purpose of this attribute is to make reTHINK agnostic of the programming language used.                                                                                                                                                                                                   |
| **signature**        |          string          |      no       | Enables integrity and authenticity verification of Data Object catalogue.                                                                                                                                                                                                                                                                                                                                                                    |

The detailed description of the SourcePackage is described below.

| **Attribute Name**      | **Attribute Type** | **Mandatory** | **Description**                                                                                                                                   |
|-------------------------|:------------------:|:-------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------|
| **encoding**            |       string       |      yes      | Encoding used in the SourceCode in case we have non-printable characters                                                                          |
| **SourceCodeClassname** |       string       |      yes      | The Classname of the SourceCode e.g. "AwesomeHyperty"                                                                                             |
{'fraction_non_alphanumeric': 0.14359122819714845, 'fraction_numerical': 0.0007237461098646595, 'mean_word_length': 0.4933535069707122, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 295, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6602089', 'n_tokens_mistral': 1599, 'n_tokens_neox': 1579, 'n_words': 653}