(2)importingthecontentsoftherespectivedirectoryintheApplicationDevelopmentEnvironmentofyourchoiceandthenrunning"mvn exec:java"torunthecode's main method. This exploitation route should probably concern just testing that the CDOClient code runs smoothly. Towards this goal, the Sens_App_Scenario.xmi file has been created in the "examples" directory which can be used to load a particular CAMEL model and then store it in the CDOServer. This file is used by the main method of the code to show that the loading of XMI files is possible and then the CDOClient can be used to store the loaded models. If you desire to load another file, then you will have to either place it in the "examples" directory or another directory of your choice but of course also change the main method to point to the appropriate file path. The main method also produces as output one XMI file which maps to a model/object produced via a particular query;
(3) produce the jar of the code via "maven clean install" and incorporate it in the libraries of your code (obviously change pom.xml file to include the dependency if your code relies on maven). In this second way, probably you need to follow a particular process through which you can exploit the code as there is no sense any more in exploiting the main method. Actually, the main method can be used as a guide based on which you will be able to exploit the CDOClient. A more involved guide and detailed documentation is provided at the Documentation.doc file.(you can also run the code'smainmethodatthecommandlinebyissuing.
CountrycorCountry=trans.createQuery("hql","select c from Country c where c.name like '%"+name+"%' or '"+name+"' member of c.alternativeNames").getResult(Country.class).get(0);
@@ -166,12 +194,12 @@ public class ModelImporter {
}
for(GeographicalRegionregion:model.getRegions()){
Stringname=region.getName();
System.out.println("Processing region: "+name);
logger.debug("Processing region: "+name);
GeographicalRegioncorRegion=trans.createQuery("hql","select r from GeographicalRegion r where r.name='"+name+"' or '"+name+"' member of r.alternativeNames").getResult(GeographicalRegion.class).get(0);
DataCentergwdg=trans.createQuery("hql","select dc from CloudProvider cp, DataCenter dc where cp.name='GWDG' and dc.cloudProvider=cp").getResult(DataCenter.class).get(0);