Template: OASIS:ClassCode

This section specifies the template ClassCode.

The specification comprises a SysML Block that represents the template and an associated Parametric Diagram that defines the templates and PLCS PSMTemplate objects instantiated by the ClassCode template.

The specification comprises the following sections:

NOTE    An explanation of a template and its specification is provided in the Template overview

The ClassCode template describes how to represent a Code that is to be used as a Class.

NOTE    The use of Codes is described in Codes.

The SysML Block Definition diagram in Figure 1 shows how classification is represented in the PLCS PSM.

Figure 1 -  Classification model

The following templates are related to the ClassCode template:

NOTE    The ClassCode template may make reference to other templates as part of the Parametric Diagram. These are not listed here.

Figure 2 shows the SysML Block that represents the template. The Block is an abstraction representing a pattern of templates and PLCS PSMTemplate objects.

The properties, i.e. the SysML Block Part, Reference and Value properties, of the template's SysML Block are described in the Template Properties section.

The output ports shown on the template's SysML Block are described in the template output ports section.

The SysML Parametric diagrams for the template Block are shown in template parametric diagram section.

Figure 2 -  Template block definition diagram for ClassCode

The following SysML Part, Reference, and Value properties are defined for this template:

References:
codeContext [1] (Template: OASIS:Organization)
The organization that is responsible for defining the code.
codeSource [0..1] (Template: OASIS:Document)
The document in which the code is defined.
subClassOf [0..1] (Block: Ap239Ap233Psm:ExternalOwlClass)
The OWL class of which the Class represented by code is a subset.

The following constraint, normally a uniqueness constraint, is applicable when instantiating the ExternalOwlClass:

rule.Ap239Ap233Psm.ExternalOwlClass.ur1
Constraint: ur1
Specification: (OCL2.0)
ExternalOwlClass::allInstances()->isUnique(class)
The reference data used in Block: Ap239Ap233Psm:ExternalOwlClass is restricted as follows:
RDL constraint 1:
The reference data for:
OASIS:ClassCode.subClassOf -> ExternalOwlClass.class
is restricted to the following class or a subclass:
typeOfCode [0..1] (Block: Ap239Ap233Psm:ExternalOwlClass)

The OWL class that defines the set of code identifiers of which this code is a member

The following constraint, normally a uniqueness constraint, is applicable when instantiating the ExternalOwlClass:

rule.Ap239Ap233Psm.ExternalOwlClass.ur1
Constraint: ur1
Specification: (OCL2.0)
ExternalOwlClass::allInstances()->isUnique(class)
The reference data used in Block: Ap239Ap233Psm:ExternalOwlClass is restricted as follows:
RDL constraint 1:
The code identifier.
The reference data for:
OASIS:ClassCode.typeOfCode -> ExternalOwlClass.class
is restricted to the following class or a subclass:
Values:
code [1] (Block: Ap239Ap233Psm:IdentifierString)
A string representing the code.

The following output ports are defined for this template:

class (Block: Ap239Ap233Psm:ExternalClass)
Enables the Block: Ap239Ap233Psm:ExternalClass instantiated by this template to be referenced when the template is used.

There are no constraints defined for this template.

This section describes the template's Parametric Diagram. The diagram details the pattern of templates and PLCS PSMTemplate objects that are required to represent the template ClassCode.

The public properties, i.e. those visible in the template's SysML block (See Figure 2) are shown on the left of a Parametric Diagram.

NOTE    Restrictions on the reference data to be set on the public properties is defined in the Template Properties section.

The output ports are shown on the right of a Parametric Diagram.

PLCS PSM objects are shaded khaki and Templates are shaded light green in a Parametric Diagram.

Figure 3 -  Parametric diagram for ClassCode

The following blocks are instantiated by this template and bound to private parts of the template as shown in the Parametric Diagram section:

Private Part Property:identification [1] (Template: OASIS:Identification)
Private Part Property:externalClass [1] (Block: Ap239Ap233Psm:ExternalClass)

The following constraint, normally a uniqueness constraint, is applicable when instantiating the ExternalClass:

rule.Ap239Ap233Psm.ExternalOwlClass.ur1
Constraint: ur1
Specification: (OCL2.0)
ExternalClass::allInstances()->isUnique(Sequence{id, source})
Private Part Property:subSet [1] (Block: Ap239Ap233Psm:SubsetMember)

Figure 3 shows the instances that have been instantiated in the template. These are used to set the default value of blocks.

Instance diagram
Figure 3 -  Model instance diagram for ClassCode

The following instances have been created:

External_class_identification_code instance of Block: Ap239Ap233Psm:ExternalOwlClass.

The OWL class defining that the identifier is a code that identifies an ExternalClass
classPlcsThing instance of Block: Ap239Ap233Psm:ExternalOwlClass.

The OWL class of which the ExternClass is a sub class.

Figure 3 shows the constraint blocks that have been created in the template.

Constraint Blocks are typically used to combine blocks into a collection that can then be bound to a property. For example, combining a set of identifications that can then be bound to property of type Identification.

Constraints diagram
Figure 3 -  Constraint block diagram for ClassCode

The following constraint blocks have been created:

Constraint: CodeOrOwlClass
Specification: (OCL2.0)
classSelect = if not externalClass.oclIsUndefined() then externalClass else owlClass endif
The constraint block that is used to allow the selection of either a ExternalClass or ExternalOwlClass. The constraint block is typically used within a template that supports the use of OWL or Codes to represent classes

No example data sets have been provided for this Template.

Issue reporting