Package org.apache.airavata.schemas.gfac

Examples of org.apache.airavata.schemas.gfac.InputParameterType


        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();


        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName("input");
        ParameterType parameterType = input.addNewParameterType();
        parameterType.setType(DataType.URI);
        parameterType.setName("URI");

        OutputParameterType output = OutputParameterType.Factory.newInstance();
        output.setParameterName("output");
View Full Code Here


        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();


        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName("echo_input");
        ParameterType parameterType = input.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");

        OutputParameterType output = OutputParameterType.Factory.newInstance();
        output.setParameterName("echo_output");
View Full Code Here

        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
        serviceDescription.getType().setName(serviceName);
        serviceDescription.getType().setDescription("Echo service");
        // Creating input parameters
        InputParameterType parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("echo_input");
        parameter.setParameterDescription("echo input");
        ParameterType parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");
        inputParameters.add(parameter);

        // Creating output parameters
View Full Code Here

        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
        serviceDescription.getType().setName(serviceName);
        serviceDescription.getType().setDescription("Echo service");
        // Creating input parameters
        InputParameterType parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("echo_input");
        parameter.setParameterDescription("echo input");
        ParameterType parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");
        inputParameters.add(parameter);

        // Creating output parameters
View Full Code Here

        serv.getType().setName(serviceName);

        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();

        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName("echo_input");
        ParameterType parameterType = input.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");

        OutputParameterType output = OutputParameterType.Factory.newInstance();
        output.setParameterName("echo_output");
View Full Code Here

        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();


        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName("echo_input");
        ParameterType parameterType = input.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");

        OutputParameterType output = OutputParameterType.Factory.newInstance();
        output.setParameterName("echo_output");
        ParameterType parameterType1 = output.addNewParameterType();
        parameterType1.setType(DataType.STRING);
        parameterType1.setName("String");

        inputList.add(input);
        outputList.add(output);

        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
        OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);

        serv.getType().setInputParametersArray(inputParamList);
        serv.getType().setOutputParametersArray(outputParamList);
        try {
            airavataAPI.getApplicationManager().saveServiceDescription(serv);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue("EchoLocal");
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("sds128");

        QueueType queueType = app.addNewQueue();
        queueType.setQueueName("normal");

        app.setCpuCount(1);
        app.setJobType(JobTypeType.SERIAL);
        app.setNodeCount(1);
        app.setProcessorsPerNode(1);
        app.setMaxWallTime(10);
        /*
           * Use bat file if it is compiled on Windows
           */
        app.setExecutableLocation("/bin/echo");

        /*
           * Default tmp location
           */
        String tempDir = "/oasis/scratch/trestles/ogce/temp_project/";

    
        app.setScratchWorkingDirectory(tempDir);
        app.setInstalledParentPath("/opt/torque/bin/");

        try {
            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }

         /*
        * Service Description creation and saving
        */
        String wrfserviceName = "WRF";
        ServiceDescription wrfServ = new ServiceDescription();
        wrfServ.getType().setName(wrfserviceName);

        List<InputParameterType> wrfinputList = new ArrayList<InputParameterType>();
        List<OutputParameterType> wrfoutputList = new ArrayList<OutputParameterType>();


        InputParameterType wrfinput1 = InputParameterType.Factory.newInstance();
        wrfinput1.setParameterName("WRF_Namelist");
        ParameterType wrfparameterType1 = wrfinput1.addNewParameterType();
        wrfparameterType1.setType(DataType.URI);
        wrfparameterType1.setName("URI");

        InputParameterType wrfinput2 = InputParameterType.Factory.newInstance();
        wrfinput2.setParameterName("WRF_Input_File");
        ParameterType wrfparameterType2 = wrfinput2.addNewParameterType();
        wrfparameterType2.setType(DataType.URI);
        wrfparameterType2.setName("URI");

        InputParameterType wrfinput3 = InputParameterType.Factory.newInstance();
        wrfinput3.setParameterName("WRF_Boundary_File");
        ParameterType wrfparameterType3 = wrfinput3.addNewParameterType();
        wrfparameterType3.setType(DataType.URI);
        wrfparameterType3.setName("URI");

        OutputParameterType wrfOutput1 = OutputParameterType.Factory.newInstance();
        wrfOutput1.setParameterName("WRF_Output");
View Full Code Here

        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();


        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName("echo_input");
        ParameterType parameterType = input.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");

        OutputParameterType output = OutputParameterType.Factory.newInstance();
        output.setParameterName("echo_output");
View Full Code Here

        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();


        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName("echo_input");
        ParameterType parameterType = input.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");

        OutputParameterType output = OutputParameterType.Factory.newInstance();
        output.setParameterName("echo_output");
View Full Code Here

    List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
    List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
    serviceDescription.getType().setName(serviceName);
    serviceDescription.getType().setDescription("Echo service");
    // Creating input parameters
    InputParameterType parameter = InputParameterType.Factory.newInstance();
    parameter.setParameterName("echo_input");
    parameter.setParameterDescription("echo input");
    ParameterType parameterType = parameter.addNewParameterType();
    parameterType.setType(DataType.STRING);
    parameterType.setName("String");
    inputParameters.add(parameter);

    // Creating output parameters
View Full Code Here

            String paramType = (String) defaultTableModel.getValueAt(i, 2);
            String parameterDescription = (String) defaultTableModel.getValueAt(i, 3);
            if (parameterName != null && !parameterName.trim().equals("")) {
                // todo how to handle Enum
                if (getIOStringList()[0].equals(defaultTableModel.getValueAt(i, 0))) {
                    InputParameterType parameter = InputParameterType.Factory.newInstance();
                    parameter.setParameterName(parameterName);
                    parameter.setParameterDescription(parameterDescription);
                    ParameterType parameterType = parameter.addNewParameterType();
                    parameterType.setType(DataType.Enum.forString(paramType));
                    parameterType.setName(paramType);
                    inputParameters.add(parameter);

                } else {
                    OutputParameterType parameter = OutputParameterType.Factory.newInstance();
                    parameter.setParameterName(parameterName);
                    parameter.setParameterDescription(parameterDescription);
                    ParameterType parameterType = parameter.addNewParameterType();
                    parameterType.setType(DataType.Enum.forString(paramType));
                    parameterType.setName(paramType);
                    outputParameters.add(parameter);
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.airavata.schemas.gfac.InputParameterType

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.