SpecIF

SpecIF Metamodel

This section describes the SpecIF metamodel used to define the SpecIF syntax.

The description by a metamodel is done in a technology independent way following the OMG Meta Object Facility (MOF) Metamodeling technology and the OMG Model Driven Architecture (MDA) approach. The metamodel defines a platform-independent model (PIM).

The MOF metamodeling approach is a simplified form of UML class modeling to define data structures (terms, attributes and associations) for data models. From such a platform-independent metamodel, different concrete data representations - platform-specific models (PSM) - can be derived. This can for example be a SpecIF representation using JSON, XML or a SQL database schema and so on.

You will find the realization as JSON schema, used for file- and Web API-representations in the next chapters of this specification.

Further platform-specific models for SpecIF (e.g. XML) are not yet defined and are not part of this release version of the SpecIF-specification, but may be developed and released in future releases of SpecIF.

SpecIF Repositories

The following figure shows the entry point to the SpecIF metamodel. The attributes of the classes are hidden for better readability and will be discussed in the sections below.

SpecIF Project Metamodel

The SpecIF class is the outermost element of a SpecIF data representation. We can call it a repository or data set. It defines the entire SpecIF data set represented in platform-specific implementation by a SpecIF file or a SpecIF persistence layer like a database or data provided by a Web API. Such a SpecIF repository instance is often identical with a project context in a development project. It can contain the entire content of PLM data created in a project context.

SpecIF allows the selected and distributed inclusion of data into a SpecIF repository. It is not required to have all data, that can be stored in a SpecIF data set, in a single repository.
Therefore, you can have one SpecIF repository containing the data and class definitions, and a second, separated set containing the data content, but referencing the required data types by the unique identifiers. A SpecIF instance has a boolean attribute called isExtension. If this value is set to true, a tool, that is working with this data, needs further SpecIF data to get the complete definition of all required data types and data type definitions.

SpecIF-Repository description attributes

To express additional information about the SpecIF repository resp. the project data represented by SpecIF, the metamodel defines some attributes for describing the SpecIF metaclass.

The SpecIF repository metaclasses

SpecIF

The SpecIF metaclass has the following attributes:

Creator

The Creator metaclass defines information about the SpecIF data creator.

It has the following attributes:

Org

The Org metaclass describes the SpecIF creator’s organization and has the following attribute:

Rights

The Rights metaclass defines a data structure to represent copyright and/or license information about the SpecIF data. It has the following attributes:

Data representation and data type definitions in SpecIF

In SpecIF it is possible to define concrete data using the concept of graph data, represented by the metaclasses Resource (as graph nodes) and Statement (as graph edges). These two elements can contain Property elements to store a set of data elements (e.g. a title and a description). A property has a well defined (primitive) data type (e.g. string, integer etc.). This allows a tool to present, edit and validate property data using specialized editors for numbers, text or formatted text.

The elements containing the data need a specification about data structure and data types. This is done in SpecIF by defining a set of classifiers for the concrete data. These classifiers define for example what kind of properties are included in a resource element called ‘Requirement’.

The SpecIF-Metamodel defines a set of classes that are responsible for these data type definitions:

Metamodel helper classes

The SpecIF metamodel defines three helper classes. They are described in this section.

Base Element

Some attributes in the metamodel are common for multiple metaclasses. We define this in an abstract metaclass BaseElement.

SpecIF metaclass base attributes

The following metaclasses are inherited from BaseElement:

Remark: The attributes of the base metaclass BaseElement are not set for each child class any more!

MultilanguageText

The metaclass *MultilanguageText*

To realize the concept of data storage in multiple languages, SpecIF defines a metaclass called MultilanguageText.

This class defines three attributes:

Typically an array of these MultilanguageText objects is used to represent a value in multiple languages. Each single array value contains the same text content but in a specific language (english, german, etc.).

EnumeratedValue

The metaclass *EnumeratedValue*

To define enumerations in SpecIF the metaclass EnumerationValue is used to define the values for enumerations in data types. In SpecIF different data types can be defined as enumerations by defining a set of predefined values. This is done using the EnumeratedValue class.

This class defines two attributes:

AlternativeId

The metaclass *AlternativeId*

AlternativeId data values are used to further define identifier values in addition to the id attribute in SpecIF. This is helpful for data integrations where multiple tools use their own internal identifiers. So you can represent these ‘legacy’ IDs in SpecIF. AlternativeId has the following attributes:

SpecIF-Metamodel details

The figure below shows the metamodel with properties and associations between elements to represent data representation, data type definitions and hierarchical structures.

SpecIF Metamodel elements with Associations

On the right you can see the classes defining the data structures for concrete data elements like Resource, Statement, Property, Hierarchy and Node. On the left you can see the data type defining elements like ResourceClass, StatementClass, PropertyClass and DataType.

In the following sections the semantics of all elements is described in detail.

DataType

The metaclass *DataType*

A DataType is used to define the base data types (primitive data types) on which all other type definitions are based. SpecIF allows the definition of primitive data types for numbers, formated or unformatted text strings, DateTime values and enumerations. So the DataType metaclass defines the following attributes to satisfy these requirements:

It is possible to restrict the possible values for a data type. Enumerated data types can be defined and used in this manner. The allowed values are defined by the attribute enumeration using a list of EnumeratedValue elements.

Enumerations may be defined for all data types (except for boolean which is an enumeration itself), so it is possible to define a set of strings as enumeration, a set of numbers or a set of any other base type. This might be helpful for example to define a data type for story points used in agile project management, often defined as Fibonacci numbers.

Note that in a SpecIF data set the values of all data types are represented as strings, even the numbers. So, a SpecIF value is always a string, no matter which dataType it has.

PropertyClass

The metaclass *PropertyClass*

A PropertyClass defines the type of a SpecIF property. Properties are used to define data of resource and statement elements. The PropertyClass has the following attributes:

ResourceClass

The metaclass *ResourceClass*

A ResourceClass is used to define the type of a SpecIF resource instance. SpecIF resource classes can inherit properties from othe resource classes. Inheritance is indicated by an attribute extends pointing to other existent resource class elements. Properties of the inherited class apply plus the properties defined by the given class itself - just like inheritance concepts in object oriented data modeling and programming.

The ResourceClass has the following attributes:

StatementClass

The metaclass *StatementClass*

A StatementClass defines the type of a SpecIF statement instance. Inheritance from other statement classes using the extends attribute is possible, as well. Statements are the edges in a SpecIF graph and are in fact semantic relations between resources. A statement has two ends called subject and object. An example is “system-component-IJK satisfies requirement-345”. A StatementClass may define eligible resource classes for the subject an object of the statement instances. This is done by referencing the allowed subject ResourceClass elements and object ResourceClass elements. Restricting the eligible resource classes forboth subject and object of a statement can effectively exclude meaningless, misleading or even false statements.

The StatementClass has the same attributes as a ResourceClass and in addition:

Property

The metaclass *Property*

A Property is an instance of a PropertyClass and is used to store a concrete data value in SpecIF. Each property in SpecIF is defined as an array of values. The attribute isMultiple in the PropertyClass specifies if a property value is an array or a single value.

If isMultiple is set to false and the property attribute values contains more than one value, only the first value shall be used and all other array elements shall be ignored!

Depending on the DataType, that is used as definition of the PropertyClass, each value of the array is either a MultilanguegeText for plain or xtml-textual content or a string for all other contents (e.g. numbers, enumerations etc.). For enumerations the ID of the EnumerationValue is stored as property value.

A property has the following attributes:

Resource

The metaclass *Resource*

A Resource is an instance of a PropertyClass and the element in SpecIF that represents a node in the graph data structure. Resources represent all kind of concrete data in PLM. This might be a requirement, a model element in UML or SysML or an electrical circuit in an E-CAD model etc.

A resource has the following attributes:

Statement

A Statement is an instance of a StatementClass and the element in SpecIf that defines the edge in the graph data structure. Statements allow to define predicate logic in form of Subject - Predicate - Object. The subject and the object are resources, statements of file elements, the predicate is always a statement.

A statement is inherited from a resource and has the following additional attributes:

Node

The metaclass *Node*

The metaclass Node allows to define hierarchical data structures (trees) in SpecIF. Typical application scenarios are hierarchical structures in textual specifications like documents and the structures in CAD and other modeling tools.

The data is not directly included inside node elements. Instead, the resources of a node are just included via reference. This allows a separation of data model and view (view concept as known e.g. from UML-tools) and the inclusion of the same resource elements into multiple hierarchy trees.

The node element have the following attributes:

File

The last remaining element to describe is the File metaclass. SpecIF allows the inclusion of any kind of file into the repository. This allows for example to add files as attachments to a SpecIF specification etc. The File element allows to describe and reference files contained in a SpecIF repository.

The metaclass *File*

The metaclass File has the following attributes: