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

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


        // list manipulations of user
        try {
            ManipulationInfoRequest req = new ManipulationInfoRequest();
            req.setUser(user);

            ManipulationInfoResponse res = (ManipulationInfoResponse) svc.executeRequest(req);
            //TODO: Write web service call to database
            ManipulationInfo[] infos = res.getManipulationInfos();
            for (int i = 0; i < infos.length; i++) {
                System.out.println("\n\nManipulated network: " + infos[i].getNetworkName() + "\nManipulation id: " + infos[i].getManipulationId());
            }
        } catch (Exception e) {
            System.err.println("Error:" + e.getMessage());
View Full Code Here


    }
   
   
    public ManipulatingParameter[] getSystemParameterInfos(String manpId)
    {
        ManipulationParameterInfoRequest request = new ManipulationParameterInfoRequest();
        request.setUser(user);
        request.setManipulationId((manpId));
        request.setMode(SEARCH_MODE);
       

        ManipulationParameterInfoResponse response = new ManipulationParameterInfoResponse();
        try {
//            response = (ManipulationTimestepInfoResponse) svc.executeRequest(req);
View Full Code Here

        request.setUser(user);
        request.setManipulationId((manpId));
        request.setMode(SEARCH_MODE);
       

        ManipulationParameterInfoResponse response = new ManipulationParameterInfoResponse();
        try {
//            response = (ManipulationTimestepInfoResponse) svc.executeRequest(req);
            response = (ManipulationParameterInfoResponse) svc.executeRequest(request);
            //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.getManipulationInfos();       
    }
View Full Code Here

            SpeciesZoneType szt1 = new SpeciesZoneType(propertiesConfig.getProperty("defaultSpecies1Name"), 5, Integer.valueOf(propertiesConfig.getProperty("defaultSpecies1SpeciesCount")), Double.valueOf(propertiesConfig.getProperty("defaultSpecies1PerSpeciesBiomass")), 0.0, SpeciesTypeEnum.PLANT);
            SpeciesZoneType szt2 = new SpeciesZoneType(propertiesConfig.getProperty("defaultSpecies2Name"), 88, Integer.valueOf(propertiesConfig.getProperty("defaultSpecies2SpeciesCount")), Double.valueOf(propertiesConfig.getProperty("defaultSpecies2PerSpeciesBiomass")), 0.0, SpeciesTypeEnum.ANIMAL);
            speciesList.add(szt1);
            speciesList.add(szt2);           
            //Increasing carrying capacity of grass
            ManipulationResponse mResponse = modifyManipulatingParameters(speciesList, timestepIdx , true, response.getNetworkId());
           
            if(mResponse == null)
                return null;
            String manipulationId = mResponse.getManipulationId();
            String oldNetworkId = mResponse.getNetworksId();
//            deleteNetwork(response.getNetworkId()); // deleting old network made by NetworkCreationRequest
            //Increasing carrying capacity of buffalo
//            mResponse = modifyManipulatingParameters(szt2, timestepIdx, false, manipulationId);
//            deleteNetwork(oldNetworkId);  // deleting old network made by previous manipulation           
           
View Full Code Here

        smr.setNodeProperties(nps);
        smr.setSysParams(sysParams);
        smr.setDescription(" " + propertiesConfig.getProperty("addNewSpeciesTypeDescription"));
        smr.setSaveLastTimestepOnly(false);

        ManipulationResponse response = new ManipulationResponse();
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        logTime("Total Time (Add Multiple Species Type): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");
        String errMsg = response.getMessage();
        if (errMsg != null) {
            throw new SimulationException("Error (addMultipleSpeciesType): " + errMsg);
        }
        return response.getManipulationId();
    }   
View Full Code Here

        smr.setNodeProperties(nps);
        smr.setSysParams(sysParams);
        smr.setDescription(species.getName() + " " + propertiesConfig.getProperty("addNewSpeciesTypeDescription"));
        smr.setSaveLastTimestepOnly(false);

        ManipulationResponse response = new ManipulationResponse();
        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 (addNewSpeciesType): " + errMsg);
            return null;
        } else {
            logTime("Total Time (Add New Species Type): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");
            System.out.println("Adding: [" + species.getNodeIndex() + "] " + species.getName() + " " + species.getCurrentBiomass());
        }
        return response.getManipulationId();
    }
View Full Code Here

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

    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

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

    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

      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

TOP

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

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.