The UCO/CASE Validation Toolkit provides the capability to validate JSON-LD data files against a turtle-file based ontology such as the Unified Cyber Ontology (UCO) and Cyber-Investigation Analysis Standard Expression (CASE).
Note - this tool has a number of suggested improvements that may be added in the future. Among these, the tool may present error messages that could be viewed by some as warnings vs errors in ontological representation.
There are minor toolkit setup differences between Linux and Windows, described here:
Create empty working directory
Copy source files into the working directory
In the tookit directory, create a python3 virtual environment
Activate the virtual environment
Install the source into the virtual environment
Run python commands
foo>
git clone https://github.com/ucoProject/UCO-Utility-Pre-0.7.0-Validator.gitfoo>
cd UCO-Utility-Pre-0.7.0-Validatorfoo\enhanced-case-toolkit>
virtualenv --python=python3 venvfoo\enhanced-case-toolkit>
venv\Scripts\activate(venv) foo\enhanced-case-toolkit>
pip install --editable src(venv) foo\enhanced-case-toolkit>
cd src(venv) foo\enhanced-case-toolkit\src>
python validate.py ..\data\ontology-0.4.0\ontology ..\data\samples-0.4\accounts.json(venv) foo\enhanced-case-toolkit>
deactivateAs long as the virtual environment is activated, you can now run these scripts.
validate ontology_path jsonld_path [jsonld_path...]
Validate json-ld data against an ontology
jsonld_path: path to json-ld file or serialized json-ld file.
v4to5 [-o output_filepath] input_filepath
Convert version UCO 0.4 json-ld data to UCO 0.5
output_filepath path to output version 0.5 jsonld data file [default: STDOUT]
serialize [-c comment] [-o output_filepath] input_filepath
Serialize ontology or json-ld file
input_filepath: path to json-ld file or directory containing turtle files.
describe serialized_filepath
Describe serialized file