Skip to content

This repository provides JSON-LD stubs and automation tools to assist adopters in implementing JSON-LD serialization for CASE and UCO ontology classes, facets, and properties.

License

Notifications You must be signed in to change notification settings

casework/CASE-Mapping-Template-Stubs

Repository files navigation

CASE Mapping Template Stubs

Continuous Integration CASE Version

This template repository is provided for those looking to draft JSON-oriented utilities using ontologies within the Cyber Domain Ontology ecosystem, particularly CASE and UCO. "Stub" JSON dictionaries are provided for each class within CASE and UCO, generated from the ontologies.

Each "stub" provides a minimal JSON-LD context dictionary specific to a class, and null-valued entries for each property on that class and entailed by parent classes. Cardinality is reflected by the null-ish value recorded: null is used when a property has maximum-cardinality 1, and an empty list ([]) is recorded when a property has a maximum-cardinality greater than 1 or is unbounded.

Folders

  1. /templates is generated by case_utils ontology and sub-ontologies alone.

Maintenance and refreshing

Resources in this repository do not require use of any code for their typical usage.

For those making updates to the repository (such as on ontology releases), see CONTRIBUTE.md.

Usage/run

The script src/generate_single_stub_json.py is usable for generating a stub JSON-LD object for any class, if the ontology (including all ontologies reached by owl:imports) is provided on the command line.

usage: generate_single_stub_json.py [-h] [--debug] out_json class_iri [supplemental_graph ...]

positional arguments:
  out_json
  class_iri
  supplemental_graph

options:
  -h, --help          show this help message and exit
  --debug

Examples

See tests/Makefile for examples of how to run generate_single_stub_json.py for specific classes of interest. Demonstrations are done for:

Note

  1. Properties applicable to a class are drawn directly from the class definition, and from all parent class definitions.

    1. Properties are also associated with classes from explicit rdfs:domain statements. When a rdfs:domain domain statement is absent, under OWL semantics this implies that the property applies to owl:Thing (i.e., is universal); but, to support use cases where domains are represented with other structural properties (e.g., dcam:domainIncludes, schema:domainIncludes), this project requires explicit statements of rdfs:domain owl:Thing for adding to a stub.
  2. Stubs for uco-core:Facets applicable to any eventual subclass of uco-core:UcoObject are also inlined in the stub for the uco-core:UcoObject.

Licensing

Portions of this repository contributed by NIST are governed by the NIST Software Licensing Statement.

About

This repository provides JSON-LD stubs and automation tools to assist adopters in implementing JSON-LD serialization for CASE and UCO ontology classes, facets, and properties.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •