Fork me on GitHub

OSCAL Java Library

A Java library to support processing OSCAL content.

This open-source, Metaschema Java library offers a programmatic means to work with OSCAL models defined by the Metaschema modeling language. This framework also supports programmatically creating, modifying, parsing, and writing XML, JSON, and YAML OSCAL instance data. This work is intended to make it easier for Java software developers to incorporate OSCAL-based capabilities into their applications.

The following features are supported by this library:

  • Reading and writing OSCAL documents in XML, JSON, and YAML formats into a common Java object model.
  • Resolution of OSCAL profiles to produce resolved catalogs.
  • Validation of OSCAL content well-formedness and validation of OSCAL syntax using XML and JSON schemas.
  • (Experimental) Validation of OSCAL content using Metaschema constraints to enforce allowed values, cross-references, and some conditionally required data elements.
  • Builders for programmatically creating common OSCAL data elements.

This library is based on the Metaschema Java Tools project.

Usage

The following dependency can be added to your POM to use this library.

<dependency>
  <groupId>dev.metaschema.oscal</groupId>
  <artifactId>liboscal-java</artifactId>
  <version>5.1.0</version>
</dependency>