Model API reference

Overview

This reference describes the Yellicode meta model. This model is implemented by the @yellicode/elements NPM package, which is the API that you use to navigate Yellicode models (created by Yellicode Modeler) from a code generation template. The meta model is a subset of UML 2.5 and extends it with elements that we consider relevant.

TL;DR

The meta model might seem complex because there are many abstractions. However, the following summary is often enough to get started using it:

  • A model has packaged elements (such as Classes, Enumerations and Packages).
  • Some packaged elements may contain members (such as Attributes, Operations and Enumeration Literals).
  • Models and packages can be extended using Profiles.
  • A Profile can define stereotypes (and some other elements such as primitive types and enumerations).
  • A Stereotype enables you to extend model elements with platform or domain specific attributes (which are called Tagged Values).

Interfaces

AssociationAssociations represent relationships between classes.
BehavioralFeatureA BehavioralFeature is a feature of a Classifier that specifies an aspect of the behavior of its instances. A BehavioralFeature is implemented (realized) by a Behavior. A BehavioralFeature specifies that a Classifier will respond to a designated request by invoking its implementing method.
BehavioredClassifierA BehavioredClassifier may have InterfaceRealizations, and owns a set of Behaviors one of which may specify the behavior of the BehavioredClassifier itself.
ClassA Class classifies a set of objects and specifies the features that characterize the structure and behavior of those objects. A Class may have an internal structure and Ports.
ClassifierA Classifier represents a classification of instances according to their Features.
CommentA Comment is a textual annotation that can be attached to a set of Elements.
DataTypeA DataType is similar to a Class; however, instances of data type are identified only by their value. If two data types have the same value, the instances are considered identical.
DirectedRelationshipA DirectedRelationship represents a relationship between a collection of source model Elements and a collection of target model Elements.
ElementAn Element is a constituent of a model. As such, it has the capability of owning other Elements.
EnumerationAn Enumeration is a DataType whose values are enumerated in the model as EnumerationLiterals.
EnumerationLiteralAn EnumerationLiteral is a user-defined data value for an Enumeration.
FeatureA Feature declares a behavioral or structural characteristic of Classifiers.
GeneralizationA Generalization is a taxonomic relationship between a more general Classifier and a more specific Classifier. Each instance of the specific Classifier is also an instance of the general Classifier.The specific Classifier inherits the features of the more general Classifier. A Generalization is owned by the specific Classifier.
InterfaceInterfaces declare coherent services that are implemented by BehavioredClassifiers that implement the Interfaces via InterfaceRealizations.
InterfaceRealizationAn InterfaceRealization is a specialized realization relationship between a BehavioredClassifier and an Interface. This relationship signifies that the realizing BehavioredClassifier conforms to the contract specified by the Interface.
LiteralBooleanA LiteralBoolean is a specification of a Boolean value.
LiteralIntegerA LiteralInteger is a specification of an Integer value.
LiteralNullA LiteralNull specifies the lack of a value.
LiteralRealA LiteralReal is a specification of a Real value.
LiteralSpecificationA LiteralSpecification identifies a literal constant being modeled.
LiteralStringA LiteralString is a specification of a String value.
LiteralUnlimitedNaturalA LiteralUnlimitedNatural is a specification of an UnlimitedNatural number.
MemberedClassifierDefines a common interface for Classifiers (Class, DataType and Interface) that have attributes and operations.
ModelRepresents the top-level package.
MultiplicityElementA multiplicity is a definition of an inclusive interval of non-negative integers beginning with a lower bound and ending with a (possibly infinite) upper bound. A MultiplicityElement embeds this information to specify the allowable cardinalities for an instantiation of the Element.
NamedElementA NamedElement is an Element in a model that may have a name. The name may be given directly and/or via the use of a StringExpression.
OperationAn Operation is a BehavioralFeature of a Classifier that specifies the name, type, parameters, and constraints for invoking an associated Behavior. An Operation may invoke both the execution of method behaviors as well as other behavioral responses.
OrderedElementDefines a common interface for named elements that are part of an ordered collection.
PackageA package is used to group elements, and provides a namespace for the grouped elements. A package can have one or more profile applications to indicate which profiles have been applied. Because a profile is a package, it is possible to apply a profile not only to packages, but also to profiles.
PackageableElementA PackageableElement is a NamedElement that may be owned directly by a Package.
ParameterA Parameter is a specification of an argument used to pass information into or out of an invocation of a BehavioralFeature. Parameters can be treated as ConnectableElements within Collaborations.
PrimitiveTypeA PrimitiveType defines a predefined DataType, without any substructure. A PrimitiveType may have an algebra and operations defined outside of UML, for example, mathematically.
ProfileMetamodel customizations are defined in a profile, which is then applied to a package. A profile can define classes, stereotypes, data types, primitive types, enumerations. Stereotypes are specific metaclasses, tagged values are standard metaattributes, and profiles are specific kinds of packages.
PropertyA Property is a StructuralFeature. A Property related by ownedAttribute to a Classifier (other than an association) represents an attribute and might also represent an association end. It relates an instance of the Classifier to a value or set of values of the type of the attribute. A Property related by memberEnd to an Association represents an end of the Association. The type of the Property is the type of the end of the Association.
RedefinableElementA RedefinableElement is an element that, when defined in the context of a Classifier, can be redefined more specifically or differently in the context of another Classifier that specializes (directly or indirectly) the context Classifier.
RelationshipRelationship is an abstract concept that specifies some kind of relationship between Elements.
StereotypeStereotype is a profile class which defines how an existing metaclass may be extended as part of a profile. It enables the use of a platform or domain specific terminology or notation in place of, or in addition to, the ones used for the extended metaclass.
StereotypeExtensionEach stereotype may extend one or more metaclasses through a StereoTypeExtension.
StructuralFeatureA StructuralFeature is a typed feature of a Classifier that specifies the structure of instances of the Classifier.
StructuredClassifierStructuredClassifiers may contain an internal structure of connected elements each of which plays a role in the overall Behavior modeled by the StructuredClassifier.
TaggedValueSpecificationSpecifies the value of a meta attribute (tagged value) for a particular element.
TypeA Type constrains the values represented by a TypedElement.
TypedElementA TypedElement is a NamedElement that may have a Type specified for it.
ValueSpecificationA ValueSpecification is the specification of a (possibly empty) set of values.

Enumerations

AggregationKindAggregationKind is an Enumeration for specifying the kind of aggregation of a Property.
ParameterDirectionKindParameterDirectionKind is an Enumeration that defines literals used to specify direction of parameters.
VisibilityKindVisibilityKind is an enumeration type that defines literals to determine the visibility of Elements in a model.