/* Experiment Parameters */ /* Example values could look like this: */ /* LongitudeMin = "-122"; */ /* LongitudeMax = "-115"; */ /* LatitudeMin = "32"; */ /* LatitudeMax = "37"; */ /* BoxWidth = "0.1"; */ /* T0Year = "1932"; */ /* T0Month = "1"; */ /* T0Day = "1"; */ /* T1Year = "1990"; */ /* T1Month = "1"; */ /* T1Day = "1"; */ /* T2Year = "2000"; */ /* T2Month = "1"; */ /* T2Day = "1"; */ /* TimeStep = "30"; */ /* MinimumMagnitude = "3.0"; */ LongitudeMin = ARGS[0]; LongitudeMax = ARGS[1]; LatitudeMin = ARGS[2]; LatitudeMax = ARGS[3]; BoxWidth = ARGS[4]; T0Year = ARGS[5]; T0Month = ARGS[6]; T0Day = ARGS[7]; T1Year = ARGS[8]; T1Month = ARGS[9]; T1Day = ARGS[10]; T2Year = ARGS[11]; T2Month = ARGS[12]; T2Day = ARGS[13]; TimeStep = ARGS[14]; MinimumMagnitude = ARGS[15]; /* INIT Logging and timing measurement */ l = new LOG("/home/hgadgil/services/GIS/TimingOut.txt"); x = ""; for(i = 0; i<=15; i++) { x = x + ARGS[i] + " "; } l.info("Using Parameters: ", x); hrt = new HRTimer(); hrt.start(); WSContext.put("context://GIS/PI", "Executing"); hrt.stop(); t_contextPut1 = hrt.duration; /* l.info("Context PUT: ", ""+hrt.duration); */ /* Constants */ filteredData = "topic:///GIS/FilteredData"; /* Data Reader and Filtering Service */ filterService = "cgl.GIS.services.DataFilter"; filterServiceLoc = "http://gf7.ucs.indiana.edu:4700/axis/services/WSSConnector?wsdl"; filterServiceHandler = new WSProxyResource(filterService, filterServiceLoc); filterServiceHandler.setInput("http://gf8.ucs.indiana.edu:7474/wfs/results.txt"); filterServiceHandler.setOutput(filteredData); filterServiceHandler.setParameter("Magnitude", MinimumMagnitude); /* Pattern Informatics Service Description */ piService = "cgl.GIS.services.PIRunner"; piServiceLoc = "http://gf7.ucs.indiana.edu:4700/axis/services/WSSConnector?wsdl"; piServiceHandler = new WSProxyResource(piService, piServiceLoc); piServiceHandler.setInput(filteredData); piServiceHandler.setParameter("LongitudeMin", LongitudeMin); piServiceHandler.setParameter("LongitudeMax", LongitudeMax); piServiceHandler.setParameter("LatitudeMin", LatitudeMin); piServiceHandler.setParameter("LatitudeMax", LatitudeMax); piServiceHandler.setParameter("BoxWidth", BoxWidth); piServiceHandler.setParameter("T0Year", T0Year); piServiceHandler.setParameter("T0Month", T0Month); piServiceHandler.setParameter("T0Day", T0Day); piServiceHandler.setParameter("T1Year", T1Year); piServiceHandler.setParameter("T1Month", T1Month); piServiceHandler.setParameter("T1Day", T1Day); piServiceHandler.setParameter("T2Year", T2Year); piServiceHandler.setParameter("T2Month", T2Month); piServiceHandler.setParameter("T2Day", T2Day); piServiceHandler.setParameter("TimeStep", TimeStep); piServiceHandler.setParameter("MinimumMagnitude", MinimumMagnitude); piServiceHandler.setParameter("CatalogFileName", "scedc.catalog"); hrt.reset(); hrt.start(); f = new Flow(); f.addComponents(piServiceHandler); f.addStartActivities(filterServiceHandler); f.start("1"); f.waitUntilFlowCompletes(); hrt.stop(); t_flow = hrt.duration; /* l.info("Total time to complete Flow: ", ""+hrt.duration); */ /* Now notify the caller of the process completion */ Sys.println(" ***** FLOW PI-CodeRunner COMPLETE *****"); /* We may not need the following, now should be handled by context service */ /* RETURN_VALUE="http://danube.ucs.indiana.edu:6011/temp.xml"; */ /* Store data in context registry */ /* The value is comma seperated for now, changes may be made later */ /* First part points to the GML formatted results file */ /* Second part points to the PDF file generated from the deltaP.xyz file */ hrt.reset(); hrt.start(); WSContext.put("context://GIS/PI", "http://gf7.ucs.indiana.edu:6011/deltaP.xyz"); hrt.stop(); t_contextPut2 = hrt.duration; /* l.info("Context SET final value: ", ""+hrt.duration); */ l.info("* PI# " + t_contextPut1 + " " + t_flow + " " + t_contextPut2, ""); l.close();