From ece55269aeaba8d3fa282617951ff0230d02a694 Mon Sep 17 00:00:00 2001 From: Dragos0000 Date: Tue, 17 May 2022 20:05:41 +0100 Subject: [PATCH 1/2] model glossary --- src/html-model-glossary.xsl | 65 +++++ src/html-model-glossary/fragments/footer.xsl | 66 +++++ src/html-model-glossary/fragments/header.xsl | 45 ++++ src/html-model-glossary/glossary.xsl | 255 +++++++++++++++++++ 4 files changed, 431 insertions(+) create mode 100644 src/html-model-glossary.xsl create mode 100644 src/html-model-glossary/fragments/footer.xsl create mode 100644 src/html-model-glossary/fragments/header.xsl create mode 100644 src/html-model-glossary/glossary.xsl diff --git a/src/html-model-glossary.xsl b/src/html-model-glossary.xsl new file mode 100644 index 00000000..3db53bfa --- /dev/null +++ b/src/html-model-glossary.xsl @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + +
+
+
+

+ Table of contents +

+
+
+
+ +
+
+ + +
+ +
+ +

Wrong model version detected.

+
+

Please make sure that the XMI file uses XMI version 2.5.1 and UML version 2.5.1.

+

The namespaces to check:

+
    +
  • xmi="http://www.omg.org/spec/XMI/20131001"
  • +
  • uml="http://www.omg.org/spec/UML/20131001"
  • +
+
+
+
+ +
+
+ + diff --git a/src/html-model-glossary/fragments/footer.xsl b/src/html-model-glossary/fragments/footer.xsl new file mode 100644 index 00000000..25479545 --- /dev/null +++ b/src/html-model-glossary/fragments/footer.xsl @@ -0,0 +1,66 @@ + + + + + Created on: May 17, 2020 + Author: Dragos + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/html-model-glossary/fragments/header.xsl b/src/html-model-glossary/fragments/header.xsl new file mode 100644 index 00000000..ff6ff12b --- /dev/null +++ b/src/html-model-glossary/fragments/header.xsl @@ -0,0 +1,45 @@ + + + + + Created on: May 17, 2022 + Author: Dragos + + + + + + + + + + + + + + + + + + + + + + Model glossary + + + + \ No newline at end of file diff --git a/src/html-model-glossary/glossary.xsl b/src/html-model-glossary/glossary.xsl new file mode 100644 index 00000000..1330d66a --- /dev/null +++ b/src/html-model-glossary/glossary.xsl @@ -0,0 +1,255 @@ + + + + + + + + + +

Model glossary

+

Class names and definitions

+ + + + + + + + + + +
Class nameDescription
+ +

DataType properties and definitions

+ + + + + + + + + + + + +
Attribute nameDescriptionDomain class nameRange data type
+ +

Object properties and definitions

+ + + + + + + + + + + +
Connector nameDescriptionDomain and Range classes
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ +
\ No newline at end of file From a55769058a934f8bdf5e724e5f8d7f739f86b8ab Mon Sep 17 00:00:00 2001 From: Dragos0000 Date: Wed, 18 May 2022 18:05:19 +0100 Subject: [PATCH 2/2] refactored and added extra config parameter --- config/ePO-default/config-parameters.xsl | 1 + src/common/utils.xsl | 71 +++++++++++++++++- src/html-model-glossary/fragments/footer.xsl | 2 +- src/html-model-glossary/glossary.xsl | 77 ++++++++++++++++---- 4 files changed, 131 insertions(+), 20 deletions(-) diff --git a/config/ePO-default/config-parameters.xsl b/config/ePO-default/config-parameters.xsl index 86bbd524..354490f4 100644 --- a/config/ePO-default/config-parameters.xsl +++ b/config/ePO-default/config-parameters.xsl @@ -103,5 +103,6 @@ eProcurement extended ontology This module provides the inference-related definitions for the eProcurement ontology. + \ No newline at end of file diff --git a/src/common/utils.xsl b/src/common/utils.xsl index 11bfd83d..e5ca5783 100644 --- a/src/common/utils.xsl +++ b/src/common/utils.xsl @@ -220,7 +220,8 @@ xs:anyURI(fn:concat(fn:namespace-uri-from-QName($qname), fn:local-name-from-QName($qname))) else xs:anyURI(fn:concat(fn:namespace-uri-from-QName($qname), $defaultDelimiter, fn:local-name-from-QName($qname))) - "/> + " + /> @@ -269,7 +270,7 @@ $localName "/> @@ -301,7 +302,8 @@ else concat($defaultNamespacePrefix, ':', $elementName)"/> - + @@ -435,7 +437,7 @@ $attributeMultiplicityValue" /> - + Check if connector target and source are in the model @@ -454,4 +456,65 @@ /> + + Check if the connector is used to or from external classes + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/html-model-glossary/fragments/footer.xsl b/src/html-model-glossary/fragments/footer.xsl index 25479545..bb6c75dc 100644 --- a/src/html-model-glossary/fragments/footer.xsl +++ b/src/html-model-glossary/fragments/footer.xsl @@ -53,7 +53,7 @@ $("table.display").DataTable({ buttons: [], - "lengthMenu": [[-1], [30, "All"]], + "lengthMenu": [[-1], ["All"]], responsive: { details: true } diff --git a/src/html-model-glossary/glossary.xsl b/src/html-model-glossary/glossary.xsl index 1330d66a..eebd6dcd 100644 --- a/src/html-model-glossary/glossary.xsl +++ b/src/html-model-glossary/glossary.xsl @@ -15,11 +15,12 @@ + -

Model glossary

+

Glossary

Class names and definitions

@@ -75,7 +76,7 @@ @@ -113,7 +114,13 @@ @@ -172,6 +181,7 @@ + @@ -184,27 +194,54 @@ @@ -222,13 +259,19 @@ if (f:getElementByIdRef($connectorsWithSameName/target/@xmi:idref, $root)/@name) then f:getElementByIdRef($connectorsWithSameName/target/@xmi:idref, $root)/@name else - $connectorsWithSameName/target/model/@name"/> + if ($reference-to-external-classes-in-glossary) then + fn:concat($connectorsWithSameName/target/model/@name, ' (external)') + else + ()"/> + if ($reference-to-external-classes-in-glossary) then + fn:concat($connectorsWithSameName/source/model/@name, ' (external)') + else + ()"/>
- +
- + + @@ -136,7 +143,7 @@ - + @@ -154,17 +161,19 @@ - - + + +
+
+ select=" + if (f:getElementByIdRef(./target/@xmi:idref, $root)/@name) then + f:getElementByIdRef(./target/@xmi:idref, $root)/@name + else + if ($reference-to-external-classes-in-glossary) then + fn:concat(./target/model/@name, ' (external)') + else + ()"/> + select=" + if (f:getElementByIdRef(./source/@xmi:idref, $root)/@name) then + f:getElementByIdRef(./source/@xmi:idref, $root)/@name + else + if ($reference-to-external-classes-in-glossary) then + fn:concat(./source/model/@name, ' (external)') + else + ()"/> + select=" + if ($sourceClass and $targetClass) then + fn:concat($sourceClass, ' -> ', $targetClass, ' [', $targetMultiplicity, ']') + else + ()" + />
+ select=" + if ($sourceClass and $targetClass) then + fn:concat($sourceClass, ' [,', $sourceMultiplicity, ']', ' <- ', $targetClass) + else + ()" + />
@@ -213,7 +250,7 @@