diff --git a/bc-generators/artifact-generators/pom.xml b/bc-generators/artifact-generators/pom.xml index 80fb4958beeaf09715d0817651086dd2ac474771..40e821dbcab2bbd625a31654e5f4cf0115b5d40e 100644 --- a/bc-generators/artifact-generators/pom.xml +++ b/bc-generators/artifact-generators/pom.xml @@ -62,7 +62,12 @@ <dependency> <groupId>eu.chorevolution.vsb</groupId> - <artifactId>gm-soap</artifactId> + <artifactId>gm-dpws</artifactId> + <version>0.0.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>eu.chorevolution.vsb</groupId> + <artifactId>gm-websocket</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> diff --git a/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/JarGenerator.java b/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/JarGenerator.java index 3972a32a2e9a61fa6f792f8bd0165a22a52c78be..27af169aefa0b2a6f338c9447e32de99089026cc 100644 --- a/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/JarGenerator.java +++ b/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/JarGenerator.java @@ -2,14 +2,23 @@ package eu.chorevolution.vsb.artifact.generators; import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.jar.Attributes; +import java.util.jar.JarFile; +import java.util.jar.Manifest; import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.Asset; +import org.jboss.shrinkwrap.api.asset.ByteArrayAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl; import eu.chorevolution.vsb.bc.manager.VsbOutput; -import eu.chorevolution.vsb.compiler.RunTimeCompiler; import eu.chorevolution.vsb.gmdl.utils.Constants; +import eu.chorevolution.vsb.gmdl.utils.PathResolver; +import eu.chorevolution.vsb.gmdl.utils.enums.OneWayType; +import eu.chorevolution.vsb.gmdl.utils.enums.ProtocolType; /* TODO * @see http://stackoverflow.com/questions/8522443/generate-jar-file-during-runtime @@ -20,23 +29,242 @@ import eu.chorevolution.vsb.gmdl.utils.Constants; public class JarGenerator { private JavaArchive archive = null; - + private ProtocolType serviceProtocol = null; + private ProtocolType busProtocol = null; + private OneWayType oneWayType = null; + public JarGenerator() { archive = ShrinkWrap.create(JavaArchive.class,Constants.service_name+".jar"); + } + public byte[] generate(){ - String packBindingcomponent = "eu.chorevolution.vsb.bindingcomponent".replace(".", File.separator); - archive.addPackage(Constants.generatedCodePath+File.separator+packBindingcomponent); + PathResolver.setClassPath(Constants.generatedCodePath); + addPackage(); + Class<?> bc = null; + try { + bc = Class.forName(Constants.target_namespace+".BindingComponentMain"); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + Manifest manifest = new Manifest(); + manifest.getMainAttributes().put(new Attributes.Name("Manifest-Version"), "1.0"); + manifest.getMainAttributes().put(new Attributes.Name("Created-By"), "VsbManager"); + manifest.getMainAttributes().put(new Attributes.Name("Main-Class"), "eu.chorevolution.vsb.bindingcomponent.generated.BindingComponentMain"); + archive.addPackage(bc.getPackage()); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + try { + manifest.write(out); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + ByteArrayAsset byteArrayAsset = new ByteArrayAsset(out.toByteArray()); + archive.add(byteArrayAsset, JarFile.MANIFEST_NAME); + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + new ZipExporterImpl(archive).exportTo(bos); + new ZipExporterImpl(archive).exportTo(new File(Constants.generatedCodePath+File.separator+Constants.service_name+".jar"), true); + return bos.toByteArray(); + + } + -// ByteArrayOutputStream bos = new ByteArrayOutputStream(); -// new ZipExporterImpl(archive).exportTo(bos); + public ProtocolType getServiceProtocol() { + return serviceProtocol; + } - new ZipExporterImpl(archive).exportTo(new File(Constants.generatedCodePath+File.separator+Constants.service_name+".jar"), true); - return null; + public void setServiceProtocol(ProtocolType serviceProtocol) { + this.serviceProtocol = serviceProtocol; + } + + + public ProtocolType getBusProtocol() { + return busProtocol; + } + + + public void setBusProtocol(ProtocolType busProtocol) { + + this.busProtocol = busProtocol; } + + private void addPackage(){ + + switch (busProtocol) { + case COAP: + + switch (serviceProtocol){ + + case REST: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent.class.getPackage()); + + break; + + case MQTT: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.mqtt.BcMQTTSubcomponent.class.getPackage()); + + break; + + case WEB_SOCKETS: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent.class.getPackage()); + + break; + + case DPWS: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.dpws.BcDPWSSubcomponent.class.getPackage()); + + break; + + } + + break; + + case REST: + + switch (serviceProtocol){ + case COAP: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent.class.getPackage()); + + break; + + case MQTT: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.mqtt.BcMQTTSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent.class.getPackage()); + + break; + + case WEB_SOCKETS: + + archive.addPackage(eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent.class.getPackage()); + + break; + + case DPWS: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.dpws.BcDPWSSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent.class.getPackage()); + + break; + + } + + + break; + + case MQTT: + + switch (serviceProtocol){ + case COAP: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.mqtt.BcMQTTSubcomponent.class.getPackage()); + + break; + + case REST: + archive.addPackage(eu.chorevolution.vsb.gm.protocols.mqtt.BcMQTTSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent.class.getPackage()); + + break; + + case WEB_SOCKETS: + archive.addPackage(eu.chorevolution.vsb.gm.protocols.mqtt.BcMQTTSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent.class.getPackage()); + + break; + + case DPWS: + archive.addPackage(eu.chorevolution.vsb.gm.protocols.mqtt.BcMQTTSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.dpws.BcDPWSSubcomponent.class.getPackage()); + + break; + + } + + + break; + + case WEB_SOCKETS: + + switch (serviceProtocol){ + case COAP: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent.class.getPackage()); + + break; + + case REST: + archive.addPackage(eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent.class.getPackage()); + break; + + case MQTT: + archive.addPackage(eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.mqtt.BcMQTTSubcomponent.class.getPackage()); + break; + + + case DPWS: + archive.addPackage(eu.chorevolution.vsb.gm.protocols.dpws.BcDPWSSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent.class.getPackage()); + break; + + } + + + break; + + case DPWS: + + switch (serviceProtocol){ + + case COAP: + archive.addPackage(eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.dpws.BcDPWSSubcomponent.class.getPackage()); + break; + + case REST: + archive.addPackage(eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.dpws.BcDPWSSubcomponent.class.getPackage()); + break; + + case MQTT: + archive.addPackage(eu.chorevolution.vsb.gm.protocols.dpws.BcDPWSSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gm.protocols.mqtt.BcMQTTSubcomponent.class.getPackage()); + break; + + case WEB_SOCKETS: + + archive.addPackage(eu.chorevolution.vsb.gm.protocols.dpws.BcDPWSSubcomponent.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent.class.getPackage()); + break; + + + } + + break; + + } + } } \ No newline at end of file diff --git a/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/WarGenerator.java b/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/WarGenerator.java index c892ba524f78da319f639d0dd76112c30048d398..ae9480a1237072bbd7addd77305e9d04d27d0a3d 100644 --- a/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/WarGenerator.java +++ b/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/WarGenerator.java @@ -46,8 +46,6 @@ public class WarGenerator { public VsbOutput generate(boolean isBusProtocolSoap) { - - String packBindingcomponent = "eu.chorevolution.vsb.bindingcomponent".replace(".", File.separator); archive.addPackage(Constants.generatedCodePath+File.separator+packBindingcomponent); diff --git a/bc-manager/src/main/java/eu/chorevolution/vsb/bc/manager/BcManagerRestService.java b/bc-manager/src/main/java/eu/chorevolution/vsb/bc/manager/BcManagerRestService.java index 625acc8408e0a6805611bd0887149af07b65b365..f4d644363a8fa6fcd897991021a6ffa494c95290 100644 --- a/bc-manager/src/main/java/eu/chorevolution/vsb/bc/manager/BcManagerRestService.java +++ b/bc-manager/src/main/java/eu/chorevolution/vsb/bc/manager/BcManagerRestService.java @@ -76,9 +76,11 @@ public class BcManagerRestService implements Manageable { JSONParser parser = new JSONParser(); JSONObject jsonObject = null; - try { + try{ + jsonObject = (JSONObject) parser.parse(new FileReader(configTemplatePath)); - } catch (IOException | ParseException e) { + + }catch (IOException | ParseException e) { e.printStackTrace(); } diff --git a/bc-manager/src/main/java/eu/chorevolution/vsb/bindingcomponent/generated/BindingComponent.java b/bc-manager/src/main/java/eu/chorevolution/vsb/bindingcomponent/generated/BindingComponent.java index d9ba708b91cc5dfe28328ea4e9b3a0ce2c9eea77..f9bb034e94968c8da3efc29e3b48b18e373cd1ab 100644 --- a/bc-manager/src/main/java/eu/chorevolution/vsb/bindingcomponent/generated/BindingComponent.java +++ b/bc-manager/src/main/java/eu/chorevolution/vsb/bindingcomponent/generated/BindingComponent.java @@ -3,9 +3,9 @@ package eu.chorevolution.vsb.bindingcomponent.generated; import java.io.File; import eu.chorevolution.vsb.bc.manager.BcManagerRestService; +import eu.chorevolution.vsb.gm.protocols.coap.BcCoapSubcomponent; import eu.chorevolution.vsb.gm.protocols.primitives.BcGmSubcomponent; import eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent; -import eu.chorevolution.vsb.gm.protocols.soap.BcSoapSubcomponent; import eu.chorevolution.vsb.gmdl.tools.serviceparser.ServiceDescriptionParser; import eu.chorevolution.vsb.gmdl.utils.BcConfiguration; import eu.chorevolution.vsb.gmdl.utils.GmServiceRepresentation; @@ -45,7 +45,7 @@ public class BindingComponent { bcConfiguration2 .setSubcomponentRole(busRole); bcConfiguration1 .parseFromJSON(gmServiceRepresentation, (((((new File(BcManagerRestService.class.getClassLoader().getResource("example.json").toExternalForm().substring(intNine)).getParentFile().getParentFile().getParentFile().getParentFile().getAbsolutePath()+ File.separator)+ new String("config"))+ File.separator)+ new String("config_block1_interface_"))+ String.valueOf((i + intOne)))); bcConfiguration2 .parseFromJSON(gmServiceRepresentation, (((((new File(BcManagerRestService.class.getClassLoader().getResource("example.json").toExternalForm().substring(intNine)).getParentFile().getParentFile().getParentFile().getParentFile().getAbsolutePath()+ File.separator)+ new String("config"))+ File.separator)+ new String("config_block2_interface_"))+ String.valueOf((i + intOne)))); - subcomponent[i][0] = new BcSoapSubcomponent(bcConfiguration1, gmServiceRepresentation); + subcomponent[i][0] = new BcCoapSubcomponent(bcConfiguration1, gmServiceRepresentation); subcomponent[i][1] = new BcRestSubcomponent(bcConfiguration2, gmServiceRepresentation); BcGmSubcomponent block1Component = subcomponent[i][0]; BcGmSubcomponent block2Component = subcomponent[i][1]; diff --git a/bc-manager/src/main/java/eu/chorevolution/vsb/bindingcomponent/generated/WEATHERINFORMATIONRESPONSE.java b/bc-manager/src/main/java/eu/chorevolution/vsb/bindingcomponent/generated/WEATHERINFORMATIONRESPONSE.java deleted file mode 100644 index c584cd78e6fe2f7eca913fbcfca1fc040be44aa8..0000000000000000000000000000000000000000 --- a/bc-manager/src/main/java/eu/chorevolution/vsb/bindingcomponent/generated/WEATHERINFORMATIONRESPONSE.java +++ /dev/null @@ -1,64 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "WEATHERINFORMATIONRESPONSE") -public class WEATHERINFORMATIONRESPONSE { - - @XmlElement(name = "roadTemperature", required = true) - private String roadTemperature; - @XmlElement(name = "airTemperature", required = true) - private String airTemperature; - @XmlElement(name = "airRelativeHumidity", required = true) - private String airRelativeHumidity; - @XmlElement(name = "windForce", required = true) - private String windForce; - - public String getroadTemperature() { - return roadTemperature; - } - - public void setroadTemperature(String roadTemperature) { - - this.roadTemperature = roadTemperature; - } - - public String getairTemperature() { - - return airTemperature; - } - - public void setairTemperature(String airTemperature) { - - this.airTemperature = airTemperature; - } - - public String getairRelativeHumidity() { - return airRelativeHumidity; - } - - public void setairRelativeHumidity(String airRelativeHumidity) { - - this.airRelativeHumidity = airRelativeHumidity; - } - - public String getwindForce() { - - return windForce; - } - - public void setwindForce(String windForce) { - this.windForce = windForce; - } - -} diff --git a/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/PathResolver.java b/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/PathResolver.java index f64e965bbaa017797c123de2b128a90f1df23061..c32c091b1f4f08d30e7f229fca5a05cd7a90283a 100644 --- a/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/PathResolver.java +++ b/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/PathResolver.java @@ -385,23 +385,6 @@ public class PathResolver { URL[] urls = ((URLClassLoader)cl).getURLs(); - for(URL url: urls){ - System.out.println(url.getFile()); - } - -// try { -// new URLClassLoader(((URLClassLoader) ClassLoader.getSystemClassLoader()).getURLs()) { -// @Override -// public void addURL(URL url) { -// super.addURL(url); -// } -// }.addURL(classpathFile.toURI().toURL()); -// -// } catch (MalformedURLException e1) { -// -// // TODO Auto-generated catch block -// e1.printStackTrace(); -// } } diff --git a/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/enums/OneWayType.java b/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/enums/OneWayType.java new file mode 100644 index 0000000000000000000000000000000000000000..a21f43622fa23924afda1bc1399ae083a1aafbb9 --- /dev/null +++ b/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/enums/OneWayType.java @@ -0,0 +1,31 @@ +package eu.chorevolution.vsb.gmdl.utils.enums; + +public enum OneWayType { + + COAP_to_DPWS, + COAP_to_REST, + COAP_to_MQTT, + COAP_to_WEBSOCKET, + + DPWS_to_COAP, + DPWS_to_REST, + DPWS_to_MQTT, + DPWS_to_WEBSOCKET, + + REST_to_COAP, + REST_to_DPWS, + REST_to_MQTT, + REST_to_WEBSOCKET, + + MQTT_to_COAP, + MQTT_to_REST, + MQTT_to_DPWS, + MQTT_to_WEBSOCKET, + + WEBSOCKET_to_COAP, + WEBSOCKET_to_REST, + WEBSOCKET_to_DPWS, + WEBSOCKET_to_MQTT, + + +} diff --git a/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/enums/ProtocolType.java b/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/enums/ProtocolType.java index 25f2f15eda35ee5d8bce06ca040d4b38de3ebe6f..0b6bcd10529ea2827bc9478834d7c10537387f71 100644 --- a/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/enums/ProtocolType.java +++ b/gmdl-utils/src/main/java/eu/chorevolution/vsb/gmdl/utils/enums/ProtocolType.java @@ -12,3 +12,4 @@ public enum ProtocolType { ZERO_MQ, DPWS; } + diff --git a/protocol-pool/gm-websocket/pom.xml b/protocol-pool/gm-websocket/pom.xml index f3fe75b17f3afcd048a0e8ba9943413c60e8263b..f99e98965451d956c70e80bb8296a3cf12a41de5 100644 --- a/protocol-pool/gm-websocket/pom.xml +++ b/protocol-pool/gm-websocket/pom.xml @@ -49,16 +49,6 @@ <artifactId>json-simple</artifactId> <version>1.1.1</version> </dependency> - <dependency> - <groupId>eu.chorevolution.vsb</groupId> - <artifactId>gm-dpws</artifactId> - <version>0.0.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>eu.chorevolution.vsb</groupId> - <artifactId>gm-coap</artifactId> - <version>0.0.1-SNAPSHOT</version> - </dependency> <dependency> <groupId>eu.chorevolution.vsb</groupId> <artifactId>service-parser</artifactId> diff --git a/vsb-manager/src/main/java/eu/chorevolution/vsb/manager/VsbManager.java b/vsb-manager/src/main/java/eu/chorevolution/vsb/manager/VsbManager.java index 43baf70170604ba3d5bfe093bcbcb771ff84256b..645e0fffa122a86e4d608a93c3d701c155976c1d 100644 --- a/vsb-manager/src/main/java/eu/chorevolution/vsb/manager/VsbManager.java +++ b/vsb-manager/src/main/java/eu/chorevolution/vsb/manager/VsbManager.java @@ -69,7 +69,10 @@ import eu.chorevolution.vsb.websocket.BcWebsocketSubcomponent; public class VsbManager { private boolean STARTING_FROM_JAR = false; - + private ProtocolType serviceProtocol = null; + private ProtocolType busProtocol = null; + + public VsbManager() { // Test if class is running from jar file or from classes files. @@ -98,7 +101,8 @@ public class VsbManager { */ public VsbOutput generateWar(String interfaceDescriptionPath, ProtocolType busProtocol, String service_name) { - + + this.busProtocol = busProtocol; service_name = deleteSpecialChar(service_name); Constants.service_name = service_name; VsbOutput vsbOutput = generate(interfaceDescriptionPath, busProtocol); @@ -120,7 +124,8 @@ public class VsbManager { */ public VsbOutput generateWar(byte[] interfaceDescriptionByteArray, ProtocolType busProtocol, String service_name) { - + + this.busProtocol = busProtocol; service_name = deleteSpecialChar(service_name); Constants.service_name = service_name; String interfaceDescriptionPath = interfaceDescriptionBytesToFile(interfaceDescriptionByteArray); @@ -141,7 +146,7 @@ public class VsbManager { * @return boolean */ - public boolean deleteGeneratedFiles() { + public boolean deleteGeneratedFiles(){ boolean deleteGerated = false; File directory = new File(Constants.generatedCodePath); @@ -259,16 +264,19 @@ public class VsbManager { + "protocol-pool" + File.separator + "gm-soap" + File.separator + "pom-gm-soap.xml"; String gm_coap_pomxml = new File(".").getAbsolutePath() + File.separator + ".." + File.separator + "protocol-pool" + File.separator + "gm-coap" + File.separator + "pom.xml"; - // String gm_dpws_pomxml = new File(".").getAbsolutePath() + - // File.separator + ".." + File.separator + "protocol-pool" + - // File.separator + "gm-dpws" + File.separator + "pom.xml"; - + String gm_dpws_pomxml = new File(".").getAbsolutePath() + + File.separator + ".." + File.separator + "protocol-pool" + + File.separator + "gm-dpws" + File.separator + "pom.xml"; + String gm_websocket_pomxl = new File(".").getAbsolutePath() + + File.separator + ".." + File.separator + "protocol-pool" + + File.separator + "gm-websocket" + File.separator + "pom.xml"; if (STARTING_FROM_JAR){ vsb_manager_pomxml = PathResolver.myFilePath(BcManagerRestService.class, "pom-vsb-manager.xml"); gm_soap_pomxml = PathResolver.myFilePath(BcManagerRestService.class, "gm-soap/pom-gm-soap.xml"); gm_coap_pomxml = PathResolver.myFilePath(BcManagerRestService.class, "gm-coap/pom.xml"); -// gm_dpws_pomxml = PathResolver.myFilePath(BcManagerRestService.class,"gm-dpws/pom.xml"); + gm_dpws_pomxml = PathResolver.myFilePath(BcManagerRestService.class,"gm-dpws/pom.xml"); + gm_websocket_pomxl = PathResolver.myFilePath(BcManagerRestService.class,"gm-websocket/pom.xml"); } warGenerator.addDependencyFiles(vsb_manager_pomxml); @@ -283,24 +291,23 @@ public class VsbManager { Class[] classesOptions = new Class[] { - BcManagerRestService.class, BcGmSubcomponent.class, BcGmSubcomponent.class, BcRestSubcomponent.class, BcSoapSubcomponent.class, ServiceDescriptionParser.class, BcConfiguration.class, BcCoapSubcomponent.class, BcDPWSSubcomponent.class, BcMQTTSubcomponent.class, BcWebsocketSubcomponent.class, BcSoapSubcomponent.class - }; Generator generator = new Generator(); generator.compileGeratedClasses(classesOptions); VsbOutput vsbOutput = generator.generateWar(warGenerator, busProtocol); -// vsbOutput.jar = generator.generateJar(jarGenerator); + jarGenerator.setBusProtocol(busProtocol); + jarGenerator.setServiceProtocol(serviceProtocol); + vsbOutput.jar = generator.generateJar(jarGenerator); return vsbOutput; - } private void generateBindingComponent(final String interfaceDescription, final ProtocolType busProtocol) { @@ -326,7 +333,8 @@ public class VsbManager { gmServiceRepresentation = ServiceDescriptionParser.getRepresentationFromGIDL(interfaceDescription); break; } - + + serviceProtocol = gmServiceRepresentation.getProtocol(); if (busProtocol == ProtocolType.SOAP) { bcConfiguration.setTargetNamespace(Constants.target_namespace); @@ -343,10 +351,8 @@ public class VsbManager { } generateBindingComponentClass(gmServiceRepresentation, busProtocol); - if(busProtocol != ProtocolType.SOAP){ - - generateBindingComponentMainClass(); - } + generateBindingComponentMainClass(); + } @@ -753,9 +759,11 @@ public class VsbManager { JMethod jmMain = jc.method(JMod.PUBLIC | JMod.STATIC,void.class , "main"); jmMain.param(StringClass.array(), "args"); JBlock jmMainBlock = jmMain.body(); - jmMainBlock.decl(bindingComponent, "bindingComponent") - .init(JExpr._new(bindingComponent)) - .invoke("run"); + JVar bindingComponentVar = jmMainBlock.decl(bindingComponent, "bindingComponent") + .init(JExpr._new(bindingComponent)); + + JInvocation run = bindingComponentVar.invoke("run"); + jmMainBlock.add(run); try { jCodeModel.build(new File(Constants.generatedCodePath+File.separator)); diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BCdtscongestionSoapEndpoint.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BCdtscongestionSoapEndpoint.java deleted file mode 100644 index dd14b7462c715528ff15d4ac6c2b6e3d52f31350..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BCdtscongestionSoapEndpoint.java +++ /dev/null @@ -1,37 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import java.util.ArrayList; -import java.util.List; -import javax.jws.WebMethod; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; -import eu.chorevolution.vsb.gm.protocols.builders.ResponseBuilder; -import eu.chorevolution.vsb.gm.protocols.primitives.BcGmSubcomponent; -import eu.chorevolution.vsb.gmdl.utils.Data; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@WebService(serviceName = "BCdtscongestionSoapEndpoint", targetNamespace = "eu.chorevolution.vsb.bindingcomponent.generated") -@SOAPBinding -public class BCdtscongestionSoapEndpoint { - - private final BcGmSubcomponent apiRef; - - public BCdtscongestionSoapEndpoint(BcGmSubcomponent apiRef){ - - this.apiRef = apiRef; - } - - @WebMethod(action = "routeCongestionInformation", operationName = "routeCongestionInformation") - public CONGESTIONSTATUSRESPONSE routeCongestionInformation(CONGESTIONSTATUSREQUEST congestionStatusRequest) { - List<Data<?>> datas = new ArrayList<Data<?>>(); - datas.add(new Data<CONGESTIONSTATUSREQUEST>("congestionStatusRequest", "CONGESTIONSTATUSREQUEST", true, congestionStatusRequest, "BODY")); - String serializedcongestionStatusResponse = this.apiRef.mgetTwowaySync("routeCongestionInformation", datas); - return ResponseBuilder.unmarshalObject("application/json", serializedcongestionStatusResponse, CONGESTIONSTATUSRESPONSE.class); - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BCdtscongestionSoapEndpointPublisher.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BCdtscongestionSoapEndpointPublisher.java deleted file mode 100644 index 17c9c0dfddcd6beb432b4a4a6bf9f96f764d9744..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BCdtscongestionSoapEndpointPublisher.java +++ /dev/null @@ -1,50 +0,0 @@ -package eu.chorevolution.vsb.bindingcomponent.generated; - -import java.io.File; - -import eu.chorevolution.vsb.gmdl.tools.serviceparser.ServiceDescriptionParser; -import eu.chorevolution.vsb.gmdl.utils.BcConfiguration; -import eu.chorevolution.vsb.gmdl.utils.Constants; -import eu.chorevolution.vsb.gmdl.utils.GmServiceRepresentation; -import eu.chorevolution.vsb.gmdl.utils.enums.RoleType; - -public class BCdtscongestionSoapEndpointPublisher { - - public static void main(String[] args) { - // TODO Auto-generated method stub - - Constants.generatedCodePath = "/tmp/GeneratorFolder113006383196551840"; - - - try{ - - String interfaceDescFilePath = Constants.generatedCodePath + File.separator + "bc-generators" - + File.separator + "artifact-generators" + File.separator + "src" + File.separator + "main" - + File.separator + "webapp" + File.separator + "config" + File.separator - + "serviceDescription.gxdl"; - - GmServiceRepresentation gmServiceRep = ServiceDescriptionParser - .getRepresentationFromGIDL(interfaceDescFilePath); - - RoleType busRole = RoleType.SERVER; - BcConfiguration bcConfiguration = new BcConfiguration(); - bcConfiguration.setSubcomponentRole(busRole); - String configFile = Constants.generatedCodePath + File.separator + "bc-generators" + File.separator - + "artifact-generators" + File.separator + "src" + File.separator + "main" + File.separator - + "webapp" + File.separator + "config" + File.separator + "config_block1_interface_1"; - - bcConfiguration.parseFromJSON(gmServiceRep, configFile); - BcSoapSubcomponentMooc bcSoapSubcomponent = new BcSoapSubcomponentMooc(bcConfiguration, gmServiceRep); - bcSoapSubcomponent.start(); - -// Wget.wGet(Constants.generatedCodePath + File.separator + Constants.wsdlName + "new.wsdl", -// endpointAddress + "?wsdl"); - - - } catch (IllegalArgumentException | SecurityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BcSoapSubcomponentMooc.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BcSoapSubcomponentMooc.java deleted file mode 100644 index 4eaa531c081fbdb5c5a9d93e4e7c9b214cae559c..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BcSoapSubcomponentMooc.java +++ /dev/null @@ -1,224 +0,0 @@ -package eu.chorevolution.vsb.bindingcomponent.generated; - -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.util.List; - -import javax.xml.soap.MessageFactory; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPConnection; -import javax.xml.soap.SOAPConnectionFactory; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; -import javax.xml.soap.SOAPPart; -import javax.xml.ws.Endpoint; - -import eu.chorevolution.vsb.gm.protocols.primitives.BcGmSubcomponent; -import eu.chorevolution.vsb.gmdl.utils.BcConfiguration; -import eu.chorevolution.vsb.gmdl.utils.Data; -import eu.chorevolution.vsb.gmdl.utils.GmServiceRepresentation; - -public class BcSoapSubcomponentMooc extends BcGmSubcomponent { - - private Endpoint endpoint; - private SOAPConnection soapConnection; - private GmServiceRepresentation serviceRepresentation; - - public BcSoapSubcomponentMooc(BcConfiguration bcConfiguration, - GmServiceRepresentation serviceRepresentation) { - super(bcConfiguration); - this.serviceRepresentation = serviceRepresentation; - } - - @Override - public void start(){ - switch (this.bcConfiguration.getSubcomponentRole()) { - case SERVER: - Class<?> bc = null; - bc = BCdtscongestionSoapEndpoint.class; - try { -// System.setProperty("com.sun.net.httpserver.HttpServerProvider", "org.mortbay.jetty.j2se6.JettyHttpServerProvider"); - String endpointAddress = this.bcConfiguration.getSubcomponentAddress()+":"+this.bcConfiguration.getSubcomponentPort()+"/"+this.bcConfiguration.getServiceName(); - try{ - this.endpoint = Endpoint.publish(endpointAddress, bc.getDeclaredConstructor(BcGmSubcomponent.class).newInstance(this)); - System.err.println("SOAP endpoint published on " + endpointAddress); - System.err.println("getEndpointReference: " + this.endpoint.getEndpointReference()); - - } catch (InstantiationException | IllegalAccessException | InvocationTargetException - | NoSuchMethodException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (SecurityException e) { - e.printStackTrace(); - } - break; - case CLIENT: - SOAPConnectionFactory soapConnectionFactory = null; - try{ - - soapConnectionFactory = SOAPConnectionFactory.newInstance(); - - } catch (UnsupportedOperationException | SOAPException e) { - e.printStackTrace(); - } - try{ - - soapConnection = soapConnectionFactory.createConnection(); - - } catch (SOAPException e){ - - e.printStackTrace(); - } - break; - default: - break; - } - } - - @Override - public void stop() { - switch (this.bcConfiguration.getSubcomponentRole()) { - case SERVER: - if(this.endpoint.isPublished()) { - this.endpoint.stop(); - } - break; - case CLIENT: - try { - soapConnection.close(); - } catch (SOAPException e) { - e.printStackTrace(); - } - break; - default: - break; - } - } - - @Override - public void postOneway(final String destination, final String scope, final List<Data<?>> data, final long lease) { - // TODO Auto-generated method stub - String url = "http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx";//http://localhost:8484/bookEndpoint - - MessageFactory messageFactory = null; - try { - messageFactory = MessageFactory.newInstance(); - } catch (SOAPException e) { - e.printStackTrace(); - } - SOAPMessage soapMessage = null; - try { - soapMessage = messageFactory.createMessage(); - } catch (SOAPException e) { - e.printStackTrace(); - } - SOAPPart soapPart = soapMessage.getSOAPPart(); - - String serverURI = "http://ws.cdyne.com/";//http://test.soap.clientserver.playgrounds.vsb.chorevolution.eu/ - - // SOAP Envelope - SOAPEnvelope envelope = null; - try { - envelope = soapPart.getEnvelope(); - } catch (SOAPException e) { - e.printStackTrace(); - } - try { - envelope.addNamespaceDeclaration("example", serverURI); - } catch (SOAPException e) { - e.printStackTrace(); - } - - // SOAP Body - SOAPBody soapBody = null; - try { - soapBody = envelope.getBody(); - } catch (SOAPException e) { - e.printStackTrace(); - } - - SOAPElement soapBodyElem = null; - SOAPElement soapBodyElem1 = null; - SOAPElement soapBodyElem2 = null; - try { - soapBodyElem = soapBody.addChildElement("VerifyEmail", "example"); - soapBodyElem1 = soapBodyElem.addChildElement("email", "example"); - soapBodyElem1.addTextNode("mutantninja@gmail.com"); - soapBodyElem2 = soapBodyElem.addChildElement("LicenseKey", "example"); - soapBodyElem2.addTextNode("123"); - } catch (SOAPException e) { - e.printStackTrace(); - } - -// MimeHeaders headers = soapMessage.getMimeHeaders(); -// headers.addHeader("SOAPAction", serverURI + "VerifyEmail"); - - try { - soapMessage.saveChanges(); - /* Print the request message */ - System.out.print("Request SOAP Message:"); - soapMessage.writeTo(System.out); - System.out.println(); - - SOAPMessage soapResponse = soapConnection.call(soapMessage, url); - - System.out.print("Response SOAP Message:"); - soapResponse.writeTo(System.out); - } catch (SOAPException | IOException e) { - e.printStackTrace(); - } - - } - - @Override - public void mgetOneway(final String scope, final Object exchange) { - this.nextComponent.postOneway(this.bcConfiguration.getServiceAddress(), scope, (List<Data<?>>)exchange, 0); - } - - @Override - public void xmgetOneway(final String source, final String scope, final Object exchange) { - this.nextComponent.postOneway(this.bcConfiguration.getServiceAddress(), scope, (List<Data<?>>)exchange, 0); - } - - @Override - public <T> T postTwowaySync(final String destination, final String scope, final List<Data<?>> datas, final long lease) { - // TODO Auto-generated method stub - return null; - } - - @Override - public void xtgetTwowaySync(final String destination, final String scope, final long timeout, final Object response) { - // TODO Auto-generated method stub - } - - @Override - public <T> T mgetTwowaySync(final String scope, final Object exchange) { - return this.nextComponent.postTwowaySync(this.bcConfiguration.getServiceAddress(), scope, (List<Data<?>>)exchange, 0); - } - - @Override - public void postTwowayAsync(final String destination, final String scope, final List<Data<?>> data, final long lease) { - // TODO Auto-generated method stub - } - - @Override - public void xgetTwowayAsync(final String destination, final String scope, final Object response) { - // TODO Auto-generated method stub - } - - @Override - public void mgetTwowayAsync(final String scope, final Object exchange){ - this.nextComponent.postTwowayAsync(this.bcConfiguration.getServiceAddress(), scope, (List<Data<?>>)exchange, 0); - } - - @Override - public void postBackTwowayAsync(final String source, final String scope, final Data<?> data, final long lease, final Object exchange) { - // TODO Auto-generated method stub - } -} \ No newline at end of file diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BindingComponent.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BindingComponent.java deleted file mode 100644 index 35e3bc150f748003d71443a0480a36f8ed8be940..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/BindingComponent.java +++ /dev/null @@ -1,69 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import java.io.File; -import eu.chorevolution.vsb.bc.manager.BcManagerRestService; -import eu.chorevolution.vsb.gm.protocols.primitives.BcGmSubcomponent; -import eu.chorevolution.vsb.gm.protocols.rest.BcRestSubcomponent; -import eu.chorevolution.vsb.gm.protocols.soap.BcSoapSubcomponent; -import eu.chorevolution.vsb.gmdl.tools.serviceparser.ServiceDescriptionParser; -import eu.chorevolution.vsb.gmdl.utils.BcConfiguration; -import eu.chorevolution.vsb.gmdl.utils.GmServiceRepresentation; -import eu.chorevolution.vsb.gmdl.utils.Interface; -import eu.chorevolution.vsb.gmdl.utils.enums.RoleType; - -public class BindingComponent { - - BcGmSubcomponent[][] subcomponent; - GmServiceRepresentation gmServiceRepresentation = null; - - public void run(){ - java.lang.Integer intFive; - intFive = Integer.parseInt("5"); - java.lang.Integer intOne; - intOne = Integer.parseInt("1"); - java.lang.Integer intNine; - intNine = Integer.parseInt("9"); - String interfaceDescFilePath; - interfaceDescFilePath = ((((new File(BcManagerRestService.class.getClassLoader().getResource("example.json").toExternalForm().substring(intNine)).getParentFile().getParentFile().getParentFile().getParentFile().getAbsolutePath()+ File.separator)+ new String("config"))+ File.separator)+ new String("serviceDescription.gxdl")); - gmServiceRepresentation = ServiceDescriptionParser.getRepresentationFromGIDL(interfaceDescFilePath); - int num_interfaces = gmServiceRepresentation.getInterfaces().size(); - subcomponent = new BcGmSubcomponent[num_interfaces][2]; - for (int i = 0; (i<gmServiceRepresentation.getInterfaces().size()); i += 1) { - Interface inter = null; - inter = gmServiceRepresentation.getInterfaces().get(i); - System.out.println("genfac start iteration"); - RoleType busRole; - if (inter.getRole() == RoleType.SERVER) { - busRole = RoleType.CLIENT; - } else { - busRole = RoleType.SERVER; - } - BcConfiguration bcConfiguration1 = new BcConfiguration(); - BcConfiguration bcConfiguration2 = new BcConfiguration(); - bcConfiguration1 .setSubcomponentRole(inter.getRole()); - bcConfiguration2 .setSubcomponentRole(busRole); - bcConfiguration1 .parseFromJSON(gmServiceRepresentation, (((((new File(BcManagerRestService.class.getClassLoader().getResource("example.json").toExternalForm().substring(intNine)).getParentFile().getParentFile().getParentFile().getParentFile().getAbsolutePath()+ File.separator)+ new String("config"))+ File.separator)+ new String("config_block1_interface_"))+ String.valueOf((i + intOne)))); - bcConfiguration2 .parseFromJSON(gmServiceRepresentation, (((((new File(BcManagerRestService.class.getClassLoader().getResource("example.json").toExternalForm().substring(intNine)).getParentFile().getParentFile().getParentFile().getParentFile().getAbsolutePath()+ File.separator)+ new String("config"))+ File.separator)+ new String("config_block2_interface_"))+ String.valueOf((i + intOne)))); - subcomponent[i][0] = new BcSoapSubcomponent(bcConfiguration1, gmServiceRepresentation); - subcomponent[i][1] = new BcRestSubcomponent(bcConfiguration2, gmServiceRepresentation); - BcGmSubcomponent block1Component = subcomponent[i][0]; - BcGmSubcomponent block2Component = subcomponent[i][1]; - block1Component.setNextComponent(block2Component); - block2Component.setNextComponent(block1Component); - block1Component.start(); - block2Component.start(); - } - } - - public void pause() { - for (int i = 0; (i<gmServiceRepresentation.getInterfaces().size()); i += 1) { - System.out.println("genfac stop iteration"); - BcGmSubcomponent block1Component = subcomponent[i][0]; - BcGmSubcomponent block2Component = subcomponent[i][1]; - block1Component.stop(); - block2Component.stop(); - } - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/CONGESTIONSTATUSREQUEST.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/CONGESTIONSTATUSREQUEST.java deleted file mode 100644 index a507e1630f19b69b325e9b9a067776c774adbc04..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/CONGESTIONSTATUSREQUEST.java +++ /dev/null @@ -1,30 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "CONGESTIONSTATUSREQUEST") -public class CONGESTIONSTATUSREQUEST { - - @XmlElement(name = "routeSegments", required = true) - private List<ROUTESEGMENTS> routeSegments; - - public List<ROUTESEGMENTS> getrouteSegments() { - return routeSegments; - } - - public void setrouteSegments(List<ROUTESEGMENTS> routeSegments) { - this.routeSegments = routeSegments; - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/CONGESTIONSTATUSRESPONSE.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/CONGESTIONSTATUSRESPONSE.java deleted file mode 100644 index ff006018f459b99b4d26ad474278938bc054bc76..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/CONGESTIONSTATUSRESPONSE.java +++ /dev/null @@ -1,30 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "CONGESTIONSTATUSRESPONSE") -public class CONGESTIONSTATUSRESPONSE { - - @XmlElement(name = "routeSegmentsCongestionStatus", required = true) - private List<ROUTESEGMENTSCONGESTIONSTATUS> routeSegmentsCongestionStatus; - - public List<ROUTESEGMENTSCONGESTIONSTATUS> getrouteSegmentsCongestionStatus() { - return routeSegmentsCongestionStatus; - } - - public void setrouteSegmentsCongestionStatus(List<ROUTESEGMENTSCONGESTIONSTATUS> routeSegmentsCongestionStatus) { - this.routeSegmentsCongestionStatus = routeSegmentsCongestionStatus; - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/END.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/END.java deleted file mode 100644 index 97639ad84ce528ac7b25669a42e56d445ec0c5b4..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/END.java +++ /dev/null @@ -1,39 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "END") -public class END { - - @XmlElement(name = "lat", required = true) - private String lat; - @XmlElement(name = "lon", required = true) - private String lon; - - public String getlat() { - return lat; - } - - public void setlat(String lat) { - this.lat = lat; - } - - public String getlon() { - return lon; - } - - public void setlon(String lon) { - this.lon = lon; - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENT.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENT.java deleted file mode 100644 index 089cb684afa31bfef421875dc1b03156b535c99d..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENT.java +++ /dev/null @@ -1,39 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "ROUTESEGMENT") -public class ROUTESEGMENT { - - @XmlElement(name = "strart", required = true) - private STRART strart; - @XmlElement(name = "end", required = true) - private END end; - - public STRART getstrart() { - return strart; - } - - public void setstrart(STRART strart) { - this.strart = strart; - } - - public END getend() { - return end; - } - - public void setend(END end) { - this.end = end; - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTCONGESTIONSTATUS.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTCONGESTIONSTATUS.java deleted file mode 100644 index 0d26b5b8606ec80697b6fb9a395161b3f67ce006..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTCONGESTIONSTATUS.java +++ /dev/null @@ -1,49 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "ROUTESEGMENTCONGESTIONSTATUS") -public class ROUTESEGMENTCONGESTIONSTATUS { - - @XmlElement(name = "routeSegment", required = true) - private ROUTESEGMENT routeSegment; - @XmlElement(name = "congestionLevel", required = true) - private String congestionLevel; - @XmlElement(name = "speed", required = true) - private String speed; - - public ROUTESEGMENT getrouteSegment() { - return routeSegment; - } - - public void setrouteSegment(ROUTESEGMENT routeSegment) { - this.routeSegment = routeSegment; - } - - public String getcongestionLevel() { - return congestionLevel; - } - - public void setcongestionLevel(String congestionLevel) { - this.congestionLevel = congestionLevel; - } - - public String getspeed() { - return speed; - } - - public void setspeed(String speed) { - this.speed = speed; - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTS.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTS.java deleted file mode 100644 index de1a083b0a0a5306059018050cc694aced996999..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTS.java +++ /dev/null @@ -1,39 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "ROUTESEGMENTS") -public class ROUTESEGMENTS { - - @XmlElement(name = "start", required = true) - private START start; - @XmlElement(name = "end", required = true) - private END end; - - public START getstart() { - return start; - } - - public void setstart(START start) { - this.start = start; - } - - public END getend() { - return end; - } - - public void setend(END end) { - this.end = end; - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTSCONGESTIONSTATUS.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTSCONGESTIONSTATUS.java deleted file mode 100644 index 98d20a28ee53b3d62b303dfa071368359b4593e7..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/ROUTESEGMENTSCONGESTIONSTATUS.java +++ /dev/null @@ -1,29 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "ROUTESEGMENTSCONGESTIONSTATUS") -public class ROUTESEGMENTSCONGESTIONSTATUS { - - @XmlElement(name = "routeSegmentCongestionStatus", required = true) - private ROUTESEGMENTCONGESTIONSTATUS routeSegmentCongestionStatus; - - public ROUTESEGMENTCONGESTIONSTATUS getrouteSegmentCongestionStatus() { - return routeSegmentCongestionStatus; - } - - public void setrouteSegmentCongestionStatus(ROUTESEGMENTCONGESTIONSTATUS routeSegmentCongestionStatus) { - this.routeSegmentCongestionStatus = routeSegmentCongestionStatus; - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/START.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/START.java deleted file mode 100644 index 41dc82a497521182209c2fd2d881b5a1c680c80a..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/START.java +++ /dev/null @@ -1,39 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "START") -public class START { - - @XmlElement(name = "lat", required = true) - private String lat; - @XmlElement(name = "lon", required = true) - private String lon; - - public String getlat() { - return lat; - } - - public void setlat(String lat) { - this.lat = lat; - } - - public String getlon() { - return lon; - } - - public void setlon(String lon) { - this.lon = lon; - } - -} diff --git a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/STRART.java b/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/STRART.java deleted file mode 100644 index 4c901f575749cadbb64285925c4b91d964c0c378..0000000000000000000000000000000000000000 --- a/vsb-manager/src/test/java/eu/chorevolution/vsb/bindingcomponent/generated/STRART.java +++ /dev/null @@ -1,39 +0,0 @@ - -package eu.chorevolution.vsb.bindingcomponent.generated; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - - -/** - * This class was generated by the CHOReVOLUTION BindingComponent Generator using com.sun.codemodel 2.6 - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "STRART") -public class STRART { - - @XmlElement(name = "lat", required = true) - private String lat; - @XmlElement(name = "lon", required = true) - private String lon; - - public String getlat() { - return lat; - } - - public void setlat(String lat) { - this.lat = lat; - } - - public String getlon() { - return lon; - } - - public void setlon(String lon) { - this.lon = lon; - } - -}