Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverted extra check for connectors in convention report #224

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
155 changes: 155 additions & 0 deletions docs/config-files/config-parameters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Configuration File Documentation

This document provides an explanation for the variables in the configuration file, detailing their purpose and data types.

---

## Variables and Their Descriptions

### 1. `namespacePrefixes`
- **Type:** String
- **Description:** A reference to an XML document containing prefix-baseURI definitions.
- **Note:** Don't change this

### 2. `umlDataTypesMapping`
- **Type:** String
- **Description:** A reference to an XML document mapping UML atomic types to XSD data types.
- **Note:** Don't change this

### 3. `xsdAndRdfDataTypes`
- **Type:** String
- **Description:** A reference to an XML document listing XSD data types compliant with OWL2 requirements.
- **Note:** Don't change this

### 4. `defaultNamespaceInterpretation`
- **Type:** Boolean
- **Description:** set default namespace interpretation for lexical Qnames that are not `prefix:localSegment` or `:localSegment`. If this
is set to true `localSegment` will be transformed to `:localSegment`

### 5. `base-ontology-uri`
- **Type:** String
- **Description:** The base URI for the ontology. Should not include a trailing delimiter.

### 6. `base-shape-uri`
- **Type:** String
- **Description:** The base URI for SHACL shapes.

### 7. `base-restriction-uri`
- **Type:** String
- **Description:** The base URI for restrictions, derived from `base-ontology-uri`.

### 8. `shapeArtefactURI`
- **Type:** String
- **Description:** Constructs the URI for shape artefacts using base shape URI, delimiter, and module reference.

### 9. `restrictionsArtefactURI`
- **Type:** String
- **Description:** Constructs the URI for restrictions artefacts using base restriction URI, delimiter, and module reference.

### 10. `coreArtefactURI`
- **Type:** String
- **Description:** Constructs the URI for the core ontology artefact.

### 11. `defaultDelimiter`
- **Type:** String
- **Description:** Default delimiter for namespaces when missing in base URI (e.g., `#`).

### 12. `acceptableTypesForObjectProperties`
- **Type:** List
- **Description:** Specifies element types eligible for object property generation.

### 13. `controlledListType`
- **Type:** String
- **Description:** Defines the type of attributes that use controlled vocabularies.

### 14. Stereotype Validation Variables
- **Type:** List
- **Description:** Define acceptable stereotypes for various elements:
- `stereotypeValidOnAttributes`
- `stereotypeValidOnObjects`
- `stereotypeValidOnGeneralisations`
- `stereotypeValidOnAssociations`
- `stereotypeValidOnDependencies`
- `stereotypeValidOnClasses`
- `stereotypeValidOnDatatypes`
- `stereotypeValidOnEnumerations`
- `stereotypeValidOnPackages`

### 15. `abstractClassesStereotypes`
- **Type:** List
- **Description:** Stereotypes considered valid for abstract classes.

### 16. Enumeration generation variables
- **Type:** Boolean
- **Description:** Control the transformation of enumerations and enumeration items:
- `enableGenerationOfSkosConcept`
- `enableGenerationOfConceptSchemes`

### 17. `allowedStrings`
- **Type:** String (Regex Pattern)
- **Description:** Defines valid characters for a normalised string.

### 18. `internalModelPrefixesList`
- **Type:** List
- **Description:** Specifies prefixes that should be considered internal to the model and not reused.

### 19. Filter reused concepts variables
- **Type:** Boolean
- **Description:** Controls reused concept generation for various artefacts:
- `generateReusedConceptsSHACL`
- `generateReusedConceptsOWLcore`
- `generateReusedConceptsOWLrestrictions`
- `generateReusedConceptsGlossary`

### 20. `generateObjectsAndRealisations`
- **Type:** Boolean
- **Description:** Controls the generation of objects and realisations.

### 21. Convention Report Variables
- **Type:** String
- **Description:** Define metadata for convention reports:
- `conventionReportCopyrightText`
- `conventionReportAuthor`
- `conventionReportAuthorLocation`
- `conventionReportAuthorWebsite`
- `conventionReportUMLModelName`

### 22. Ontology Metadata Variables
- **Type:** String
- **Description:** Metadata for ontology modules, including titles, descriptions, labels, and publication details:
- `ontologyTitleCore`
- `ontologyDescriptionCore`
- `ontologyLabelCore`
- `ontologyTitleRestrictions`
- `ontologyDescriptionRestrictions`
- `ontologyLabelRestrictions`
- `ontologyTitleShapes`
- `ontologyDescriptionShapes`
- `ontologyLabelShapes`

- **Type:** List
- **Description:** Links to additional resources.
- `seeAlsoResources`

- **Type:** String
- **Description:** Automatically generated date fields:
- `issuedDate`
- `createdDate`

- **Type:** String
- **Description:** Manage versioning and compatibility:
- `incompatibleWith`
- `versionInfo`
- `priorVersion`
-
- **Type:** String
- **Description:** Define namespace preferences and license information:
- `preferredNamespaceUri`
- `preferredNamespacePrefix`
- `licenseLiteral`

- **Type:** String
- **Description:** The publisher's URI.
- `publisher`

---
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
Loading
Loading