aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIgor Dysko <igor1.dysko@orange.com>2021-02-03 16:57:59 +0100
committerIgor Dysko <igor1.dysko@orange.com>2021-02-03 16:57:59 +0100
commitea00a3c641dccea2942b215019c3e9ee2b9e17fe (patch)
tree700f0364748327ffc69e508ed726573e1bc37ac4 /src
parentf4ab78b0d9748809e4279aebff27f7f7713188e8 (diff)
Special characters in XMI file, small layout changes in navigation bar
Added support for special characters in XMI file. Spaces in navigation bar were narrowed. Issue-ID: AAI-2441 Signed-off-by: Igor Dysko <igor1.dysko@orange.com> Change-Id: Icd0c6d398beb71b7e8a367d301a40dd6c1105e0f
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/aai/graphgraph/ModelExporter.java2
-rw-r--r--src/main/resources/model_export.vm2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/onap/aai/graphgraph/ModelExporter.java b/src/main/java/org/onap/aai/graphgraph/ModelExporter.java
index 474e7de..6064665 100644
--- a/src/main/java/org/onap/aai/graphgraph/ModelExporter.java
+++ b/src/main/java/org/onap/aai/graphgraph/ModelExporter.java
@@ -40,6 +40,7 @@ import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.runtime.RuntimeConstants;
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
+import org.apache.velocity.tools.generic.EscapeTool;
import org.eclipse.jetty.util.StringUtil;
import org.onap.aai.edges.EdgeRule;
import org.onap.aai.edges.enums.DirectionNotation;
@@ -140,6 +141,7 @@ public class ModelExporter {
updateEntities(entityList, associationsList, allObjects);
context.put("entityList", entityList);
context.put("associationList", associationsList);
+ context.put("esc", new EscapeTool());
return context;
}
diff --git a/src/main/resources/model_export.vm b/src/main/resources/model_export.vm
index ae92fab..a8992c2 100644
--- a/src/main/resources/model_export.vm
+++ b/src/main/resources/model_export.vm
@@ -51,7 +51,7 @@
#foreach($entity in $entityList)
<packagedElement xmi:type="uml:Class" xmi:id="$entity.id" name="$entity.name">
<ownedComment xmi:type="uml:Comment" xmi:id="$entity.randomId" annotatedElement="$entity.id">
- <body>$entity.description</body>
+ <body>$esc.xml($entity.description)</body>
</ownedComment>
#foreach($association in $entity.neighbours)
#if( $association.isComposition)