Data Model Generation: Difference between revisions

From PHENOM Portal Knowledgebase
Jump to navigation Jump to search
Nathalie (talk | contribs)
Nathalie (talk | contribs)
 
(10 intermediate revisions by 4 users not shown)
Line 2: Line 2:


== Filter ==
== Filter ==
The first drop down in the page allows the user to filter the model and the Nav Tree to only what is relevant for generation.
The first drop down in the page allows the user to filter the nodes in the model and the Nav Tree to only that will be used for generation.
* None: no filter is applied
* None: no filter is applied
* Services: only display the services in the Nav Tree and only services will be exported (along with any elements necessary to export a valid model)
* Services: only display the services in the Nav Tree and only services will be exported (along with any elements necessary to export a valid model)
Line 12: Line 12:


=== FACE (.face) ===
=== FACE (.face) ===
This type exports a data model in FACE XMI format aligned with the FACE Technical Standard. The user has to choose which version of FACE to export the data model as: 3.1, 3.0, or 2.1. "2.1 obfuscated" exports the model as a 2.1 FACE files and obfuscate the node's names (mainly used for debug purposes).
This type exports a data model in FACE XMI format aligned with the FACE Technical Standard. The user has to choose which version of FACE to export the data model as. There is also the option of selecting additional export options via the checkboxes below export type and FACE version.


[[File:Phenom-generate-data model face.png|800px|border]]
[[File:Datamodel - Face.png|border|800x800px]]


=== Diagrams (.zip) ===
Phenom's representation of data models is not a one-to-one match with the FACE format. Instead, upon the generation of a FACE file, the Phenom representation of the model is converted to FACE. The most prominent changes include the generation of LDM and PDM entity models and conversion of view nodes to queries and templates.
This option exports all the user-created diagrams and/or view traces as PGN files in a ZIP archive.


[[File:Phenom-generate-data model diagrams.png|800px|border]]
==== Generated Entity Model Content ====
Phenom does not handle LDM and PDM entity model content - only CDM entities and associations (elements) are represented. Upon conversion to a FACE model, logical and platform elements are generated if they are projected by view fields in the Phenom model. Compositions and participants (attributes) that have a type that references another element generate LDM and PDM attributes referencing corresponding LDM and PDM elements. Compositions that reference an observable as their type are generate logical and platform compositions referencing measurements and platform types used by the view fields projecting the conceptual composition. In cases where a single conceptual attribute is generated into several logical and/or platform attributes (because of the projection of that conceptual attributes by view fields using different measurements and/or platform types), in order to prevent name conflicts, the rolenames of the generated attributes are augmented with the names of the measurements and platform types to which they relate.


=== IDL (.idl) ===
==== Generated Queries and Templates ====
This option exports the data model in Interface Description Language (IDL) format.
Phenom represents interface documentation as views with fields that have projection paths through the conceptual entity model and reference a measurement and a platform type. Each view is converted to a template (platform template for FACE 3.0 and uop template for FACE 3.1/3.2) and a related platform query.


=== Skayl (.skayl) ===
The specification of the generated query is written to capture the combination of projections through the entity model expressed in the projection paths documented on the fields of the converted view (and any views that are contained as the top-view's sub-structures). While the view field projection paths documented in Phenom traverse the conceptual entity model, the query is written traversing the platform entity model that was generated as part of the conversion to FACE.
This option exports the data model in Skayl's Proprietary Format. This format is similar to FACE XMI, but it preserves all non-standardized content, including integration model content.


=== User Template ===
The specification of the generated template is written to reference the related query and represent the structure of the Phenom view being converted. View fields that references other views as their type result in either the addition of a `using` statement to the template specification or the expression of a sub-structure within the template specification; which is used is based on the 'Private Nesting' setting on the view field in Phenom.
This option exports the data model using user templates. These templates can be edited in the [[Templates]] menu.


[[File:Phenom-generate-data model user template.png|800px|border]]
==== Retention Artifact Recovery ====
Normally, Phenom will generate content necessary for the FACE model format during FACE model generation as described above. However, it is also possible to use content from the original model by using import artifact recovery during generation.


During model file import, a user has the option to retain certain model elements (including LDM and PDM entity model content and query and template nodes) that are not handled by Phenom. If this is done, then during FACE model export the user can attempt to recover the retained content. Doing this will result in the addition of the content originally retained into the model and the favoring of re-use of re-introduced content over the generation of new content. For example, if logical and platform entities and compositions needed to project a given view field are recovered from the retention artifact, that recovered content will be traversed by the platform query and new LDM/PDM elements will not be generated. Similarly a retained query name and id can be re-used when a view is converted instead of a new query being generated; even the specification of the query will be re-used if it is detected that the view has not been changed since the original import.


Enumeration behavior
==== Generated Node GUID Values ====
Phenom manages the relationships between Platform Enumerations, their Platform Enumeration Literals, and the Labels traced through the Measurement realized by the Platform Enumeration. Using the PDM Type Editor, a user can manage these relationships in Phenom:
In order to achieve repeatable results, when new content is generated during FACE conversion, the xmi:id values of the generated content is derived based on related properties.
{| class="wikitable"
|+
!Generated Node
!Reason For Generation
!Derived GUID Determiners
|-
|Identifier Composition
|A conceptual level element missing a composition of type Identifier or a specializing element that lacks a novel attribute.
| - id value of the affected element
- name of the added composition.
|-
|Realizing Entity Model Node
|An entity model element or attribute being generated to the LDM or PDM level because it is projected by a view field and thus will be traversed by a logical or platform level query specification.
| - name/rolename
- bounds (for attributes)
- id of referenced type (for attributes)
- id of the realized node
- abstraction level
|-
|Empty Element Filler Composition
|A composition added to an empty platform level element to ensure that it has at least one attribute. (The presence of an empty element can be caused by certain types of projection traversals.)
| - id value of the filled element
- id of realized node
- id of type of created node
|-
|Composite Query
|A composite query is generated when the projection paths of the fields of a view cannot be expressed in a single query. Instead multiple queries are generated and combined in a composite query.
| - id of the view causing the generation
- the abstraction level of the generated composite query
|-
|Query Composition
|A composition of a generated composite query (above).
| - id of the view causing the generation
- the abstraction level of the generated composite query
- the index of the composition within the composite query
|-
|Query
|A query generated to represent the entity model traversals of a given view's fields' projection paths.
| - id of the view being represented
- the abstraction level of the generated query
- the index of the query (in cases when the view generates multiple queries to be combine in a composite)
|-
|Template
|Most templates get the xmi:id value of the view which generates them. However, when a view cannot be represented by a single query because of the heterogeneity of field projection paths, multiple templates are generated to related to each of the generated queries. The multiple templates will then be combined into a composite template. In this case, the composite template will receive the xmi:id value of the view and the templates it composes will get generated xmi:id values.
| - id of the view being represented
- the index of the template within the composite template
|-
|Template Composition
|The composition within a composite template pointing to the composed templates generated for reasons described above.
| - rolename of the composition element
- id of the template being composed
- id of the composite template
|-
|Participant Path Node
|Representation in the FACE format of participant path projections.
| - id of the participant node
- id of the attribute being traversed by the path node
- the index of the path node in the path
|-
|Duplicate Measurement System
|If measurement is found which has a different number of axes then the measurement system it references, a new measurement system will be created that is a copy of the original but with changes to which axes it combines.
| - id of original measurement system
|-
|Duplicate Reference Point
|A reference point element created to fill a duplicate measurement system.
| - id of original reference point
|-
|Duplicate Reference Point Part
|A reference point part created to fill a duplicate reference point.
| - id of original reference point part
|-
|Duplicate Coordinate System
|A coordinate system made to support a duplicate measurement system.
| - id of original coordinate system
|}


Platform Type/Enumeration editing
=== Diagrams (.png / .zip) ===
This option exports all the user-created diagrams and/or view traces as PGN files or in a ZIP archive if multiple are selected. Allows for the preview of diagram images with the preview and regenerate buttons.


Depending on how Platform Enumerations are managed by the modeler, Phenom will shape the project content on FACE export to reflect the status of each Enumeration. There are 3 groups of behavior for model export:
[[File:Datamodel - Diagrams.png|border|800x800px]]


Matching: The Enumeration has been configured such that all Platform Enumeration Literals have a realizes relationship to a Label of the same name, and there is a Literal for every traced Label. No changes will be made to the export.
=== IDL (.idl) ===
This option exports the data model in Interface Description Language (IDL) format.


Subset: The Enumeration has been configured similarly to the matching case, however instead the Platform Enumeration Literals subset the traced Labels. In this case, a separate Measurement/Measurement Axis/Value Type Unit and Constraint are added specifically for this Platform Enumeration. The constraint's allowedValue contains the GUIDs of the previous ValueType's constrained labels.
=== Skayl (.skayl) ===
This option exports the data model in Skayl's Proprietary Format. This format is similar to FACE XMI, but it preserves all non-standardized content, including integration model content.


Missing-realize/Mismatched: The Enumeration either doesn't perfectly realize matching Literals→Labels, or has differences/duplicates in the naming used. In these cases, new LDM content is generated just like the Subset case; however, to preserve the context of the Platform Enumeration's Literals, a new ValueType is also generated, with Labels matching the names of the Platform Enumeration.
=== User Template ===
This option exports the data model using user templates. These templates can be edited in the [[Templates]] tab.


To manage Enumerations of the last group, please check the Health Report:
[[File:Phenom-generate-data model user template.png|800px|border]]


Health Check
[[index.php?title=Category:UserGuide|0033_Data_Model_Generation]]

Latest revision as of 11:29, 7 July 2026

PHENOM can generate a number of different data model formats and documentation artifacts from the current project.

Filter

The first drop down in the page allows the user to filter the nodes in the model and the Nav Tree to only that will be used for generation.

  • None: no filter is applied
  • Services: only display the services in the Nav Tree and only services will be exported (along with any elements necessary to export a valid model)
  • Views: only display the views in the Nav Tree and only views will be exported (along with any elements necessary to export a valid model)
  • Tags: the tag filter currently applied in the Nav Tree will be applied to the model upon export (necessary elements to make the model valid will be exported as well)

Generate Models & Artifacts

The user can then choose the type of artifact to generate. Each type of artifacts has its own generation parameters.

FACE (.face)

This type exports a data model in FACE XMI format aligned with the FACE Technical Standard. The user has to choose which version of FACE to export the data model as. There is also the option of selecting additional export options via the checkboxes below export type and FACE version.

Phenom's representation of data models is not a one-to-one match with the FACE format. Instead, upon the generation of a FACE file, the Phenom representation of the model is converted to FACE. The most prominent changes include the generation of LDM and PDM entity models and conversion of view nodes to queries and templates.

Generated Entity Model Content

Phenom does not handle LDM and PDM entity model content - only CDM entities and associations (elements) are represented. Upon conversion to a FACE model, logical and platform elements are generated if they are projected by view fields in the Phenom model. Compositions and participants (attributes) that have a type that references another element generate LDM and PDM attributes referencing corresponding LDM and PDM elements. Compositions that reference an observable as their type are generate logical and platform compositions referencing measurements and platform types used by the view fields projecting the conceptual composition. In cases where a single conceptual attribute is generated into several logical and/or platform attributes (because of the projection of that conceptual attributes by view fields using different measurements and/or platform types), in order to prevent name conflicts, the rolenames of the generated attributes are augmented with the names of the measurements and platform types to which they relate.

Generated Queries and Templates

Phenom represents interface documentation as views with fields that have projection paths through the conceptual entity model and reference a measurement and a platform type. Each view is converted to a template (platform template for FACE 3.0 and uop template for FACE 3.1/3.2) and a related platform query.

The specification of the generated query is written to capture the combination of projections through the entity model expressed in the projection paths documented on the fields of the converted view (and any views that are contained as the top-view's sub-structures). While the view field projection paths documented in Phenom traverse the conceptual entity model, the query is written traversing the platform entity model that was generated as part of the conversion to FACE.

The specification of the generated template is written to reference the related query and represent the structure of the Phenom view being converted. View fields that references other views as their type result in either the addition of a `using` statement to the template specification or the expression of a sub-structure within the template specification; which is used is based on the 'Private Nesting' setting on the view field in Phenom.

Retention Artifact Recovery

Normally, Phenom will generate content necessary for the FACE model format during FACE model generation as described above. However, it is also possible to use content from the original model by using import artifact recovery during generation.

During model file import, a user has the option to retain certain model elements (including LDM and PDM entity model content and query and template nodes) that are not handled by Phenom. If this is done, then during FACE model export the user can attempt to recover the retained content. Doing this will result in the addition of the content originally retained into the model and the favoring of re-use of re-introduced content over the generation of new content. For example, if logical and platform entities and compositions needed to project a given view field are recovered from the retention artifact, that recovered content will be traversed by the platform query and new LDM/PDM elements will not be generated. Similarly a retained query name and id can be re-used when a view is converted instead of a new query being generated; even the specification of the query will be re-used if it is detected that the view has not been changed since the original import.

Generated Node GUID Values

In order to achieve repeatable results, when new content is generated during FACE conversion, the xmi:id values of the generated content is derived based on related properties.

Generated Node Reason For Generation Derived GUID Determiners
Identifier Composition A conceptual level element missing a composition of type Identifier or a specializing element that lacks a novel attribute. - id value of the affected element

- name of the added composition.

Realizing Entity Model Node An entity model element or attribute being generated to the LDM or PDM level because it is projected by a view field and thus will be traversed by a logical or platform level query specification. - name/rolename

- bounds (for attributes) - id of referenced type (for attributes) - id of the realized node - abstraction level

Empty Element Filler Composition A composition added to an empty platform level element to ensure that it has at least one attribute. (The presence of an empty element can be caused by certain types of projection traversals.) - id value of the filled element

- id of realized node - id of type of created node

Composite Query A composite query is generated when the projection paths of the fields of a view cannot be expressed in a single query. Instead multiple queries are generated and combined in a composite query. - id of the view causing the generation

- the abstraction level of the generated composite query

Query Composition A composition of a generated composite query (above). - id of the view causing the generation

- the abstraction level of the generated composite query - the index of the composition within the composite query

Query A query generated to represent the entity model traversals of a given view's fields' projection paths. - id of the view being represented

- the abstraction level of the generated query - the index of the query (in cases when the view generates multiple queries to be combine in a composite)

Template Most templates get the xmi:id value of the view which generates them. However, when a view cannot be represented by a single query because of the heterogeneity of field projection paths, multiple templates are generated to related to each of the generated queries. The multiple templates will then be combined into a composite template. In this case, the composite template will receive the xmi:id value of the view and the templates it composes will get generated xmi:id values. - id of the view being represented

- the index of the template within the composite template

Template Composition The composition within a composite template pointing to the composed templates generated for reasons described above. - rolename of the composition element

- id of the template being composed - id of the composite template

Participant Path Node Representation in the FACE format of participant path projections. - id of the participant node

- id of the attribute being traversed by the path node - the index of the path node in the path

Duplicate Measurement System If measurement is found which has a different number of axes then the measurement system it references, a new measurement system will be created that is a copy of the original but with changes to which axes it combines. - id of original measurement system
Duplicate Reference Point A reference point element created to fill a duplicate measurement system. - id of original reference point
Duplicate Reference Point Part A reference point part created to fill a duplicate reference point. - id of original reference point part
Duplicate Coordinate System A coordinate system made to support a duplicate measurement system. - id of original coordinate system

Diagrams (.png / .zip)

This option exports all the user-created diagrams and/or view traces as PGN files or in a ZIP archive if multiple are selected. Allows for the preview of diagram images with the preview and regenerate buttons.

IDL (.idl)

This option exports the data model in Interface Description Language (IDL) format.

Skayl (.skayl)

This option exports the data model in Skayl's Proprietary Format. This format is similar to FACE XMI, but it preserves all non-standardized content, including integration model content.

User Template

This option exports the data model using user templates. These templates can be edited in the Templates tab.

0033_Data_Model_Generation