The NIEM Metamodel: a data model describing NIEM data models

See git repository at https://github.com/webb/niem-metamodel. Report issues at https://github.com/NIEM/NIEM-Metamodel/issues

Introduction

The National Information Exchange Model (NIEM) is a standards-based approach for building interoperable information exchanges, focused on the development and reuse of a set of common data definitions. These data definitions are provided as XML Schema, suitable for use as a basis for building schemas for XML messages for interchange between systems.

NIEM has focused on distributed, interoperable governance, enabling organizations to work together on a set of data definitions that all can use, and which work together seamlessly. NIEM has also focused on providing data and data definitions that are interoperable across systems and implementation technology. By relying on XML Schema and XML as the point of interoperability, NIEM enabled systems to be developed without a dependency on programming language, operating system platform, or database implementation.

This repository reflects an effort to improve NIEM to allow for data defintions that are interoperable across data representation and specification technologies. This repository defines a model for NIEM data definitions, so that those definitions may be used with technologies other than XML Schema. For example, an exchange may be stood up using JSON messages, with JSON schema defining the syntax of those messages. The model, describing objects, values, and relationships between them, will be consistent across the XML Schema and the JSON schema. This consistency will ensure that data definitions can be reused across multiple technologies.

NIEM’s current effort is on developing the model to define data defintions for XML Schema, JSON Schema, and UML.

Expressing a NIEM model with different technologies

Use of the metamodel to support technologies

A true metamodel

This repository holds a true metamodel, in that the metamodel defines itself.

The metamodel is a model that defines models for models

The contents of a model

A model consists of a set of data definitions, described below. Each of these relationships are described by the metamodel, and enforced with XML Schema and Schematron rules.

The contents of a model

Terminology:

The NIEM Metamodel primarily uses terms from RDFS and OWL, along with terms from XML Schema.

Order

Within the code for representing and processing models, consistently use this order:

  1. Model
  2. Namespace
  3. ObjectProperty
  4. Class
  5. DataProperty
  6. Datatype

Class content style

Each class needs to identify its content style as one of the following:

This is self-evident, given:

  1. a reference to a base type which identifies its content style, and
  2. extension content (has-value has-object-property)

Versioning

Relevant Specifications

Todo and Options

Be a suitable representation for wantlists

Find a good way to handle augmentations

Determine what level of detail the model should hold

For example, the current model holds:

<Name>PersonGivenName</Name>

It could instead hold

<Name>person given name</Name>

With this representation, both the Person element and the PersonType complex type could have the same name, person, with the Type suffix automatically applied in translation from the model to XSD.

Or, you could break down names into parts:

<Name>
  <SubjectTerm>person</SubjectTerm>
  <PropertyTerm>given name</PropertyTerm>
  <RepresentationTerm>name</RepresentationTerm>
</Name>

One reason that we’ve never put a representation of term breakdown into the model is that it any representation for it is exceedingly klunky and verbose.

There’s not a good way to construct this breakdown from the XSD names automatically, so translations to map between XSD and models would be lossy.

Migrate NDR Rules to apply to models

Some NDR rules would be better fit to models than XML Schemas. Then those rules could be applied to all implementations of models (e.g., JSON Schema, UML).

How would you write a rule that applied to a model and not a schema? If you did Schematron, you’d still be pegged to XML representations of a model. You could do Schematron with a language binding to Javascript, but that would be processed with new code.

Other options