Public Model or PModel file is an XML file with the extension .pmodel. The PModel file allows you to programmatically create and modify AB Suite model elements. The contents of a PModel file are in clear text format that helps you to easily read and modify the PModel file either manually or through external tools.
Licensing of PModel File
You have to obtain a valid AB Suite 7.0 PModel license to use the PModel feature. Please contact your Unisys account manager to obtain the license to use the PModel feature.
Structure of PModel File
The structure of a PModel file is defined using the XSD schema file. The XSD schema file is part of the PModel feature. You can find the XSD schema file at, ABSuiteInstallationDirectory\PublicInterchangeFile.
The XSD schema file defines the rules for a MODEL element, as shown in the following code snippet:
<xs:element name="MODEL"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="OBJECT" /> <xs:element ref="FOLDER" /> <xs:element ref="LOCATION" /> </xs:choice> <xs:attributeGroup ref="attributesCommon" /> <xs:attribute name="Visibility" type="typeVisibility" use="required" /> <xs:attribute name="Author" type="xs:string" /> <xs:attribute name="VersionFile" type="xs:string" /> <xs:attribute name="Sok" type="xs:string" /> <xs:attribute name="Eok" type="xs:string" /> <xs:attribute name="IsAccessControlled" type="typeBoolean" /> <xs:attribute name="PrimaryPresentationType" type="typePresentationFormat" /> </xs:complexType>
As shown in the code snippet,
Only OBJECT, FOLDER, and LOCATION elements can be child elements of the MODEL element.
Visibility, Author, VersionFile, Sok, Eok, IsAccessControlled, PrimaryPresentationType, and attributes defined in attributesCommon (it is defined in other part of the XSD) can appear in attribute list of MODEL element.
Attributes such as IsAccessControlled type=typeBoolean (defined in other part of the XSD), means that the value must be of type Boolean, that is, true or false.
The XSD file is generated from the rules defined for AB Suite model elements. It ensures that the modified PModel files comply with the rules defined by AB Suite. You cannot import a PModel file if it does not comply with the XSD code.
In PModel files, elements are identified with an Id attribute whose value is a GUID. Elements in a PModel file are hierarchically structured as per the ownership hierarchy. This hierarchical structure is similar to the class view structure.
The following is a code snippet of a .pmodel file that is exported from an AB Suite model:
<DICTIONARY Id="<Name_GUID>" Name="Screens" Owner="<Owner_GUID>" Description="Chocsys Dictionary" Author="Unisys" IsUnique="No"> </DICTIONARY>
Note: In the above example the <Name_GUID> has to be replaced by the GUID in the exported PModel file from your application.
The following table lists some attributes that are common for most elements in PModel:
Attributes | Type | Description |
---|---|---|
Id | typeID | GUID of an element in model database. |
Inherits | typeID | States which element to instantiate or extend. |
Owner | typeID | Id of an element that owns this element. |
Name | xs:string | Name of an element. |
VersionFile | xs:string | Location of the version control file where an element is stored. |
Description | xs:string | Description of an element. |
Author | xs:string | Name of the author who created the element. |
See “PModel Nodes” for more information on the various nodes in a PModel.