From 475a9eb8f6cb2caf759c2a8b77859f7b6a63e757 Mon Sep 17 00:00:00 2001 From: Bao Ngan Date: Wed, 21 Jun 2017 10:07:57 +0200 Subject: [PATCH 1/2] add typemappings in OpcXmlDaConnectionFactoryElementSerializer --- .../systems/neoscada/generator/lib/Configuration.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/com.ibh.systems.neoscada.generator.lib/src/main/java/com/ibh/systems/neoscada/generator/lib/Configuration.java b/com.ibh.systems.neoscada.generator.lib/src/main/java/com/ibh/systems/neoscada/generator/lib/Configuration.java index 8a294fe..c1184be 100644 --- a/com.ibh.systems.neoscada.generator.lib/src/main/java/com/ibh/systems/neoscada/generator/lib/Configuration.java +++ b/com.ibh.systems.neoscada.generator.lib/src/main/java/com/ibh/systems/neoscada/generator/lib/Configuration.java @@ -260,6 +260,15 @@ public JsonElement serialize ( final OpcXmlDaConnectionFactoryElement src, final object.addProperty ( "timeout", "" + src.getTimeOut () ); object.addProperty ( "wsdlUrl", "" + src.getWsdlUrl () ); + + if ( !src.getTypeMappings ().isEmpty () ) + { + for ( final Entry type : src.getTypeMappings ().entrySet () ) + { + object.addProperty ( "itemType." + type.getKey (), "" + type.getValue () ); + } + } + return object; } } From 592b3bd76963f436b4ddd88de32e2abe33ba1857 Mon Sep 17 00:00:00 2001 From: Juergen Rose Date: Fri, 23 Jun 2017 16:29:45 +0200 Subject: [PATCH 2/2] make handler priority string as well --- .../com/ibh/systems/neoscada/generator/lib/Configuration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.ibh.systems.neoscada.generator.lib/src/main/java/com/ibh/systems/neoscada/generator/lib/Configuration.java b/com.ibh.systems.neoscada.generator.lib/src/main/java/com/ibh/systems/neoscada/generator/lib/Configuration.java index 8a294fe..96d2d34 100644 --- a/com.ibh.systems.neoscada.generator.lib/src/main/java/com/ibh/systems/neoscada/generator/lib/Configuration.java +++ b/com.ibh.systems.neoscada.generator.lib/src/main/java/com/ibh/systems/neoscada/generator/lib/Configuration.java @@ -323,7 +323,7 @@ public JsonElement serialize ( final ItemSummaryHandlerFactoryElement src, final { final JsonObject object = new JsonObject (); object.addProperty ( "master.id", src.getMasterId () ); - object.addProperty ( "handlerPriority", src.getHandlerPriority () ); + object.addProperty ( "handlerPriority", "" + src.getHandlerPriority () ); object.addProperty ( "tag", Joiner.on ( ", " ).join ( src.getTags () ) ); for ( final String tag : src.getTags () ) {