Skip to content

Commit

Permalink
added extra check for connectors generation in conventions report and…
Browse files Browse the repository at this point in the history
… updated readme
  • Loading branch information
Dragos0000 committed Oct 10, 2024
1 parent ca63046 commit d88a818
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,33 @@ already work with having one config folder with all config files.
* If the variable is a list, and you don't need any values just leave an empty list
``<xsl:variable name="stereotypeValidOnAssociations" select="()"/>``

**Example for controlling the generation of reused concepts in artefacts with the config parameters
variables**

The following variables determine the inclusion or exclusion of reused concepts within each artifact:
```shell
<!-- Controls whether reused concepts are generated in SHACL artefact -->
<xsl:variable name="generateReusedConceptsSHACL" select="fn:true()"/>

<!-- Controls whether reused concepts are generated in OWL core artefact -->
<xsl:variable name="generateReusedConceptsOWLcore" select="fn:false()"/>

<!-- Controls whether reused concepts are generated in OWL restrictions artefact -->
<xsl:variable name="generateReusedConceptsOWLrestrictions" select="fn:false()"/>

<!-- Controls whether reused concepts are generated in the glossary -->
<xsl:variable name="generateReusedConceptsGlossary" select="fn:true()"/>
```

Explanation

* generateReusedConceptsSHACL: Set to true, reused concepts will be included in SHACL artefact.
* generateReusedConceptsOWLcore: Set to false, reused concepts will be excluded from OWL core artefact.
* generateReusedConceptsOWLrestrictions: Set to false, reused concepts will be excluded from OWL restrictions artefact.
* generateReusedConceptsGlossary: Set to true, reused concepts will be included in the glossary.

By adjusting these variables, it is possible to customize whether specific artefacts contain reused concepts,
providing fine control over the content of each output.

#### Namespaces configuration
In the namespaces.xml file you can add the namespaces that you use in UML model and also can control which of them should
Expand Down
3 changes: 2 additions & 1 deletion src/html-conventions-lib/association-html-conventions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

<xsl:template match="connector[./properties/@ea_type = 'Association']">
<xsl:variable name="associationChecks" as="item()*">
<xsl:if test="f:checkIfConnectorTargetAndSourceElementsExists(.)">
<!-- Start of common connectors checkers rules -->
<xsl:call-template name="connectorNamingFormat">
<xsl:with-param name="connector" select="."/>
Expand Down Expand Up @@ -122,7 +123,7 @@
<xsl:with-param name="isDependency" select="fn:false()"/>
</xsl:call-template>
<!-- End of specific checker rules-->

</xsl:if>
</xsl:variable>
<xsl:if test="boolean($associationChecks)">
<xsl:choose>
Expand Down
2 changes: 2 additions & 0 deletions src/html-conventions-lib/dependency-html-conventions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

<xsl:template match="connector[./properties/@ea_type = 'Dependency']">
<xsl:variable name="dependencyChecks" as="item()*">
<xsl:if test="f:checkIfConnectorTargetAndSourceElementsExists(.)">
<!-- Start of common connectors checkers rules -->
<xsl:call-template name="connectorNamingFormat">
<xsl:with-param name="connector" select="."/>
Expand Down Expand Up @@ -110,6 +111,7 @@
<xsl:with-param name="connector" select="."/>
<xsl:with-param name="isDependency" select="fn:true()"/>
</xsl:call-template>
</xsl:if>
<!-- End of specific checker rules-->

</xsl:variable>
Expand Down
4 changes: 2 additions & 2 deletions src/html-conventions-lib/generalization-html-conventions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<xsl:template match="connector[./properties/@ea_type = 'Generalization']">
<xsl:variable name="generalizationChecks" as="item()*">

<xsl:if test="f:checkIfConnectorTargetAndSourceElementsExists(.)">
<xsl:call-template name="generalizationClassWithSingleChild">
<xsl:with-param name="generalizationConnector" select="."/>
</xsl:call-template>
Expand All @@ -48,7 +48,7 @@
<xsl:call-template name="generalizationSourceTargetTypes">
<xsl:with-param name="generalizationConnector" select="."/>
</xsl:call-template>

</xsl:if>
</xsl:variable>
<xsl:if test="boolean($generalizationChecks)">
<xsl:choose>
Expand Down

0 comments on commit d88a818

Please sign in to comment.