Metaschema Java Tools

This project provides a Java implementation of the Metaschema framework that supports format-agnostic information modeling and processing.

This project supports the following features:

  • Allows developers to generate Java classes from Metaschema definitions. Using a given Metaschema definition, a developer can quickly generate Java classes for a Metaschema-based model, which can be used to create, parse, modify, and write XML, JSON, and YAML representations of that model using bound Java objects. This allows a developer to quickly start programming business logic instead of spending hours writing parsing code. This approach is similar to the binding frameworks provided by Jakarta XML Binding (JAXB), XMLBeans, Java API for JSON Binding (JSON-B), and other class-to-object binding approaches. The OSCAL Java Library is an example of applying this approach to generate Java programming APIs for a set of Metaschema-defined models.
  • Supports generating Metaschema-based Java code during Maven builds. An Apache Maven Metaschema code generation plugin is provided that supports Java class generation for a Metaschema definition during Maven builds.
  • Enables validation of data aligned with a set of Metaschema definitions using constraints defined within the Metaschema definitions. Using this framework, format-agnostic validation rules, defined in a Metaschema, can be enforced over data loaded into bound objects.
  • Allows execution of Metapath queries against data aligned with a Metaschema-based model. Metapath is an XPath-like expression language that can be used to query XML, JSON, or YAML data aligned with a Metaschema definition. This allows data to be queried irrespective of the format it is stored in.

This project contains the following sub-modules:

Please refer to each sub-module for usage instructions.