Help:- Context developmentindexpreviousnextupdownside index

This section outlines how to develop a Context where a Context is defined as follows:

Definition: Context

A "context" is a domain in which a specialized vocabulary is employed. This may be an individual organization, a larger business community, or a particular project (or initiative). A number of DEXs and Templates are identified within a given Context and each DEX is defined using the specialized vocabulary and terminology.

This section details the stages involved in developing a Context and comprises the following steps:

Choose a suitably descriptive name for the Context to be developed. A Context is typically used for a particular project or exchange scenario under which a number of DEXs can be developed, so give some thought as to whether your Context really is new and unique, or simply an extension of an existing Context.

The files associated with the Context, such as DEXs, reference data and templates developed for the Context, are kept in a directory with the same name as the Context identifier <<context-id>>. An overview of the file structure of PLCSlib can be found at PLCSlib structure

An ANT build script is provided as a tool to create the directory and associated file structure for a new Context

NOTE    This has been developed and tested on the Microsoft Windows operating system. Although it has not been tested on other systems it should work since the utilities used are all platform independent.

In order to use the tool for creating a new Context, first open up a command window (e.g. "cmd" on windows), navigate to the plcslib\utils\xml_templates directory in your PLCSlib installation and then run the command :

ant mk-context

You will be prompted for an Identifier and a Name for the Context to be Created. Take careful note of these as you will need them later in the process as well. The Identifier that you enter for the context will also be used as the value denoted by <<context-id>> in the examples below.

The ANT script will generate the following folder structure for the Context under plcslib\data\contexts\<<context-id>> in your PLCSlib installation.

dexs
to hold the DEXs created in this context
dvlp
to hold the Tool specific SysML seed file for this Context
images
to hold images such as logo's for this context
refdata
to hold the OWL files for context specific reference data
templates
to hold the context specific templates
terminology
to hold the terms.xml file of terms specific to this context

and the context index file which will need to be edited as the content of the Context is created:
plcslib\data\contexts\<<context-name>>\context_index.xml

Once the Context has been created, it will need to be added to the list of Contexts that are part of PLCSlib by adding it to the file:

plcslib\data\contexts\contexts.xml

in your PLCSlib installation. Particular care needs to be taken that the Identifier and Name inserted into the record in this file match those given to the ANT build process in the previous step

Having setup the Context XML, the next stage is to provide some documentation about the Context.
The file:
plcslib\data\contexts\<<context-name>>\context_index.xml
contains all the information about the Context that is to be displayed in the built PLCSlib documentation.

This file should be edited, preferably in an XML Editor (see PLCSlib development Tools : XML Editor). The default file created by the Context creation script contains numerous comments that are designed to aid the user in creating the documentation.

Also within this file, and commented accordingly, are the lists of DEXs, templates, reference data and model usage guides that are specified within this Context. Currently these lists are hand edited, so it is important that as new content is created for the Context, that it is recorded in the relevant list in this file.

The specifications for the DEXs and Templates defined within a Context are all done using SysML. It is necessary to set up the SysML environment for the Context in order to ensure that all DEXs and Templates created within that Context have a consistent structure and set of identifiers and global identifiers.
This is done by creating a "seed" SysML project for the Context, which is known as the "index" file. It sets out the SysML package structure and the identifiers for the Templates and DEXs. This structure and identifiers are then used in the subsequent SysML documentation of the templates.

Failure to manage the "index" file will result in a template having inconsistent identifiers in the SysML leading to corrupt models.

The following links provide detailed information on how to develop and update the context index using specific tools:

Issue reporting