You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2012/11/16 16:41:59 UTC
svn commit: r1410405 [1/2] - in /airavata/trunk/modules/rest/mappings: ./
src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/airavata/ src/main/java/org/apache/airavata/rest/
src/main/java/org/apache/air...
Author: chathuri
Date: Fri Nov 16 15:41:56 2012
New Revision: 1410405
URL: http://svn.apache.org/viewvc?rev=1410405&view=rev
Log: (empty)
Added:
airavata/trunk/modules/rest/mappings/
airavata/trunk/modules/rest/mappings/pom.xml
airavata/trunk/modules/rest/mappings/src/
airavata/trunk/modules/rest/mappings/src/main/
airavata/trunk/modules/rest/mappings/src/main/java/
airavata/trunk/modules/rest/mappings/src/main/java/org/
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptor.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptorList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ConfigurationList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/DescriptorNameList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentDataList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentIDList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptionList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptor.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/PublishWorkflowNamesList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptionList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptor.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceParameters.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/URLList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/Workflow.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowInstancesList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowNodeIODataList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkspaceProjectList.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/ApplicationDescriptorTypes.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/HostTypes.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/ResourcePathConstants.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/RestServicesConstants.java
airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/a.java
Added: airavata/trunk/modules/rest/mappings/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/pom.xml?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/pom.xml (added)
+++ airavata/trunk/modules/rest/mappings/pom.xml Fri Nov 16 15:41:56 2012
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under
+ the Apache License, Version 2.0 (theà "License"); you may not use this file except in compliance with the License. You may
+ obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
+ in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
+ the License. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>rest</artifactId>
+ <version>0.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>airavata-rest-mappings</artifactId>
+ <packaging>jar</packaging>
+ <name>airavata-rest-mappings</name>
+ <build>
+ <finalName>airavata-rest-mappings</finalName>
+ </build>
+ <dependencies>
+
+
+ <!-- Airavata -->
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-gfac-schema-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-registry-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- Logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${org.slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>${org.slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${org.slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${org.slf4j.version}</version>
+ </dependency>
+
+ </dependencies>
+ <properties>
+ <org.slf4j.version>1.6.1</org.slf4j.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <javaagent/>
+ </properties>
+ <repositories>
+ <repository>
+ <id>central</id>
+ <name>Maven Central</name>
+ <url>http://repo1.maven.org/maven2</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <name>ogce.m2.all</name>
+ <id>ogce.m2.all</id>
+ <url>http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all</url>
+ <snapshots>
+ <!--updatePolicy>daily</updatePolicy -->
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>m2-snapshot-repository</id>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>OW2</id>
+ <name>OW2 Repository</name>
+ <url>http://maven.ow2.org/maven2</url>
+ </repository>
+ </repositories>
+</project>
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptor.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptor.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptor.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,173 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "application")
+public class ApplicationDescriptor {
+ private String name;
+ private String hostdescName;
+// private String serviceName;
+ private String executablePath;
+ private String workingDir;
+ private String jobType;
+ private String projectNumber;
+ private String queueName;
+ private int maxWallTime;
+ private int cpuCount;
+ private int nodeCount;
+ private int processorsPerNode;
+ private int minMemory;
+ private int maxMemory;
+ private String applicationDescType;
+ private ServiceDescriptor serviceDescriptor;
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getHostdescName() {
+ return hostdescName;
+ }
+
+ public void setHostdescName(String hostdescName) {
+ this.hostdescName = hostdescName;
+ }
+
+// public String getServiceName() {
+// return serviceName;
+// }
+//
+// public void setServiceName(String serviceName) {
+// this.serviceName = serviceName;
+// }
+
+ public String getExecutablePath() {
+ return executablePath;
+ }
+
+ public void setExecutablePath(String executablePath) {
+ this.executablePath = executablePath;
+ }
+
+ public String getWorkingDir() {
+ return workingDir;
+ }
+
+ public void setWorkingDir(String workingDir) {
+ this.workingDir = workingDir;
+ }
+
+ public String getJobType() {
+ return jobType;
+ }
+
+ public void setJobType(String jobType) {
+ this.jobType = jobType;
+ }
+
+ public String getProjectNumber() {
+ return projectNumber;
+ }
+
+ public void setProjectNumber(String projectNumber) {
+ this.projectNumber = projectNumber;
+ }
+
+ public String getQueueName() {
+ return queueName;
+ }
+
+ public void setQueueName(String queueName) {
+ this.queueName = queueName;
+ }
+
+ public int getMaxWallTime() {
+ return maxWallTime;
+ }
+
+ public void setMaxWallTime(int maxWallTime) {
+ this.maxWallTime = maxWallTime;
+ }
+
+ public int getCpuCount() {
+ return cpuCount;
+ }
+
+ public void setCpuCount(int cpuCount) {
+ this.cpuCount = cpuCount;
+ }
+
+ public int getNodeCount() {
+ return nodeCount;
+ }
+
+ public void setNodeCount(int nodeCount) {
+ this.nodeCount = nodeCount;
+ }
+
+ public int getProcessorsPerNode() {
+ return processorsPerNode;
+ }
+
+ public void setProcessorsPerNode(int processorsPerNode) {
+ this.processorsPerNode = processorsPerNode;
+ }
+
+ public int getMinMemory() {
+ return minMemory;
+ }
+
+ public void setMinMemory(int minMemory) {
+ this.minMemory = minMemory;
+ }
+
+ public int getMaxMemory() {
+ return maxMemory;
+ }
+
+ public void setMaxMemory(int maxMemory) {
+ this.maxMemory = maxMemory;
+ }
+
+ public String getApplicationDescType() {
+ return applicationDescType;
+ }
+
+ public void setApplicationDescType(String applicationDescType) {
+ this.applicationDescType = applicationDescType;
+ }
+
+ public ServiceDescriptor getServiceDescriptor() {
+ return serviceDescriptor;
+ }
+
+ public void setServiceDescriptor(ServiceDescriptor serviceDescriptor) {
+ this.serviceDescriptor = serviceDescriptor;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptorList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptorList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptorList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ApplicationDescriptorList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,40 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ApplicationDescriptorList {
+ private ApplicationDescriptor[] applicationDescriptors = new ApplicationDescriptor[]{};
+
+ public ApplicationDescriptorList() {
+ }
+
+ public ApplicationDescriptor[] getApplicationDescriptors() {
+ return applicationDescriptors;
+ }
+
+ public void setApplicationDescriptors(ApplicationDescriptor[] applicationDescriptors) {
+ this.applicationDescriptors = applicationDescriptors;
+ }
+}
+
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ConfigurationList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ConfigurationList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ConfigurationList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ConfigurationList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,37 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ConfigurationList {
+
+ private Object[] configValList = new Object[]{};
+
+ public Object[] getConfigValList() {
+ return configValList;
+ }
+
+ public void setConfigValList(Object[] configValList) {
+ this.configValList = configValList;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/DescriptorNameList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/DescriptorNameList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/DescriptorNameList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/DescriptorNameList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,42 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement
+public class DescriptorNameList {
+ private List<String> descriptorNames = new ArrayList<String>();
+
+ public DescriptorNameList() {
+ }
+
+ public List<String> getDescriptorNames() {
+ return descriptorNames;
+ }
+
+ public void setDescriptorNames(List<String> descriptorNames) {
+ this.descriptorNames = descriptorNames;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentDataList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentDataList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentDataList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentDataList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,45 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement
+public class ExperimentDataList {
+ private List<ExperimentDataImpl> experimentDataList = new ArrayList<ExperimentDataImpl>();
+
+ public ExperimentDataList() {
+ }
+
+ public List<ExperimentDataImpl> getExperimentDataList() {
+ return experimentDataList;
+ }
+
+ public void setExperimentDataList(List<ExperimentDataImpl> experimentDataList) {
+ this.experimentDataList = experimentDataList;
+ }
+}
+
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentIDList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentIDList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentIDList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentIDList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,42 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement(name = "experiments")
+public class ExperimentIDList {
+ List<String> experimentIDList = new ArrayList<String>();
+
+ public ExperimentIDList() {
+ }
+
+ public List<String> getExperimentIDList() {
+ return experimentIDList;
+ }
+
+ public void setExperimentIDList(List<String> experimentIDList) {
+ this.experimentIDList = experimentIDList;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ExperimentList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,41 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import org.apache.airavata.registry.api.AiravataExperiment;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ExperimentList {
+ private AiravataExperiment[] experiments = new AiravataExperiment[]{};
+
+ public ExperimentList() {
+ }
+
+ public AiravataExperiment[] getExperiments() {
+ return experiments;
+ }
+
+ public void setExperiments(AiravataExperiment[] experiments) {
+ this.experiments = experiments;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptionList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptionList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptionList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptionList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,41 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class HostDescriptionList {
+ private HostDescriptor[] hostDescriptions = new HostDescriptor[]{};
+
+ public HostDescriptor[] getHostDescriptions() {
+ return hostDescriptions;
+ }
+
+ public void setHostDescriptions(HostDescriptor[] hostDescriptions) {
+ this.hostDescriptions = hostDescriptions;
+ }
+
+
+
+
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptor.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptor.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/HostDescriptor.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,101 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+@XmlRootElement(name = "host")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class HostDescriptor {
+
+ private String hostname;
+ private String hostAddress;
+
+ private List<String> hostType = new ArrayList<String>();
+ private List<String> gridFTPEndPoint = new ArrayList<String>();
+ private List<String> globusGateKeeperEndPoint = new ArrayList<String>();
+ private List<String> imageID = new ArrayList<String>();
+ private List<String> instanceID = new ArrayList<String>();
+
+ public String getHostname() {
+ return hostname;
+ }
+
+ public void setHostname(String hostname) {
+ this.hostname = hostname;
+ }
+
+ public String getHostAddress() {
+ return hostAddress;
+ }
+
+ public void setHostAddress(String hostAddress) {
+ this.hostAddress = hostAddress;
+ }
+
+ public List<String> getHostType() {
+ return hostType;
+ }
+
+ public void setHostType(List<String> hostType) {
+ this.hostType = hostType;
+ }
+
+ public List<String> getGridFTPEndPoint() {
+ return gridFTPEndPoint;
+ }
+
+ public void setGridFTPEndPoint(List<String> gridFTPEndPoint) {
+ this.gridFTPEndPoint = gridFTPEndPoint;
+ }
+
+ public List<String> getGlobusGateKeeperEndPoint() {
+ return globusGateKeeperEndPoint;
+ }
+
+ public void setGlobusGateKeeperEndPoint(List<String> globusGateKeeperEndPoint) {
+ this.globusGateKeeperEndPoint = globusGateKeeperEndPoint;
+ }
+
+ public List<String> getImageID() {
+ return imageID;
+ }
+
+ public void setImageID(List<String> imageID) {
+ this.imageID = imageID;
+ }
+
+ public List<String> getInstanceID() {
+ return instanceID;
+ }
+
+ public void setInstanceID(List<String> instanceID) {
+ this.instanceID = instanceID;
+ }
+
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/PublishWorkflowNamesList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/PublishWorkflowNamesList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/PublishWorkflowNamesList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/PublishWorkflowNamesList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,40 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class PublishWorkflowNamesList {
+ private List<String> publishWorkflowNames = new ArrayList<String>();
+
+ public PublishWorkflowNamesList() {
+ }
+
+ public List<String> getPublishWorkflowNames() {
+ return publishWorkflowNames;
+ }
+
+ public void setPublishWorkflowNames(List<String> publishWorkflowNames) {
+ this.publishWorkflowNames = publishWorkflowNames;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptionList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptionList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptionList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptionList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,36 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ServiceDescriptionList {
+ private ServiceDescriptor[] serviceDescriptions = new ServiceDescriptor[]{};
+
+ public ServiceDescriptor[] getServiceDescriptions() {
+ return serviceDescriptions;
+ }
+
+ public void setServiceDescriptions(ServiceDescriptor[] serviceDescriptions) {
+ this.serviceDescriptions = serviceDescriptions;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptor.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptor.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceDescriptor.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,68 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "service")
+public class ServiceDescriptor {
+
+ private String serviceName;
+ private String description;
+ private List<ServiceParameters> inputParams = new ArrayList<ServiceParameters>();
+ private List<ServiceParameters> outputParams = new ArrayList<ServiceParameters>();
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public List<ServiceParameters> getInputParams() {
+ return inputParams;
+ }
+
+ public void setInputParams(List<ServiceParameters> inputParams) {
+ this.inputParams = inputParams;
+ }
+
+ public List<ServiceParameters> getOutputParams() {
+ return outputParams;
+ }
+
+ public void setOutputParams(List<ServiceParameters> outputParams) {
+ this.outputParams = outputParams;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceParameters.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceParameters.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceParameters.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/ServiceParameters.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,63 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+@XmlRootElement
+public class ServiceParameters {
+
+ // whether string or other type
+ String type;
+ String name;
+
+ //whether it is input or output
+ String dataType;
+ String description;
+
+ public String getType() {
+ return type;
+ }
+ public void setType(String type) {
+ this.type = type;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getDataType() {
+ return dataType;
+ }
+ public void setDataType(String dataType) {
+ this.dataType = dataType;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/URLList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/URLList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/URLList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/URLList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,38 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class URLList {
+ private String[] uris = new String[]{};
+
+ public String[] getUris() {
+ return uris;
+ }
+
+ public void setUris(String[] uris) {
+ this.uris = uris;
+ }
+
+
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/Workflow.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/Workflow.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/Workflow.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/Workflow.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,49 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class Workflow {
+ private String workflowName;
+ private String workflowGraph;
+
+ public Workflow() {
+ }
+
+ public String getWorkflowName() {
+ return workflowName;
+ }
+
+ public String getWorkflowGraph() {
+ return workflowGraph;
+ }
+
+ public void setWorkflowName(String workflowName) {
+ this.workflowName = workflowName;
+ }
+
+ public void setWorkflowGraph(String workflowGraph) {
+ this.workflowGraph = workflowGraph;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowInstancesList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowInstancesList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowInstancesList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowInstancesList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,38 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import org.apache.airavata.registry.api.workflow.WorkflowInstance;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkflowInstancesList {
+ WorkflowInstance[] workflowInstances = new WorkflowInstance[]{};
+
+ public WorkflowInstance[] getWorkflowInstances() {
+ return workflowInstances;
+ }
+
+ public void setWorkflowInstances(WorkflowInstance[] workflowInstances) {
+ this.workflowInstances = workflowInstances;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,42 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement
+public class WorkflowList {
+ private List<Workflow> workflowList = new ArrayList<Workflow>();
+
+ public WorkflowList() {
+ }
+
+ public List<Workflow> getWorkflowList() {
+ return workflowList;
+ }
+
+ public void setWorkflowList(List<Workflow> workflowList) {
+ this.workflowList = workflowList;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowNodeIODataList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowNodeIODataList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowNodeIODataList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkflowNodeIODataList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,40 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+
+
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkflowNodeIODataList {
+ WorkflowNodeIOData[] workflowNodeIOData = new WorkflowNodeIOData[]{};
+
+ public WorkflowNodeIOData[] getWorkflowNodeIOData() {
+ return workflowNodeIOData;
+ }
+
+ public void setWorkflowNodeIOData(WorkflowNodeIOData[] workflowNodeIOData) {
+ this.workflowNodeIOData = workflowNodeIOData;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkspaceProjectList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkspaceProjectList.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkspaceProjectList.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/resourcemappings/WorkspaceProjectList.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,42 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.airavata.rest.mappings.resourcemappings;
+
+
+import org.apache.airavata.registry.api.WorkspaceProject;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkspaceProjectList {
+ private WorkspaceProject[] workspaceProjects = new WorkspaceProject[]{};
+
+ public WorkspaceProjectList() {
+ }
+
+ public WorkspaceProject[] getWorkspaceProjects() {
+ return workspaceProjects;
+ }
+
+ public void setWorkspaceProjects(WorkspaceProject[] workspaceProjects) {
+ this.workspaceProjects = workspaceProjects;
+ }
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/ApplicationDescriptorTypes.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/ApplicationDescriptorTypes.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/ApplicationDescriptorTypes.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/ApplicationDescriptorTypes.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,29 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.utils;
+
+public class ApplicationDescriptorTypes {
+ public static final String APP_DEP_DESC_TYPE = "Default";
+ public static final String BATCH_APP_DEP_DESC_TYPE = "Batch";
+ public static final String GRAM_APP_DEP_DESC_TYPE = "Gram";
+ public static final String HADOOP_APP_DEP_DESC_TYPE = "Hadoop";
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,332 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.utils;
+
+import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
+import org.apache.airavata.commons.gfac.type.HostDescription;
+import org.apache.airavata.commons.gfac.type.ServiceDescription;
+import org.apache.airavata.rest.mappings.resourcemappings.ApplicationDescriptor;
+import org.apache.airavata.rest.mappings.resourcemappings.HostDescriptor;
+import org.apache.airavata.rest.mappings.resourcemappings.ServiceDescriptor;
+import org.apache.airavata.rest.mappings.resourcemappings.ServiceParameters;
+import org.apache.airavata.schemas.gfac.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DescriptorUtil {
+
+ public static HostDescription createHostDescription(String hostName, String hostAddress,
+ String hostEndpoint, String gatekeeperEndpoint) {
+ HostDescription host = new HostDescription();
+ if("".equalsIgnoreCase(gatekeeperEndpoint) || "".equalsIgnoreCase(hostEndpoint)) {
+ host.getType().changeType(GlobusHostType.type);
+ host.getType().setHostName(hostName);
+ host.getType().setHostAddress(hostAddress);
+ ((GlobusHostType) host.getType()).
+ setGridFTPEndPointArray(new String[]{hostEndpoint});
+ ((GlobusHostType) host.getType()).
+ setGlobusGateKeeperEndPointArray(new String[]{gatekeeperEndpoint});
+ } else {
+ host.getType().setHostName(hostName);
+ host.getType().setHostAddress(hostAddress);
+ }
+ return host;
+ }
+
+ public static ApplicationDeploymentDescription registerApplication(String appName, String exeuctableLocation, String scratchWorkingDirectory, String hostName,
+ String projAccNumber, String queueName, String cpuCount, String nodeCount, String maxMemory) throws Exception {
+ // Create Application Description
+ ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription(GramApplicationDeploymentType.type);
+ GramApplicationDeploymentType app = (GramApplicationDeploymentType) appDesc.getType();
+ app.setCpuCount(Integer.parseInt(cpuCount));
+ app.setNodeCount(Integer.parseInt(nodeCount));
+ ApplicationDeploymentDescriptionType.ApplicationName name = appDesc.getType().addNewApplicationName();
+ name.setStringValue(appName);
+ app.setExecutableLocation(exeuctableLocation);
+ app.setScratchWorkingDirectory(scratchWorkingDirectory);
+ ProjectAccountType projectAccountType = ((GramApplicationDeploymentType) appDesc.getType()).addNewProjectAccount();
+ projectAccountType.setProjectAccountNumber(projAccNumber);
+ QueueType queueType = app.addNewQueue();
+ queueType.setQueueName(queueName);
+ app.setMaxMemory(Integer.parseInt(maxMemory));
+ return appDesc;
+ }
+
+ public static ServiceDescription getServiceDescription(String serviceName, String inputName, String inputType,
+ String outputName, String outputType) {
+ // Create Service Description
+ ServiceDescription serv = new ServiceDescription();
+ serv.getType().setName(serviceName);
+
+ InputParameterType input = InputParameterType.Factory.newInstance();
+ input.setParameterName(inputName);
+ ParameterType parameterType = input.addNewParameterType();
+ parameterType.setType(DataType.Enum.forString(inputType));
+ parameterType.setName(inputName);
+ List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+ inputList.add(input);
+ InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
+ .size()]);
+
+ OutputParameterType output = OutputParameterType.Factory.newInstance();
+ output.setParameterName(outputName);
+ ParameterType parameterType1 = output.addNewParameterType();
+ parameterType1.setType(DataType.Enum.forString(outputType));
+ parameterType1.setName(outputName);
+ List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+ outputList.add(output);
+ OutputParameterType[] outputParamList = outputList
+ .toArray(new OutputParameterType[outputList.size()]);
+ serv.getType().setInputParametersArray(inputParamList);
+ serv.getType().setOutputParametersArray(outputParamList);
+ return serv;
+ }
+
+
+ public static HostDescriptor createHostDescriptor (HostDescription hostDescription){
+ List<String> hostType = new ArrayList<String>();
+ List<String> gridFTPEndPoint = new ArrayList<String>();
+ List<String> globusGateKeeperEndPoint = new ArrayList<String>();
+ List<String> imageID = new ArrayList<String>();
+ List<String> instanceID = new ArrayList<String>();
+
+ HostDescriptor hostDescriptor = new HostDescriptor();
+ hostDescriptor.setHostname(hostDescription.getType().getHostName());
+ hostDescriptor.setHostAddress(hostDescription.getType().getHostAddress());
+
+ HostDescriptionType hostDescriptionType = hostDescription.getType();
+ if (hostDescriptionType instanceof GlobusHostType){
+ GlobusHostType globusHostType = (GlobusHostType) hostDescriptionType;
+ hostType.add(HostTypes.GLOBUS_HOST_TYPE);
+ String[] globusGateKeeperEndPointArray = globusHostType.getGlobusGateKeeperEndPointArray();
+ for (int i = 0; i < globusGateKeeperEndPointArray.length ; i++){
+ globusGateKeeperEndPoint.add(globusGateKeeperEndPointArray[i]);
+ }
+
+ String[] gridFTPEndPointArray = globusHostType.getGridFTPEndPointArray();
+ for (int i = 0; i < gridFTPEndPointArray.length ; i++){
+ gridFTPEndPoint.add(globusGateKeeperEndPointArray[i]);
+ }
+
+ }else if (hostDescriptionType instanceof GsisshHostType){
+ GsisshHostType gsisshHostType = (GsisshHostType) hostDescriptionType;
+ hostType.add(HostTypes.GSISSH_HOST_TYPE);
+
+ String[] gridFTPEndPointArray = gsisshHostType.getGridFTPEndPointArray();
+ for (int i = 0; i < gridFTPEndPointArray.length ; i++){
+ gridFTPEndPoint.add(gridFTPEndPointArray[i]);
+ }
+ } else if (hostDescriptionType instanceof Ec2HostType) {
+ Ec2HostType ec2HostType = (Ec2HostType) hostDescriptionType;
+ hostType.add(HostTypes.EC2_HOST_TYPE);
+
+ String[] imageIDArray = ec2HostType.getImageIDArray();
+ for (int i = 0; i < imageIDArray.length ; i++){
+ imageID.add(imageIDArray[i]);
+ }
+
+ String[] instanceIDArray = ec2HostType.getInstanceIDArray();
+ for (int i = 0; i < instanceIDArray.length ; i++){
+ instanceID.add(instanceIDArray[i]);
+ }
+ } else {
+ hostType.add(HostTypes.HOST_DESCRIPTION_TYPE);
+ }
+ hostDescriptor.setGlobusGateKeeperEndPoint(globusGateKeeperEndPoint);
+ hostDescriptor.setGridFTPEndPoint(gridFTPEndPoint);
+ hostDescriptor.setImageID(imageID);
+ hostDescriptor.setInstanceID(instanceID);
+ hostDescriptor.setHostType(hostType);
+ return hostDescriptor;
+ }
+
+ public static HostDescription createHostDescription (HostDescriptor hostDescriptor){
+ HostDescription hostDescription = new HostDescription();
+ hostDescription.getType().setHostAddress(hostDescriptor.getHostAddress());
+ hostDescription.getType().setHostName(hostDescriptor.getHostname());
+
+ if (hostDescriptor.getHostType() != null && !hostDescriptor.getHostType().isEmpty()) {
+ if (hostDescriptor.getHostType().equals(HostTypes.GLOBUS_HOST_TYPE)) {
+ ((GlobusHostType) hostDescription.getType()).addGlobusGateKeeperEndPoint(hostDescriptor.getGlobusGateKeeperEndPoint().get(0));
+ ((GlobusHostType) hostDescription.getType()).addGridFTPEndPoint(hostDescriptor.getGridFTPEndPoint().get(0));
+ } else if (hostDescriptor.getHostType().equals(HostTypes.GSISSH_HOST_TYPE)) {
+ ((GsisshHostType) hostDescription).addGridFTPEndPoint(hostDescriptor.getGridFTPEndPoint().get(0));
+ } else if (hostDescriptor.getHostType().equals(HostTypes.EC2_HOST_TYPE)) {
+ ((Ec2HostType) hostDescription).addImageID(hostDescriptor.getImageID().get(0));
+ ((Ec2HostType) hostDescription).addInstanceID(hostDescriptor.getInstanceID().get(0));
+ }
+ }
+
+ return hostDescription;
+ }
+
+ public static ServiceDescription createServiceDescription (ServiceDescriptor serviceDescriptor){
+ ServiceDescription serviceDescription = new ServiceDescription();
+ serviceDescription.getType().setName(serviceDescriptor.getServiceName());
+ serviceDescription.getType().setDescription(serviceDescriptor.getDescription());
+ List<ServiceParameters> inputParams = serviceDescriptor.getInputParams();
+ InputParameterType[] inputParameterTypeArray = new InputParameterType[inputParams.size()];
+ for (int i = 0; i < inputParams.size(); i++){
+ InputParameterType parameter = InputParameterType.Factory.newInstance();
+ parameter.setParameterName(inputParams.get(i).getName());
+ parameter.setParameterValueArray(new String[]{inputParams.get(i).getName()});
+ ParameterType parameterType = parameter.addNewParameterType();
+ parameterType.setType(DataType.Enum.forString(inputParams.get(i).getType()));
+ parameterType.setName(inputParams.get(i).getType());
+ parameter.setParameterType(parameterType);
+ inputParameterTypeArray[i] = parameter;
+ }
+ serviceDescription.getType().setInputParametersArray(inputParameterTypeArray);
+
+ List<ServiceParameters> outputParams = serviceDescriptor.getOutputParams();
+ OutputParameterType[] outputParameterTypeArray = new OutputParameterType[outputParams.size()];
+ for (int i = 0; i < outputParams.size(); i++){
+ OutputParameterType parameter = OutputParameterType.Factory.newInstance();
+ parameter.setParameterName(outputParams.get(i).getName());
+ ParameterType parameterType = parameter.addNewParameterType();
+ parameterType.setType(DataType.Enum.forString(outputParams.get(i).getType()));
+ parameterType.setName(outputParams.get(i).getType());
+ parameter.setParameterType(parameterType);
+ outputParameterTypeArray[i] = parameter;
+ }
+ serviceDescription.getType().setOutputParametersArray(outputParameterTypeArray);
+ return serviceDescription;
+ }
+
+ public static ServiceDescriptor createServiceDescriptor(ServiceDescription serviceDescription){
+ ServiceDescriptor serviceDescriptor = new ServiceDescriptor();
+ serviceDescriptor.setServiceName(serviceDescription.getType().getName());
+ serviceDescriptor.setDescription(serviceDescription.getType().getDescription());
+ InputParameterType[] inputParametersArray = serviceDescription.getType().getInputParametersArray();
+ OutputParameterType[] outputParametersArray = serviceDescription.getType().getOutputParametersArray();
+ List<ServiceParameters> inputParams = new ArrayList<ServiceParameters>();
+ List<ServiceParameters> outputParams = new ArrayList<ServiceParameters>();
+
+ for (int i = 0; i < inputParametersArray.length; i++){
+ ServiceParameters serviceParameters = new ServiceParameters();
+ serviceParameters.setType(inputParametersArray[i].getParameterType().getType().toString());
+// String[] parameterValueArray = inputParametersArray[i].getParameterValueArray();
+// if (parameterValueArray.length != 0){
+// serviceParameters.setName(parameterValueArray[0]);
+// }
+ serviceParameters.setName(inputParametersArray[i].getParameterName());
+ serviceParameters.setDescription(inputParametersArray[i].getParameterDescription());
+// serviceParameters.set(inputParametersArray[i].getParameterType().getType().toString());
+ inputParams.add(serviceParameters);
+ }
+ serviceDescriptor.setInputParams(inputParams);
+
+ for (int i = 0; i < outputParametersArray.length; i++){
+ ServiceParameters serviceParameters = new ServiceParameters();
+ serviceParameters.setType(outputParametersArray[i].getParameterType().getType().toString());
+ serviceParameters.setName(outputParametersArray[i].getParameterName());
+ serviceParameters.setDescription(outputParametersArray[i].getParameterDescription());
+// serviceParameters.setDataType(outputParametersArray[i].getParameterType().getType().toString());
+ outputParams.add(serviceParameters);
+ }
+ serviceDescriptor.setOutputParams(outputParams);
+ return serviceDescriptor;
+ }
+
+ public static ApplicationDeploymentDescription createApplicationDescription(ApplicationDescriptor applicationDescriptor){
+ ApplicationDeploymentDescription applicationDeploymentDescription = new ApplicationDeploymentDescription();
+ ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+ name.setStringValue(applicationDescriptor.getName());
+ applicationDeploymentDescription.getType().setApplicationName(name);
+ applicationDeploymentDescription.getType().setExecutableLocation(applicationDescriptor.getExecutablePath());
+ applicationDeploymentDescription.getType().setOutputDataDirectory(applicationDescriptor.getWorkingDir());
+
+ //set advanced options according app desc type
+ if(applicationDescriptor.getApplicationDescType() != null && !applicationDescriptor.getApplicationDescType().isEmpty()){
+ if (applicationDescriptor.getApplicationDescType().equals(ApplicationDescriptorTypes.GRAM_APP_DEP_DESC_TYPE)){
+ ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription(GramApplicationDeploymentType.type);
+ appDesc.getType().setApplicationName(name);
+ appDesc.getType().setExecutableLocation(applicationDescriptor.getExecutablePath());
+ appDesc.getType().setOutputDataDirectory(applicationDescriptor.getWorkingDir());
+ GramApplicationDeploymentType app = (GramApplicationDeploymentType) appDesc.getType();
+ app.setCpuCount(applicationDescriptor.getCpuCount());
+ app.setJobType(JobTypeType.Enum.forString(applicationDescriptor.getJobType()));
+ app.setMaxMemory(applicationDescriptor.getMaxMemory());
+ app.setMinMemory(applicationDescriptor.getMinMemory());
+ app.setMaxWallTime(applicationDescriptor.getMaxWallTime());
+ app.setNodeCount(applicationDescriptor.getNodeCount());
+ app.setProcessorsPerNode(applicationDescriptor.getProcessorsPerNode());
+ return appDesc;
+ } else if (applicationDescriptor.getApplicationDescType().equals(ApplicationDescriptorTypes.BATCH_APP_DEP_DESC_TYPE)){
+ ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription(BatchApplicationDeploymentDescriptionType.type);
+ appDesc.getType().setApplicationName(name);
+ appDesc.getType().setExecutableLocation(applicationDescriptor.getExecutablePath());
+ appDesc.getType().setOutputDataDirectory(applicationDescriptor.getWorkingDir());
+ BatchApplicationDeploymentDescriptionType applicationDeploymentType = (BatchApplicationDeploymentDescriptionType) appDesc.getType();
+ applicationDeploymentType.setCpuCount(applicationDescriptor.getCpuCount());
+ applicationDeploymentType.setJobType(JobTypeType.Enum.forString(applicationDescriptor.getJobType()));
+ applicationDeploymentType.setMaxMemory(applicationDescriptor.getMaxMemory());
+ applicationDeploymentType.setMinMemory(applicationDescriptor.getMinMemory());
+ applicationDeploymentType.setMaxWallTime(applicationDescriptor.getMaxWallTime());
+ applicationDeploymentType.setNodeCount(applicationDescriptor.getNodeCount());
+ applicationDeploymentType.setProcessorsPerNode(applicationDescriptor.getProcessorsPerNode());
+ return appDesc;
+ }
+ }
+ return applicationDeploymentDescription;
+ }
+
+ public static ApplicationDescriptor createApplicationDescriptor (ApplicationDeploymentDescription applicationDeploymentDescription){
+ ApplicationDescriptor applicationDescriptor = new ApplicationDescriptor();
+ applicationDescriptor.setName(applicationDeploymentDescription.getType().getApplicationName().getStringValue());
+ applicationDescriptor.setExecutablePath(applicationDeploymentDescription.getType().getExecutableLocation());
+ applicationDescriptor.setWorkingDir(applicationDeploymentDescription.getType().getOutputDataDirectory());
+ if(applicationDeploymentDescription.getType() != null){
+ if(applicationDeploymentDescription.getType() instanceof GramApplicationDeploymentType){
+ GramApplicationDeploymentType gramApplicationDeploymentType = (GramApplicationDeploymentType)applicationDeploymentDescription.getType();
+ if(gramApplicationDeploymentType != null){
+ applicationDescriptor.setCpuCount(gramApplicationDeploymentType.getCpuCount());
+ applicationDescriptor.setNodeCount(gramApplicationDeploymentType.getNodeCount());
+ applicationDescriptor.setMaxMemory(gramApplicationDeploymentType.getMaxMemory());
+ applicationDescriptor.setMinMemory(gramApplicationDeploymentType.getMinMemory());
+ applicationDescriptor.setMaxWallTime(gramApplicationDeploymentType.getMaxWallTime());
+ if(gramApplicationDeploymentType.getQueue() != null){
+ applicationDescriptor.setQueueName(gramApplicationDeploymentType.getQueue().getQueueName());
+ }
+ }
+ } else if (applicationDeploymentDescription.getType() instanceof BatchApplicationDeploymentDescriptionType){
+ BatchApplicationDeploymentDescriptionType batchApplicationDeploymentDescriptionType = (BatchApplicationDeploymentDescriptionType)applicationDeploymentDescription.getType();
+ if (batchApplicationDeploymentDescriptionType != null){
+ applicationDescriptor.setCpuCount(batchApplicationDeploymentDescriptionType.getCpuCount());
+ applicationDescriptor.setNodeCount(batchApplicationDeploymentDescriptionType.getNodeCount());
+ applicationDescriptor.setMaxMemory(batchApplicationDeploymentDescriptionType.getMaxMemory());
+ applicationDescriptor.setMinMemory(batchApplicationDeploymentDescriptionType.getMinMemory());
+ applicationDescriptor.setMaxWallTime(batchApplicationDeploymentDescriptionType.getMaxWallTime());
+ if (batchApplicationDeploymentDescriptionType.getQueue() != null){
+ applicationDescriptor.setQueueName(batchApplicationDeploymentDescriptionType.getQueue().getQueueName());
+ }
+
+ }
+
+ }
+ }
+
+ return applicationDescriptor;
+ }
+
+}
Added: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/HostTypes.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/HostTypes.java?rev=1410405&view=auto
==============================================================================
--- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/HostTypes.java (added)
+++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/HostTypes.java Fri Nov 16 15:41:56 2012
@@ -0,0 +1,30 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.rest.mappings.utils;
+
+public class HostTypes {
+ public static final String GLOBUS_HOST_TYPE = "GlobusHostType";
+ public static final String GSISSH_HOST_TYPE = "GsisshHostType";
+ public static final String EC2_HOST_TYPE = "Ec2HostType";
+ public static final String HOST_DESCRIPTION_TYPE = "HostDescriptionType";
+
+}