The Experience Schema Service maintains referential representations of domain entities, as well as transformational mappings that describe how to convert an entity from one particular schema representation to another.
This component responsible for managing pertinent object/record metadata schemas, and the mappings for transforming records from a source metadata schema to a target metadata schema. This component will also be used to store and link vocabularies from stored schema.
Python >=3.7 Download and install Python from here Python.
Docker Download and install Docker from here Docker.
DB_NAME - MySql database name
DB_USER - MySql database user
DB_PASSWORD - MySql database password
DB_ROOT_PASSWORD - MySql database root password
DB_HOST - MySql database host
DJANGO_SUPERUSER_USERNAME - Django admin user name
DJANGO_SUPERUSER_PASSWORD - Django admin user password
DJANGO_SUPERUSER_EMAIL -Django admin user email
SECRET_KEY_VAL -Django Secret key to put in Settings.py
-
Clone the Github repository:
-
Open terminal at the root directory of the project.
example: ~/PycharmProjects/openlxp-xss
-
Run command to install all the requirements from requirements.txt
docker-compose build.
-
Once the installation and build are done, run the below command to start the server.
docker-compose up
-
Once the server is up, go to the admin page:
http://localhost:8000/admin (replace localhost with server IP)
-
On the Admin page, log in with the admin credentials
-
Add Schema Ledger:
Registry for Maintaining and Managing Schemas
Schema NameSchema file titleSchema IRISchema files corresponding IRISchema FileUpload the Schema file in the required format(JSON)StatusSelect if the Schema is Published or RetiredMajor versionAdd the Major value of the schema versionMinor VersionAdd the Minor value of the schema versionPatch VersionAdd the Patch version number of the schema
Note: On uploading the schema file in the required format to the schema ledger the creation of corresponding term set, linked child term set and terms process is triggered.
-
Add Transformation Ledger:
Registry for Maintaining and Managing the Mapping of Schemas
Source SchemaSelect source term set file from drop-downTarget SchemaSelect Target term set from drop-down to be mapped toSchema Mapping FileUpload the Schema Mapping file to be referenced for mapping in the required format(JSON)StatusSelect if the Schema Mapping is Published or Retired
Note: On uploading the Schema Mapping File in the required format to the transformation ledger, this triggers the process of adding the mapping for the corresponding term values.
-
Add Term set:
Term sets supports the concept of a vocabulary in the context of semantic linking
NameTerm set titleIRITerm set's corresponding IRIVersionAdd the version numberStatusSelect if the Term set is Published or RetiredUpdated byUser that creates/updates the term setModifiedDate & time when term set was created or modified
-
Add Child Term set:
Child term sets is a term set that contains a references to other term-sets (schemas)
NameTerm set titleIRITerm set's corresponding IRIVersionAdd the version numberStatusSelect if the Term set is Published or RetiredParent term setSelect the reference to the parent term set from the drop downUpdated byUser that creates/updates the term setModifiedDate & time when term set was created or modified
-
Add Term:
A term entity can be seen as a word in our dictionary. This entity captures a unique word/term in a term-set or schema.
NameTerm titleIRITerm corresponding IRIDesciptionTerm entity's descriptionData TypeTerm entity's corresponding data typeUseTerm entity's corresponding use caseSourceTerm entity's corresponding sourceVersionAdd the version numberStatusSelect if the Term set is Published or Retiredterm setSelect the reference to the parent term set from the drop downMappingAdd mappings between terms entity's of different parent term setUpdated byUser that creates/updates the termModifiedDate & time when term was created or modified
XSS contains API endpoints which can be called from other components
Query string parameter: name version iri
http://localhost:8080/api/schemas/?parameter=parameter_value
This API fetches the required schema from the repository using the Name and Version or IRI parameters
Query string parameter: sourceName sourceVersion sourceIRI targetName targetVersion targetIRI
http://localhost:8080/api/mappings/
This API fetches the required mapping schema from the repository using the Source Name, Source Version, Target Name and Target Version or source IRI and Target IRI parameters
To update an existing installation, pull the latest changes using git
Then restart the application using docker-compose restart
Occasionally some updates may require the application be rebuilt using docker-compose up --build, but this can also rebuild the database resulting in data loss
To run the automated tests on the application run the command below
Test coverage information will be stored in an htmlcov directory
docker-compose --env-file .env run app sh -c "coverage run manage.py test && coverage html && flake8"Check the logs of application in the docker container.
This project uses the MIT license.