Repository: airavata
Updated Branches:
  refs/heads/master ff380e00f -> 9bcef2c04


Adding phasta to sample applications


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9bcef2c0
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9bcef2c0
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9bcef2c0

Branch: refs/heads/master
Commit: 9bcef2c04a8306a0e56ac9a77d4bc5a893488a32
Parents: ff380e0
Author: Suresh Marru <[email protected]>
Authored: Mon Oct 20 15:34:51 2014 -0400
Committer: Suresh Marru <[email protected]>
Committed: Mon Oct 20 15:34:51 2014 -0400

----------------------------------------------------------------------
 .../tools/RegisterSampleApplications.java       | 50 +++++++++++++++++++-
 1 file changed, 48 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/9bcef2c0/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git 
a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
 
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 789b475..a92ec73 100644
--- 
a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ 
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -74,6 +74,7 @@ public class RegisterSampleApplications {
     private static final String nwChemName = "NWChem";
     private static final String trinityName = "Trinity";
     private static final String wrfName = "WRF";
+    private static final String phastaName = "PHASTA";
 
     //Appplication Descriptions
     private static final String echoDescription = "A Simple Echo Application";
@@ -85,6 +86,7 @@ public class RegisterSampleApplications {
     private static final String nwChemDescription = "Ab initio computational 
chemistry software package";
     private static final String trinityDescription = "de novo reconstruction 
of transcriptomes from RNA-seq data";
     private static final String wrfDescription = "Weather Research and 
Forecasting";
+    private static final String phastaDescription = "Computational fluid 
dynamics solver";
 
     //App Module Id's
     private static String echoModuleId;
@@ -96,6 +98,7 @@ public class RegisterSampleApplications {
     private static String nwChemModuleId = 
"NWChem_edbc318d-4c41-46a7-b216-32bad71eabdd";
     private static String trinityModuleId = 
"Trinity_8af45ca0-b628-4614-9087-c7b73f5f2fb6";
     private static String wrfModuleId;
+    private static String phastaModuleId;
 
     //App Interface Id's
     private static String echoInterfaceId = "";
@@ -108,6 +111,7 @@ public class RegisterSampleApplications {
     private static String nwChemInterfaceId = "";
     private static String trinityInterfaceId = "";
     private static String wrfInterfaceId;
+    private static String phastaInterfaceId;
 
     public RegisterSampleApplications(Airavata.Client airavataClient) {
            this.airavataClient = airavataClient;
@@ -201,8 +205,6 @@ public class RegisterSampleApplications {
                
                fsdResourceId = 
airavataClient.registerComputeResource(computeResourceDescription);
                
-               
-               
                if (fsdResourceId.isEmpty())
                        throw new AiravataClientException();
                
@@ -282,6 +284,12 @@ public class RegisterSampleApplications {
                             wrfName, "3.5.1", wrfDescription));
             System.out.println("WRF Module Id " + wrfModuleId);
 
+            //Register PHASTA
+            phastaModuleId = airavataClient.registerApplicationModule(
+                    RegisterSampleApplicationsUtils.createApplicationModule(
+                            phastaName, "1.0", phastaDescription));
+            System.out.println("phasta Module Id " + phastaModuleId);
+
         } catch (TException e) {
             e.printStackTrace();
         }
@@ -824,6 +832,44 @@ public class RegisterSampleApplications {
         }
     }
 
+    public void registerPhastaInterface() {
+        try {
+            System.out.println("#### Registering PHASTA Interface #### \n");
+
+            List<String> appModules = new ArrayList<String>();
+            appModules.add(phastaModuleId);
+
+            InputDataObjectType input1 = 
RegisterSampleApplicationsUtils.createAppInput("Parasolid_Geometric_Model", 
null,
+                    DataType.URI, null, false, "Parasolid geometric model - 
geom.xmt_txt", null);
+
+            InputDataObjectType input2 = 
RegisterSampleApplicationsUtils.createAppInput("Problem_Definition", null,
+                    DataType.URI, null, false, "problem definition - 
geom.smd", null);
+
+            InputDataObjectType input3 = 
RegisterSampleApplicationsUtils.createAppInput("Mesh_Description_File", null,
+                    DataType.URI, null, false, "Mesh Description - geom.sms", 
null);
+
+            List<InputDataObjectType> applicationInputs = new 
ArrayList<InputDataObjectType>();
+            applicationInputs.add(input1);
+            applicationInputs.add(input2);
+            applicationInputs.add(input3);
+
+            OutputDataObjectType output1 = 
RegisterSampleApplicationsUtils.createAppOutput("PHASTA_Execution_Log",null,DataType.URI);
+            OutputDataObjectType output2 = 
RegisterSampleApplicationsUtils.createAppOutput("PHASTA_Output_tar",null,DataType.URI);
+
+            List<OutputDataObjectType> applicationOutputs = new 
ArrayList<OutputDataObjectType>();
+            applicationOutputs.add(output1);
+            applicationOutputs.add(output2);
+
+            amberInterfaceId = airavataClient.registerApplicationInterface(
+                    
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(phastaName,
 phastaDescription,
+                            appModules, applicationInputs, 
applicationOutputs));
+            System.out.println("phasta Application Interface Id " + 
phastaInterfaceId);
+
+        } catch (TException e) {
+            e.printStackTrace();
+        }
+    }
+
     public void registerLocalApps (){
         try {
             System.out.println("#### Registering Application Deployments on 
Localhost #### \n");

Reply via email to