Package org.datacontract.schemas._2004._07.trade

Examples of org.datacontract.schemas._2004._07.trade.ClientConfigResponse


      smr.setManipulationId(networkOrManipulationId);     
    smr.setTimestepsToRun(Integer.valueOf(propertiesConfig.getProperty("timestepsToRunDefault")));
    smr.setManipulationModelNodes(nodes);
    smr.setDescription(species.getName() + " " + propertiesConfig.getProperty("removeSpeciesTypeDescription"));

    ManipulationResponse response = null;
    try
    {
      response = (ManipulationResponse) svc.executeManipulationRequest(smr);
      //TODO: Write web service call to database
    }
    catch (RemoteException e)
    {
      e.printStackTrace();
    }
    String errMsg = response.getMessage();
    if (errMsg != null)
    {
      System.err.println("Error:" + errMsg);
      return null;
    }
    return response.getManipulationId();
  }
View Full Code Here


        NodeBiomass nba[] = (NodeBiomass[]) lNodeBiomass.toArray(new NodeBiomass[0]);
        smr.setNodeBiomasses(nba);
        smr.setDescription(propertiesConfig.getProperty("updateBiomassDescription"));
        smr.setSaveLastTimestepOnly(false);

        ManipulationResponse response = null;
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (Exception e) {
            e.printStackTrace();
        }

        logTime("Total Time (Update Biomass): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");
        String errMsg = response.getMessage();
        if (errMsg != null) {
            throw new SimulationException("Error (updateBiomass): " + errMsg);
        }
    }
View Full Code Here

        smr.setDescription( "updateSystemParameters");
        smr.setSaveLastTimestepOnly(false);
        if(nodes != null)
            smr.setManipulationModelNodes(nodes.toArray(new ManipulatingNode[]{} ));

        ManipulationResponse response = null;
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        String errMsg = response.getMessage();
        if (errMsg != null) {
            System.out.println("Error (updateSystemParameters): " + errMsg);
            return null;
        }
       
View Full Code Here

//        smr.setSysParams(this.CopySystemParameter(sParams));       
//        smr.setSysParams((ManipulatingParameter[])sParams.toArray());
        smr.setDescription( " " + propertiesConfig.getProperty("increaseCarryingCapacityDescription") + " " + propertiesConfig.getProperty("carryingCapacityDefault"));
        smr.setSaveLastTimestepOnly(false);

        ManipulationResponse response = null;
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        String errMsg = response.getMessage();
        if (errMsg != null) {
            System.out.println("Error (modifyingManipulatingParameters): " + errMsg);
            return null;
        }
        return response;
View Full Code Here

        smr.setTimestepsToRun(timestepsToRun);
        smr.setDescription("Serengetti sub foodweb stability test - netId:" + netId);
        smr.setSaveLastTimestepOnly(false);
//        smr.setSysParams(sysParams);

        ManipulationResponse response = null;
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
        } catch (RemoteException e) {
            e.printStackTrace();
        }

        logTime("Total Time (Run): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");

        String errMsg = response.getMessage();
        if (errMsg != null) {
            System.out.println("Error (run): " + errMsg);
            return null;
        } else {
            System.out.println("manpId:" + response.getManipulationId());
        }

        return response;
    }
View Full Code Here

            smr.setBeginingTimestepIdx(startTimestep);
            smr.setTimestepsToRun(runTimestep);
            smr.setManipulationId(manipulationId);
            smr.setSaveLastTimestepOnly(false);

            ManipulationResponse response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            String errMsg = response.getMessage();
            if (errMsg != null) {
                System.out.println("Error (run): " + errMsg);
            } else {
                System.out.println("Manipulation was successfully operated with manipulation id " + response.getManipulationId());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

        return mSpecies;
    }       
               
        public void getPredictionTest(String foodwebName)
        {
            ManipulationResponse response = this.createDefaultSubFoodweb(foodwebName);           
            String manipulationId = response.getManipulationId();
            String netId = response.getNetworksId();
           
            this.getPredictionTest(null, manipulationId, 1);
           
            SpeciesZoneType szt3 = new SpeciesZoneType("test6", 8, 3, 20, 8.0, SpeciesTypeEnum.ANIMAL);  
            this.getPredictionTest(szt3, manipulationId, 2);           
View Full Code Here

            if(nodeList == null)
                return "nodeList is null";
            String netId = createSeregenttiSubFoodweb(foodwebName, nodeList, overwrite);
            System.out.println("netId:"+ netId);
            ManipulationResponse mr= this.run(beginingTimestep, timestepsToRun, netId, true);
           
//            getBiomassInfo(mr.getManipulationId());
//            deleteManipulation(mr.getManipulationId());
            if(mr == null || mr.getMessage() != null)
                return null;
            logTime("Total Time (Create and Run Serengeti Sub-Food Web): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");
            return mr.getManipulationId();
        }
View Full Code Here

    public void getBiomass(String manipulationId, int nodeIndex, int timestep) throws SimulationException {
        long milliseconds = System.currentTimeMillis();
       
        if(timestep >= 0)
        {
            ManipulationTimestepInfoRequest req = new ManipulationTimestepInfoRequest();
            req.setManipulationId(manipulationId);
            req.setIsNodeTimestep(true);
            req.setNodeIdx(nodeIndex);
            req.setTimestep(timestep);

            ManipulationTimestepInfoResponse response = null;
            try {
                response = (ManipulationTimestepInfoResponse) svc.executeRequest(req);
            } catch (RemoteException e) {
View Full Code Here

        int curPage = 1;
        int curTimestep = -1;

        try {
            while (!finished) {
                ManipulationTimestepInfoRequest req = new ManipulationTimestepInfoRequest();
                req.setManipulationId(MANIPULATION_ID);
                req.setIsNodeTimestep(true); // getting node time step
                req.setNodeIdx(0); // set node index to 3
                req.setTimestep(0); // set time step to 5
//                req.setPage(curPage);

                ManipulationTimestepInfoResponse response = (ManipulationTimestepInfoResponse) svc.executeRequest(req);
                ManipulationTimestepInfo[] infos = response.getManipulationTimestepInfos();
View Full Code Here

TOP

Related Classes of org.datacontract.schemas._2004._07.trade.ClientConfigResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.