use of org.apache.airavata.model.application.io.InputDataObjectType in project airavata by apache.
the class RegisterSampleApplications method registerWRFInterface.
public void registerWRFInterface() {
try {
System.out.println("#### Registering WRF Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(wrfModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Config_Namelist_File", null, DataType.URI, null, 1, true, true, false, "Namelist Configuration File - namelist.input", null);
InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("WRF_Initial_Conditions", null, DataType.URI, null, 2, true, true, false, "Initial Conditions File - wrfinput_d01", null);
InputDataObjectType input3 = RegisterSampleApplicationsUtils.createAppInput("WRF_Boundary_File", null, DataType.URI, null, 3, true, true, false, "Boundary Conditions File - wrfbdy_d01", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
applicationInputs.add(input2);
applicationInputs.add(input3);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("WRF_Output", "", DataType.URI, true, true, null);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("WRF_Execution_Log", "", DataType.URI, true, true, null);
OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", null, DataType.STDOUT, true, true, null);
OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", null, DataType.STDERR, true, true, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
applicationOutputs.add(output3);
applicationOutputs.add(output4);
wrfInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(wrfName, wrfDescription, appModules, applicationInputs, applicationOutputs));
System.out.println("WRF Application Interface Id " + wrfInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.application.io.InputDataObjectType in project airavata by apache.
the class RegisterSampleApplications method registerLocalEchoInterface.
public void registerLocalEchoInterface() {
try {
System.out.println("#### Registering Echo Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(echoModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("echo_input", "echo_output=Hello World", DataType.STRING, null, 1, false, false, false, "A test string to Echo", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", "", DataType.STDOUT, false, false, null);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", "", DataType.STDERR, false, false, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
echoLocalInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(echoName, echoDescription, appModules, applicationInputs, applicationOutputs));
System.out.println("Local Echo Application Interface Id " + echoLocalInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.application.io.InputDataObjectType in project airavata by apache.
the class RegisterSampleApplications method registerUltrascanInterface.
private void registerUltrascanInterface() {
try {
System.out.println("#### Registering Ultrascan Application Interface ####");
List<String> appModules = new ArrayList<String>();
appModules.add(ultrascanModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("input", null, DataType.URI, null, 1, true, true, false, "input file", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("output/analysis-results.tar", "", DataType.URI, true, true, null);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", "", DataType.STDOUT, true, true, null);
OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", "", DataType.STDERR, true, true, null);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
applicationOutputs.add(output3);
String ultrascanInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Ultrascan", "Ultrascan application", appModules, applicationInputs, applicationOutputs));
System.out.println("Ultrascan Application Interface Id " + ultrascanInterfaceId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.application.io.InputDataObjectType in project airavata by apache.
the class RegisterUS3Application method registerUltrascanInterface.
public static void registerUltrascanInterface() {
try {
System.out.println("#### Registering WRF Interface #### \n");
List<String> appModules = new ArrayList<String>();
appModules.add(ultrascanModuleId);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("input", null, DataType.URI, null, 1, true, true, false, "input tar file", null);
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("output", "", DataType.URI, true, false, null);
// OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("stdout",
// "", DataType.URI);
// OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("stderr",
// "", DataType.URI);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
ultrascanAppId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("ultrascan", "ultrascan application", appModules, applicationInputs, applicationOutputs));
System.out.println("Ultrascan Application Interface Id " + ultrascanAppId);
} catch (TException e) {
e.printStackTrace();
}
}
use of org.apache.airavata.model.application.io.InputDataObjectType in project airavata by apache.
the class RegisterSampleApplicationsUtils method createAppInput.
public static InputDataObjectType createAppInput(String inputName, String value, DataType type, String applicationArgument, int order, boolean isRequired, boolean requiredToCMD, boolean stdIn, String description, String metadata) {
InputDataObjectType input = new InputDataObjectType();
// input.setIsEmpty(false);
if (inputName != null)
input.setName(inputName);
if (value != null)
input.setValue(value);
if (type != null)
input.setType(type);
if (applicationArgument != null)
input.setApplicationArgument(applicationArgument);
input.setInputOrder(order);
input.setIsRequired(isRequired);
input.setRequiredToAddedToCommandLine(requiredToCMD);
if (description != null)
input.setUserFriendlyDescription(description);
input.setStandardInput(stdIn);
if (metadata != null)
input.setMetaData(metadata);
return input;
}
Aggregations