Skip to content

DrSnowbird/uco-shacl-validator-docker

Repository files navigation

SHACL-based RDF Graph Validator Docker

  • A SHACL Validator customized for UCO Ontology validation as the default configuration.
  • Important! This SHACL validator is actually generic for any SHACL ontology (use Web UI to change) -- it is not specific to UCO though the default configurations including a few of UCO ontology family (including extensions from UCO ontology)
If [ you are looking for such a requirement as a Container ]:
   Then [ this one may be for you ]

SHACL Shapes Ontology Configured

  • You can modify the configurations to add (or remove) your local domain specific SHACL ontologies to change the default.
  • Whenver you update the configuration file, you need to restart the docker services (using make down and make up)
  1. UCO (v1.2.0 as latest)
  2. CASE Ontology (v1.2.0 as latest)
  3. Adversary Engagement Ontology (University of New Heaven) (version using latest in github)

Built & Run with Dependent Docker

  1. Build DrSnowbird/python-nonroot-docker
    mkdir -p ~/shacl-project
    cd ~/shacl-project
    git clone https://github.com/DrSnowbird/python-nonroot-docker
    cd python-nonroot-docker
    make build
    
  2. Build & Run DrSnwobird/uco-shacl-validator-docker
  • Assuming you want to use default configuration to run.
    mkdir -p ~/shacl-project
    cd ~/shacl-project
    git clone https://github.com/DrSnowbird/uco-shacl-validator-docker
    cd uco-shacl-validator-docker
    make build
    make up
    

Run (recommended for easy-start)

  • If you follow the above default build and run, you can ignore this step.
  • Simply, (if you modify configuration)
    bin/auto-config-all.sh
    ./run.sh
    
  • Or, to run as Daemon mode,
    make up
    

Web-based UI

  • Use your Web Browser to go to http://0.0.0.0:58088/shacl/UCO/upload

  • URI Base Validation:

    • Content to validatet: choose [ URI ] and use the sample URI: device.json -- right-click and copy-and-paste the entire URL into Validator input field
    • Validate as: choose case from the dropdown list [ uco, case, ae, uco-all ]
    • Content syntax choose [JSON-LD] (for the above device.json)
  • File Base Validation:

    • Content to validatet: choose [ File ] and click "Select File" to provide local JSON-LD file
    • Validate as: choose case from the dropdown list [ uco, case, ae, uco-all ]
    • Content syntax choose [JSON-LD] (for the above device.json)

Stop Running

  • Just CTRL+C (if you use ./run.sh), or,
    ./stop.sh
    or
    make down
    

Quick commands

  • Makefile - makefile for build, run, down, etc.
  • build.sh - build local image
  • logs.sh - see logs of container
  • run.sh - run the container
  • shell.sh - shell into the container
  • stop.sh - stop the container

SHACL Validator Upstream Artifacts

Ontology Resources

RDF + GraphQL Resources

Additional Resources