Fragment

@Entity
class Fragment(var dataID: Long? = null, var predecessorID: String? = null, var open: Boolean = false, var variantName: String = "", variantTime: Timestamp = Timestamp.from(Instant.MIN), variantID: String = "", var runningTime: Timestamp = Timestamp.from(Instant.MIN), var runningID: String = "", var isReference: Boolean = false, val model: Model? = null, var instance: Instance? = null, val trace: Trace? = null, var globalID: String? = UUID.randomUUID().toString())

The Fragment is the central class (aka root element) of the modicio metamodel. A Fragment is identified by its own variability identifiers variantTime and variantID (and optional variantName). A Fragment can be open or closed. Open refers to an open-world assumption regarding further model elements, i.e., if a Fragment is open, it represents a knowingly or unknowingly incomplete model.

The Fragment must contain a Model and can contain an Instance and Trace.

The Model, i.e., the type/class facet contains a complete or incomplete model representation.

The Instance, i.e., object/instance facet contains a single instance if defined. This instance is defined as an object net, i.e., a deep-instance regarding a root element in the Model. Per definition, the Model must contain at least all information to interpret the Instance.

The Trace contains deltas (change operations) applied to the Model or Instance.

A Fragment is always of a specific variant. The variant refers to a "branch" in terms of version control systems. The variant information is represented by the fields variantName, variantID and variantTime. Please check the modicio versioning paradigm for further information.

Constructors

Link copied to clipboard
constructor()
constructor(dataID: Long? = null, predecessorID: String? = null, open: Boolean = false, variantName: String = "", variantTime: Timestamp = Timestamp.from(Instant.MIN), variantID: String = "", runningTime: Timestamp = Timestamp.from(Instant.MIN), runningID: String = "", isReference: Boolean = false, model: Model? = null, instance: Instance? = null, trace: Trace? = null, globalID: String? = UUID.randomUUID().toString())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var dataID: Long?

Technical database (JPA) identifier used for relation joins. The dataID is system specific and not exported to XML. It must not be used to identify elements in distributed use-cases. It should not be used to identify elements from outside the service. All model elements provide other suitable identifiers to be used.

Link copied to clipboard

A global system independent identifier of a particular fragment

Link copied to clipboard

A Fragment can contain an Instance. A Fragment with a defined Instance fulfills the definition of an ESI. Refer to the publication for more information TODO paper DOI link The Instance data must be fully interpretable by the type definitions in the provided model. The optional flag exists only for technical reasons during lazy loading in the persistence layer.

Link copied to clipboard

Boolean value denoting if the given Fragment is the current reference definition of its variant. Being a reference implicates that the Fragment is not open and has no Instance defined. Basically, the reference Fragment represents the whole up-to-date default model which is used for instantiation.

Link copied to clipboard
val model: Model? = null

Each Fragment must contain a Model. The optional flag exists only for technical reasons during lazy loading in the persistence layer.

Link copied to clipboard

A Fragment can be open or closed. Open refers to an open-world assumption regarding further model elements, i.e., if a Fragment is open, it represents a knowingly or unknowingly incomplete model. In consequence, a Fragment is most likely open (that's where the name Fragment comes from)

Link copied to clipboard

Optional value of the predecessor fragment in variant and/or version (as precise as known) if known

Link copied to clipboard

The runningID is a unique string identifier of the running version. This implementation uses random-based UUIDs. This guarantees (to a high probability) that each running version in a distributed system is uniquely identified. The pair of runningID and runningTime result in a sortable unique identifier.

Link copied to clipboard

The runningTime represents the creation point / update of the running version as UTC timestamp.

Link copied to clipboard
val trace: Trace? = null

A Fragment can contain a Trace. The Trace contains deltas (change operations) applied to the Model or Instance.

Link copied to clipboard
Link copied to clipboard

The variantName is an optional arbitrary identifier to name a particular variant. The variantName is not required to be unique (which would be impossible in the distributed case). Therefore, it should not be used to access a variant. The purpose is only for helping the human modeller to distinguish variants otherwise identified by id and timestamp.

Link copied to clipboard

Functions

Link copied to clipboard
fun autowire()
Link copied to clipboard