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 Name
Schema file titleSchema IRI
Schema files corresponding IRISchema File
Upload the Schema file in the required format(JSON)Status
Select if the Schema is Published or RetiredMajor version
Add the Major value of the schema versionMinor Version
Add the Minor value of the schema versionPatch Version
Add 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 Schema
Select source term set file from drop-downTarget Schema
Select Target term set from drop-down to be mapped toSchema Mapping File
Upload the Schema Mapping file to be referenced for mapping in the required format(JSON)Status
Select 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
Name
Term set titleIRI
Term set's corresponding IRIVersion
Add the version numberStatus
Select if the Term set is Published or RetiredUpdated by
User that creates/updates the term setModified
Date & 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)
Name
Term set titleIRI
Term set's corresponding IRIVersion
Add the version numberStatus
Select if the Term set is Published or RetiredParent term set
Select the reference to the parent term set from the drop downUpdated by
User that creates/updates the term setModified
Date & 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.
Name
Term titleIRI
Term corresponding IRIDesciption
Term entity's descriptionData Type
Term entity's corresponding data typeUse
Term entity's corresponding use caseSource
Term entity's corresponding sourceVersion
Add the version numberStatus
Select if the Term set is Published or Retiredterm set
Select the reference to the parent term set from the drop downMapping
Add mappings between terms entity's of different parent term setUpdated by
User that creates/updates the termModified
Date & 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.