Template: OASIS:Document

This section specifies the template Document.

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

The specification comprises the following sections:

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

The Document template describes how to represent a document. It covers the minimum requirements to represent a Document DocumentVersion and DocumentDefinition or its specialization DigitalDocumentDefinition.

NOTE    In previous editions of PLCS DEXlib organization that do not version documents were recommended to set the identification of the DocumentVersion to "/NULL", i.e. the attribute identifier of entity Identification contains the string "/NULL" to indicate that no version information is relevant or intended. The current recommendation is to provide no versionId. This will result a single un-identified DocumentVersion being produced if a DocumentVersion is required, i.e. when a DocumentDefinition is created.

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

Figure 1 -  Document model

No templates have been explicitly defined as being related to the Document template.

NOTE    The Document 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 PSM 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 constraints shown on the template's SysML Block are described in the template constraints section.

Figure 2 -  Template block definition diagram for Document

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

References:
files [0..*] (Block: Ap239Ap233Psm:DigitalFile)
The content of a digital document.
hardcopies [0..*] (Block: Ap239Ap233Psm:Hardcopy)
The content of a physical document.
Parts:
ids [1..*] (Template: OASIS:Identification)
The collection of identifiers of the document. There shall be at least one identifier that is the document number. Hence there shall be at least one identifier classified to be a "Document_identification_code" or a sub-class of "Document_identification_code".
The reference data used in Template: OASIS:Identification is restricted as follows:
RDL constraint 1:
There must be one identifier that is the document number.
The reference data for:
OASIS:Identification.role -> ExternalOwlClass.class
is restricted to the following class or a subclass:
descriptions [0..*] (Template: OASIS:Descriptor)
The descriptions of the document.
versionId [0..1] (Template: OASIS:Identification)
The identifier of the document version.
NOTE    If no versionId is specified a unique, unidentified DocumentVersion is created.
The reference data used in Template: OASIS:Identification is restricted as follows:
RDL constraint 1:
The identifier must be a version identifier.
The reference data for:
OASIS:Identification.role -> ExternalOwlClass.class
is restricted to the following class or a subclass:
classifiedAs [0..*] (Template: OASIS:Classifier)
The classification of the document.
The reference data used in Template: OASIS:Classifier is restricted as follows:
RDL constraint 1:
The reference data for:
OASIS:Classifier.class -> ExternalOwlClass.class
is restricted to classes that are subclasses of the following class:

The following output ports are defined for this template:

document (Block: Ap239Ap233Psm:Document)
Enables the Block: Ap239Ap233Psm:Document instantiated by this template to be referenced when the template is used.
version (Block: Ap239Ap233Psm:DocumentVersion)
Enables the Block: Ap239Ap233Psm:DocumentVersion instantiated by this template to be referenced when the template is used.
definition (Block: Ap239Ap233Psm:DocumentDefinition)
Enables the Block: Ap239Ap233Psm:DocumentDefinition instantiated by this template to be referenced when the template is used.

The following constraints are defined for this template:

Constraint: filesAndHardcopiesRequireContext
Specification: (OCL2.0)
not (viewDefinitionContext->isEmpty() and not (files->isEmpty() and hardcopies->isEmpty()))
if either files or hardcopies is set then viewDefinitionContext must set also.
Constraint: noFilesAndHardcopies
Specification: (OCL2.0)
files->isEmpty() or hardcopies->isEmpty()
the properties files and hardcopies cannot be both set.

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

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 the Parametric Diagram.

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

Figure 3 -  Parametric diagram for Document

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:document [1] (Block: Ap239Ap233Psm:Document)
Private Part Property:documentVersion [0..1] (Block: Ap239Ap233Psm:DocumentVersion)
Private Part Property:generalDefinition [0..1] (Block: Ap239Ap233Psm:DocumentDefinition)
Private Part Property:digitaDefinition [0..1] (Block: Ap239Ap233Psm:DigitalDocumentDefinition)
Private Part Property:physicalDefinition [0..1] (Block: Ap239Ap233Psm:PhysicalDocumentDefinition)
Private Part Property:selectDefinition [1] ( Constraint Block: OASIS:Document:DocumentDefinitionSelector)

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 Document

The following instances have been created:

classDocumentIdentificationCode instance of Block: Ap239Ap233Psm:ExternalOwlClass.

This or a sub-class of this must be used for at least one of the ids.

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 Document

The following constraint blocks have been created:

Constraint: DocumentDefinitionSelector
Specification: (OCL2.0)
if digital->notEmpty() then assigned = digital else if physical->notEmpty() then assigned = physical else assigned = general
sets the assigned DocumentDefinition to which ever of the input parameters is present.

No example data sets have been provided for this DEX.