Motation

What is Motation?

Motation is the content form that exists between connectors. A source connector will transform repository content -> Motation. While a destination connector will transform Motation -> repository content.

Motation is an extension of JSON (JavaScript Object Notation). Motation builds upon the idea of structuring complex data.

Using Motation

When using Motation you will need to adhere to Motation's specification. Motation is a hard specification where each attribute has a specific purpose. When building Motation use the builders in the go-transformer-in module. This builder will help enforce Motation's specification.

In addition to adhering to Motation's specification, you must document how each connector works to convert between Motation and a repository's content using the appropriate Motation mapping interfaced function (source/destination). Source connectors and destination connectors each handle Motation differently and require the GetMotationMapping() function for documenting how they work. This documentation will also be used to test functionality of the connector in addition to documentation. Thus, it is important that each connector is properly documented.

Motation Specification

Motation adheres to a hard and rigid specification. Each attribute has an intended purpose for it's use. Review the following sections for details on each Motation object's structure and specification.

However, not every system will nicely fit exactly to Motation's specification. As such Motation also allows for repository specific fields or extensions. These fields can be populated by a source connector to pass specific data to destination connectors.

At the destination connector, the repository specific fields should only be used when a Motation was created by a supported source repository.

You can think of Motation as the Einstein-Rosen bridge of content.

The source connector takes a larger specific repository content and fits it into Motation. Then the destination connector takes that Motation and expands it to a specific repository content.

Documenting Motation

While building a connector and mapping the repository to Motation (or vice versa) you must document how a connector maps to/from Motation. This is done with the Motation mapping function that is a part of both source and destination connectors interfaces.

These Motation mappings are used in two ways.

  1. Documentation for what a connector supports in Motation

  2. Testing that a connector works as intended

You can find more details about the Motation mapping for each connector in their respective documentation page (source/destination).

Last updated