You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/06/04 22:16:00 UTC
[47/81] [abbrv] airavata git commit: Resolve compilation issues in
gfac module after module refactoring
Resolve compilation issues in gfac module after module refactoring
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/19afc7e0
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/19afc7e0
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/19afc7e0
Branch: refs/heads/master
Commit: 19afc7e0d90502f592f1c73aafbf17ae3f4648a1
Parents: 7b80974
Author: Shameera Rathanyaka <sh...@gmail.com>
Authored: Wed Jun 3 17:24:47 2015 -0400
Committer: Shameera Rathanyaka <sh...@gmail.com>
Committed: Wed Jun 3 17:24:47 2015 -0400
----------------------------------------------------------------------
modules/distribution/gfac-server/pom.xml | 33 +-
modules/distribution/server/pom.xml | 55 +-
.../gfac-application-specific-handlers/pom.xml | 4 +-
modules/gfac/gfac-bes/pom.xml | 4 +-
modules/gfac/gfac-client/pom.xml | 2 +-
modules/gfac/gfac-core/pom.xml | 30 +-
.../apache/airavata/gfac/core/GFacUtils.java | 39 +
.../airavata/gfac/core/JobDescriptor.java | 475 ++
.../gfac/core/JobManagerConfiguration.java | 52 +
.../airavata/gfac/core/SSHApiException.java | 36 +
.../airavata/gfac/core/cluster/Cluster.java | 161 +
.../airavata/gfac/core/cluster/CommandInfo.java | 34 +
.../gfac/core/cluster/CommandOutput.java | 49 +
.../airavata/gfac/core/cluster/JobStatus.java | 110 +
.../gfac/core/cluster/OutputParser.java | 67 +
.../gfac/core/cluster/RawCommandInfo.java | 53 +
.../airavata/gfac/core/cluster/ServerInfo.java | 65 +
.../gfac/core/handler/AbstractHandler.java | 1 -
.../gfac/core/x2012/x12/AfterAnyList.java | 166 +
.../gfac/core/x2012/x12/AfterOKList.java | 166 +
.../gfac/core/x2012/x12/ExportProperties.java | 183 +
.../airavata/gfac/core/x2012/x12/InputList.java | 166 +
.../core/x2012/x12/JobDescriptorDocument.java | 112 +
.../gfac/core/x2012/x12/ModuleLoadCommands.java | 166 +
.../airavata/gfac/core/x2012/x12/PbsParams.java | 1421 ++++++
.../gfac/core/x2012/x12/PostJobCommands.java | 166 +
.../gfac/core/x2012/x12/PreJobCommands.java | 166 +
.../core/x2012/x12/impl/AfterAnyListImpl.java | 235 +
.../core/x2012/x12/impl/AfterOKListImpl.java | 235 +
.../x2012/x12/impl/ExportPropertiesImpl.java | 233 +
.../gfac/core/x2012/x12/impl/InputListImpl.java | 235 +
.../x12/impl/JobDescriptorDocumentImpl.java | 77 +
.../x2012/x12/impl/ModuleLoadCommandsImpl.java | 235 +
.../gfac/core/x2012/x12/impl/PbsParamsImpl.java | 4174 ++++++++++++++++++
.../x2012/x12/impl/PostJobCommandsImpl.java | 235 +
.../core/x2012/x12/impl/PreJobCommandsImpl.java | 235 +
.../src/main/resources/PBSJobDescriptor.xsd | 114 +
.../src/main/resources/gsissh-schemas.xsdconfig | 14 +
modules/gfac/gfac-impl/pom.xml | 32 +-
.../java/com/jcraft/jsch/ExtendedSession.java | 42 +
.../com/jcraft/jsch/GSISSHIdentityFile.java | 126 +
.../jcraft/jsch/GSISSHIdentityRepository.java | 29 +
.../UserAuthGSSAPIWithMICGSSCredentials.java | 308 ++
.../airavata/gfac/gsi/ssh/GSSContextX509.java | 2 +-
.../airavata/gfac/gsi/ssh/api/Cluster.java | 162 -
.../gfac/gsi/ssh/api/CommandExecutor.java | 33 +-
.../airavata/gfac/gsi/ssh/api/CommandInfo.java | 34 -
.../gfac/gsi/ssh/api/CommandOutput.java | 49 -
.../apache/airavata/gfac/gsi/ssh/api/Core.java | 4 +-
.../apache/airavata/gfac/gsi/ssh/api/Node.java | 2 +-
.../gfac/gsi/ssh/api/SSHApiException.java | 36 -
.../airavata/gfac/gsi/ssh/api/ServerInfo.java | 65 -
.../gfac/gsi/ssh/api/job/JobDescriptor.java | 473 --
.../ssh/api/job/JobManagerConfiguration.java | 51 -
.../airavata/gfac/gsi/ssh/api/job/JobType.java | 32 -
.../gsi/ssh/api/job/LSFJobConfiguration.java | 6 +-
.../gfac/gsi/ssh/api/job/LSFOutputParser.java | 8 +-
.../gfac/gsi/ssh/api/job/OutputParser.java | 67 -
.../gsi/ssh/api/job/PBSJobConfiguration.java | 6 +-
.../gfac/gsi/ssh/api/job/PBSOutputParser.java | 8 +-
.../gsi/ssh/api/job/SlurmJobConfiguration.java | 8 +-
.../gfac/gsi/ssh/api/job/SlurmOutputParser.java | 8 +-
.../gsi/ssh/api/job/UGEJobConfiguration.java | 6 +-
.../gfac/gsi/ssh/api/job/UGEOutputParser.java | 10 +-
.../gfac/gsi/ssh/config/ConfigReader.java | 2 +-
.../ssh/impl/DefaultJobSubmissionListener.java | 9 +-
.../gsi/ssh/impl/GSISSHAbstractCluster.java | 80 +-
.../airavata/gfac/gsi/ssh/impl/JobStatus.java | 110 -
.../airavata/gfac/gsi/ssh/impl/PBSCluster.java | 9 +-
.../gfac/gsi/ssh/impl/RawCommandInfo.java | 55 -
.../airavata/gfac/gsi/ssh/impl/SSHUserInfo.java | 2 +-
.../gfac/gsi/ssh/impl/StandardOutReader.java | 4 +-
.../gfac/gsi/ssh/impl/SystemCommandOutput.java | 4 +-
.../DefaultPasswordAuthenticationInfo.java | 2 +-
.../DefaultPublicKeyAuthentication.java | 2 +-
.../DefaultPublicKeyFileAuthentication.java | 2 +-
.../MyProxyAuthenticationInfo.java | 2 +-
.../gfac/gsi/ssh/jsch/ExtendedJSch.java | 2 +-
.../gsi/ssh/listener/JobSubmissionListener.java | 8 +-
.../airavata/gfac/gsi/ssh/util/CommonUtils.java | 8 +-
.../ssh/util/SSHAPIUIKeyboardInteractive.java | 2 +-
.../gsi/ssh/util/SSHKeyPasswordHandler.java | 2 +-
.../airavata/gfac/gsi/ssh/util/SSHUtils.java | 61 +-
.../handler/GSISSHDirectorySetupHandler.java | 2 +-
.../gfac/gsissh/handler/GSISSHInputHandler.java | 2 +-
.../gsissh/handler/GSISSHOutputHandler.java | 2 +-
.../gsissh/handler/NewGSISSHOutputHandler.java | 2 +-
.../gsissh/provider/impl/GSISSHProvider.java | 8 +-
.../gsissh/security/GSISecurityContext.java | 9 +-
.../gfac/gsissh/util/GFACGSISSHUtils.java | 14 +-
.../gfac/local/provider/impl/LocalProvider.java | 2 -
.../airavata/gfac/monitor/HPCMonitorID.java | 6 +-
.../handlers/GridPullMonitorHandler.java | 4 +-
.../handlers/GridPushMonitorHandler.java | 4 +-
.../monitor/impl/pull/qstat/HPCPullMonitor.java | 6 +-
.../impl/pull/qstat/ResourceConnection.java | 8 +-
.../impl/push/amqp/ComputingActivity.java | 19 +
.../impl/push/amqp/JSONMessageParser.java | 1 -
.../gfac/ssh/context/SSHAuthWrapper.java | 2 +-
.../ssh/handler/AdvancedSCPInputHandler.java | 8 +-
.../ssh/handler/AdvancedSCPOutputHandler.java | 8 +-
.../gfac/ssh/handler/NewSSHOutputHandler.java | 2 +-
.../ssh/handler/SSHDirectorySetupHandler.java | 2 +-
.../gfac/ssh/handler/SSHInputHandler.java | 2 +-
.../gfac/ssh/handler/SSHOutputHandler.java | 2 +-
.../gfac/ssh/provider/impl/SSHProvider.java | 16 +-
.../gfac/ssh/security/SSHSecurityContext.java | 2 +-
.../airavata/gfac/ssh/util/GFACSSHUtils.java | 15 +-
.../airavata/gfac/ssh/util/HandleOutputs.java | 2 +-
.../impl/DefaultSSHApiTestWithMyProxyAuth.java | 1 +
modules/gfac/gfac-service/pom.xml | 11 +-
.../airavata/gfac/server/GfacServerHandler.java | 4 +-
modules/orchestrator/orchestrator-core/pom.xml | 22 +-
modules/workflow-model/workflow-engine/pom.xml | 4 +-
modules/xbaya-gui/pom.xml | 7 +-
115 files changed, 10720 insertions(+), 1456 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/distribution/gfac-server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/gfac-server/pom.xml b/modules/distribution/gfac-server/pom.xml
index 2496ae7..6e80212 100644
--- a/modules/distribution/gfac-server/pom.xml
+++ b/modules/distribution/gfac-server/pom.xml
@@ -133,49 +133,24 @@
<artifactId>airavata-standalone-server</artifactId>
<version>${project.version}</version>
</dependency>
- <!--<dependency>-->
- <!--<groupId>org.apache.airavata</groupId>-->
- <!--<artifactId>airavata-gfac-gram</artifactId>-->
- <!--<version>${project.version}</version>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>org.apache.airavata</groupId>-->
- <!--<artifactId>airavata-gfac-bes</artifactId>-->
- <!--<version>${project.version}</version>-->
- <!--</dependency>-->
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-gsissh</artifactId>
+ <artifactId>gfac-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-hpc-monitor</artifactId>
+ <artifactId>gfac-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-local</artifactId>
+ <artifactId>gfac-service</artifactId>
<version>${project.version}</version>
</dependency>
- <!--<dependency>-->
- <!--<groupId>org.apache.airavata</groupId>-->
- <!--<artifactId>airavata-gfac-hadoop</artifactId>-->
- <!--<version>${project.version}</version>-->
- <!--</dependency>-->
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-service</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-application-specific-handlers</artifactId>
+ <artifactId>gfac-application-specific-handlers</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/distribution/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml
index fc2df04..cf8a73c 100644
--- a/modules/distribution/server/pom.xml
+++ b/modules/distribution/server/pom.xml
@@ -268,7 +268,7 @@
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-stubs</artifactId>
+ <artifactId>gfac-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -298,47 +298,22 @@
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-ssh</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!--<dependency> -->
- <!--<groupId>org.apache.airavata</groupId> -->
- <!--<artifactId>airavata-gfac-gram</artifactId> -->
- <!--<version>${project.version}</version> -->
- <!--</dependency> -->
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-bes</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-gsissh</artifactId>
+ <artifactId>gfac-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-hpc-monitor</artifactId>
+ <artifactId>gfac-bes</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-local</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!--<dependency> -->
- <!--<groupId>org.apache.airavata</groupId> -->
- <!--<artifactId>airavata-gfac-hadoop</artifactId> -->
- <!--<version>${project.version}</version> -->
- <!--</dependency> -->
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-core</artifactId>
+ <artifactId>gfac-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-service</artifactId>
+ <artifactId>gfac-service</artifactId>
<version>${project.version}</version>
</dependency>
<!--<dependency> -->
@@ -351,26 +326,6 @@
<artifactId>airavata-workflow-model-core</artifactId>
<version>${project.version}</version>
</dependency>
- <!--<dependency> -->
- <!--<groupId>org.apache.airavata</groupId> -->
- <!--<artifactId>airavata-messenger-commons</artifactId> -->
- <!--<version>${project.version}</version> -->
- <!--</dependency> -->
- <!--<dependency> -->
- <!--<groupId>org.apache.airavata</groupId> -->
- <!--<artifactId>airavata-messenger-client</artifactId> -->
- <!--<version>${project.version}</version> -->
- <!--</dependency> -->
- <!--<dependency> -->
- <!--<groupId>org.apache.airavata</groupId> -->
- <!--<artifactId>airavata-workflow-tracking</artifactId> -->
- <!--<version>${project.version}</version> -->
- <!--</dependency> -->
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>gsissh</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-model-utils</artifactId>
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-application-specific-handlers/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-application-specific-handlers/pom.xml b/modules/gfac/gfac-application-specific-handlers/pom.xml
index 801313d..638c81f 100644
--- a/modules/gfac/gfac-application-specific-handlers/pom.xml
+++ b/modules/gfac/gfac-application-specific-handlers/pom.xml
@@ -7,11 +7,11 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>airavata-gfac-application-specific-handlers</artifactId>
+ <artifactId>gfac-application-specific-handlers</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-core</artifactId>
+ <artifactId>gfac-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-bes/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/pom.xml b/modules/gfac/gfac-bes/pom.xml
index 7335d53..4e61ae0 100644
--- a/modules/gfac/gfac-bes/pom.xml
+++ b/modules/gfac/gfac-bes/pom.xml
@@ -20,7 +20,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>airavata-gfac-bes</artifactId>
+ <artifactId>gfac-bes</artifactId>
<name>Airavata GFac BES implementation</name>
<description>This is the extension of GFAC to use GRAM </description>
<url>http://airavata.apache.org/</url>
@@ -36,7 +36,7 @@
<!-- GFAC schemas -->
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gfac-core</artifactId>
+ <artifactId>gfac-core</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Credential Store -->
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/pom.xml b/modules/gfac/gfac-client/pom.xml
index f94d85b..20423e0 100644
--- a/modules/gfac/gfac-client/pom.xml
+++ b/modules/gfac/gfac-client/pom.xml
@@ -20,7 +20,7 @@
</parent>
<name>Airavata Gfac Client SDK</name>
- <artifactId>airavata-gfac-stubs</artifactId>
+ <artifactId>gfac-client</artifactId>
<packaging>jar</packaging>
<url>http://airavata.apache.org/</url>
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/pom.xml b/modules/gfac/gfac-core/pom.xml
index 2169734..0203865 100644
--- a/modules/gfac/gfac-core/pom.xml
+++ b/modules/gfac/gfac-core/pom.xml
@@ -17,7 +17,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>airavata-gfac-core</artifactId>
+ <artifactId>gfac-core</artifactId>
<name>Airavata GFac Core</name>
<description>The core GFAC functionality independent from any webservice implementation.</description>
<url>http://airavata.apache.org/</url>
@@ -50,6 +50,11 @@
<artifactId>airavata-jpa-registry</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.xmlbeans</groupId>
+ <artifactId>xmlbeans</artifactId>
+ <version>${xmlbeans.version}</version>
+ </dependency>
<!-- Credential Store -->
<dependency>
<groupId>org.apache.airavata</groupId>
@@ -112,6 +117,7 @@
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>${xmlbeans.version}</version>
+ <scope>compile</scope>
</dependency>
<!-- this is the dependency for amqp implementation -->
<!-- zookeeper dependencies -->
@@ -125,6 +131,28 @@
<build>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xmlbeans-maven-plugin</artifactId>
+ <version>2.3.3</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>xmlbeans</goal>
+ </goals>
+ </execution>
+ </executions>
+ <inherited>true</inherited>
+ <configuration>
+ <schemaDirectory>src/main/resources</schemaDirectory>
+ <xmlConfigs>
+ <xmlConfig implementation="java.io.File">src/main/resources/gsissh-schemas.xsdconfig </xmlConfig>
+ </xmlConfigs>
+ <sourceGenerationDirectory>src/main/java</sourceGenerationDirectory>
+ <outputJar>target/generated/${project.artifactId}-${project.version}.jar</outputJar>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 407db94..b716099 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -139,6 +139,45 @@ public class GFacUtils {
}
/**
+ * This returns true if the give job is finished
+ * otherwise false
+ *
+ * @param job
+ * @return
+ */
+ public static boolean isJobFinished(JobDescriptor job) {
+ if (org.apache.airavata.gfac.core.cluster.JobStatus.C.toString().equals(job.getStatus())) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * This will read
+ *
+ * @param maxWalltime
+ * @return
+ */
+ public static String maxWallTimeCalculator(int maxWalltime) {
+ if (maxWalltime < 60) {
+ return "00:" + maxWalltime + ":00";
+ } else {
+ int minutes = maxWalltime % 60;
+ int hours = maxWalltime / 60;
+ return hours + ":" + minutes + ":00";
+ }
+ }
+ public static String maxWallTimeCalculatorForLSF(int maxWalltime) {
+ if (maxWalltime < 60) {
+ return "00:" + maxWalltime;
+ } else {
+ int minutes = maxWalltime % 60;
+ int hours = maxWalltime / 60;
+ return hours + ":" + minutes;
+ }
+ }
+ /**
* this can be used to do framework opertaions specific to different modes
*
* @param jobExecutionContext
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
new file mode 100644
index 0000000..678f41f
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
@@ -0,0 +1,475 @@
+/*
+ *
+ * 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.gfac.core;
+
+import org.apache.airavata.gfac.core.cluster.CommandOutput;
+import org.apache.airavata.gfac.core.x2012.x12.AfterAnyList;
+import org.apache.airavata.gfac.core.x2012.x12.AfterOKList;
+import org.apache.airavata.gfac.core.x2012.x12.InputList;
+import org.apache.airavata.gfac.core.x2012.x12.JobDescriptorDocument;
+import org.apache.xmlbeans.XmlException;
+
+import java.util.List;
+
+/**
+ * This class define a job with required parameters, based on this configuration API is generating a Pbs script and
+ * submit the job to the computing resource
+ */
+public class JobDescriptor {
+
+ private JobDescriptorDocument jobDescriptionDocument;
+
+
+ public JobDescriptor() {
+ jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
+ jobDescriptionDocument.addNewJobDescriptor();
+ }
+
+ public JobDescriptor(JobDescriptorDocument jobDescriptorDocument) {
+ this.jobDescriptionDocument = jobDescriptorDocument;
+ }
+
+
+ public JobDescriptor(CommandOutput commandOutput) {
+ jobDescriptionDocument = JobDescriptorDocument.Factory.newInstance();
+ jobDescriptionDocument.addNewJobDescriptor();
+ }
+
+
+ public String toXML() {
+ return jobDescriptionDocument.xmlText();
+ }
+
+ public JobDescriptorDocument getJobDescriptorDocument() {
+ return this.jobDescriptionDocument;
+ }
+
+ /**
+ * With new app catalog thrift object integration, we don't use this
+ * @param xml
+ * @return
+ * @throws XmlException
+ */
+ @Deprecated
+ public static JobDescriptor fromXML(String xml)
+ throws XmlException {
+ JobDescriptorDocument parse = JobDescriptorDocument.Factory
+ .parse(xml);
+ JobDescriptor jobDescriptor = new JobDescriptor(parse);
+ return jobDescriptor;
+ }
+
+
+ //todo write bunch of setter getters to set and get jobdescription parameters
+ public void setWorkingDirectory(String workingDirectory) {
+ this.getJobDescriptorDocument().getJobDescriptor().setWorkingDirectory(workingDirectory);
+ }
+
+ public String getWorkingDirectory() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getWorkingDirectory();
+ }
+
+ public void setShellName(String shellName) {
+ this.getJobDescriptorDocument().getJobDescriptor().setShellName(shellName);
+ }
+
+ public void setJobName(String name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setJobName(name);
+ }
+
+ public void setExecutablePath(String name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setExecutablePath(name);
+ }
+
+ public void setAllEnvExport(boolean name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setAllEnvExport(name);
+ }
+
+ public void setMailOptions(String name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setMailOptions(name);
+ }
+
+ public void setStandardOutFile(String name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setStandardOutFile(name);
+ }
+
+ public void setStandardErrorFile(String name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setStandardErrorFile(name);
+ }
+
+ public void setNodes(int name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setNodes(name);
+ }
+
+ public void setProcessesPerNode(int name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setProcessesPerNode(name);
+ }
+
+ public String getOutputDirectory() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getOutputDirectory();
+ }
+
+ public String getInputDirectory() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getInputDirectory();
+ }
+ public void setOutputDirectory(String name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setOutputDirectory(name);
+ }
+
+ public void setInputDirectory(String name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setInputDirectory(name);
+ }
+
+ /**
+ * Users can pass the minute count for maxwalltime
+ * @param minutes
+ */
+ public void setMaxWallTime(String minutes) {
+ this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
+ GFacUtils.maxWallTimeCalculator(Integer.parseInt(minutes)));
+
+ }
+
+
+ public void setMaxWallTimeForLSF(String minutes) {
+ this.getJobDescriptorDocument().getJobDescriptor().setMaxWallTime(
+ GFacUtils.maxWallTimeCalculatorForLSF(Integer.parseInt(minutes)));
+
+ }
+ public void setAcountString(String name) {
+ this.getJobDescriptorDocument().getJobDescriptor().setAcountString(name);
+ }
+
+ public void setInputValues(List<String> inputValue) {
+ InputList inputList = this.getJobDescriptorDocument().getJobDescriptor().addNewInputs();
+ inputList.setInputArray(inputValue.toArray(new String[inputValue.size()]));
+ }
+
+ public void setJobID(String jobID) {
+ this.getJobDescriptorDocument().getJobDescriptor().setJobID(jobID);
+ }
+
+ public void setQueueName(String queueName) {
+ this.getJobDescriptorDocument().getJobDescriptor().setQueueName(queueName);
+ }
+
+ public void setStatus(String queueName) {
+ this.getJobDescriptorDocument().getJobDescriptor().setStatus(queueName);
+ }
+
+ public void setAfterAnyList(String[] afterAnyList) {
+ AfterAnyList afterAny = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterAny();
+ afterAny.setAfterAnyArray(afterAnyList);
+ }
+
+ public void setAfterOKList(String[] afterOKList) {
+ AfterOKList afterAnyList = this.getJobDescriptorDocument().getJobDescriptor().addNewAfterOKList();
+ afterAnyList.setAfterOKListArray(afterOKList);
+ }
+ public void setCTime(String cTime) {
+ this.getJobDescriptorDocument().getJobDescriptor().setCTime(cTime);
+ }
+ public void setQTime(String qTime) {
+ this.getJobDescriptorDocument().getJobDescriptor().setQTime(qTime);
+ }
+ public void setMTime(String mTime) {
+ this.getJobDescriptorDocument().getJobDescriptor().setMTime(mTime);
+ }
+ public void setSTime(String sTime) {
+ this.getJobDescriptorDocument().getJobDescriptor().setSTime(sTime);
+ }
+ public void setCompTime(String compTime) {
+ this.getJobDescriptorDocument().getJobDescriptor().setCompTime(compTime);
+ }
+ public void setOwner(String owner) {
+ this.getJobDescriptorDocument().getJobDescriptor().setOwner(owner);
+ }
+ public void setExecuteNode(String executeNode) {
+ this.getJobDescriptorDocument().getJobDescriptor().setExecuteNode(executeNode);
+ }
+ public void setEllapsedTime(String ellapsedTime) {
+ this.getJobDescriptorDocument().getJobDescriptor().setEllapsedTime(ellapsedTime);
+ }
+
+ public void setUsedCPUTime(String usedCPUTime) {
+ this.getJobDescriptorDocument().getJobDescriptor().setUsedCPUTime(usedCPUTime);
+ }
+ public void setCPUCount(int usedCPUTime) {
+ this.getJobDescriptorDocument().getJobDescriptor().setCpuCount(usedCPUTime);
+ }
+ public void setUsedMemory(String usedMemory) {
+ this.getJobDescriptorDocument().getJobDescriptor().setUsedMem(usedMemory);
+ }
+ public void setVariableList(String variableList) {
+ this.getJobDescriptorDocument().getJobDescriptor().setVariableList(variableList);
+ }
+ public void setSubmitArgs(String submitArgs) {
+ this.getJobDescriptorDocument().getJobDescriptor().setSubmitArgs(submitArgs);
+ }
+
+ public void setPreJobCommands(String[] commands){
+ if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
+ this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
+ }
+ this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().setCommandArray(commands);
+ }
+
+ public void setPostJobCommands(String[] commands){
+ if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
+ this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
+ }
+ this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().setCommandArray(commands);
+ }
+
+ public void setModuleLoadCommands(String[] commands) {
+ if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
+ this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
+ }
+ this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().setCommandArray(commands);
+ }
+
+ public void addModuleLoadCommands(String command) {
+ if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() == null) {
+ this.getJobDescriptorDocument().getJobDescriptor().addNewModuleLoadCommands();
+ }
+ this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().addCommand(command);
+ }
+
+ public void addPreJobCommand(String command){
+ if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() == null){
+ this.getJobDescriptorDocument().getJobDescriptor().addNewPreJobCommands();
+ }
+ this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().addCommand(command);
+ }
+
+ public void addPostJobCommand(String command){
+ if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() == null){
+ this.getJobDescriptorDocument().getJobDescriptor().addNewPostJobCommands();
+ }
+ this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().addCommand(command);
+ }
+
+ public void setPartition(String partition){
+ this.getJobDescriptorDocument().getJobDescriptor().setPartition(partition);
+ }
+
+ public void setUserName(String userName){
+ this.getJobDescriptorDocument().getJobDescriptor().setUserName(userName);
+ }
+ public void setNodeList(String nodeList){
+ this.getJobDescriptorDocument().getJobDescriptor().setNodeList(nodeList);
+ }
+ public void setJobSubmitter(String jobSubmitter){
+ this.getJobDescriptorDocument().getJobDescriptor().setJobSubmitterCommand(jobSubmitter);
+ }
+ public String getNodeList(){
+ return this.getJobDescriptorDocument().getJobDescriptor().getNodeList();
+ }
+ public String getExecutablePath() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getExecutablePath();
+ }
+
+ public boolean getAllEnvExport() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getAllEnvExport();
+ }
+
+ public String getMailOptions() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getMailOptions();
+ }
+
+ public String getStandardOutFile() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getStandardOutFile();
+ }
+
+ public String getStandardErrorFile() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getStandardErrorFile();
+ }
+
+ public int getNodes(int name) {
+ return this.getJobDescriptorDocument().getJobDescriptor().getNodes();
+ }
+
+ public int getCPUCount(int name) {
+ return this.getJobDescriptorDocument().getJobDescriptor().getCpuCount();
+ }
+
+ public int getProcessesPerNode() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getProcessesPerNode();
+ }
+
+ public String getMaxWallTime() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getMaxWallTime();
+ }
+
+ public String getAcountString() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getAcountString();
+ }
+
+ public String[] getInputValues() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getInputs().getInputArray();
+ }
+
+ public String getJobID() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+ }
+
+ public String getQueueName() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getQueueName();
+ }
+
+ public String getStatus() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getStatus();
+ }
+
+ public String[] getAfterAnyList() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getAfterAny().getAfterAnyArray();
+ }
+
+ public String[] getAfterOKList() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getAfterOKList().getAfterOKListArray();
+ }
+ public String getCTime() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getCTime();
+ }
+ public String getQTime() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getQTime();
+ }
+ public String getMTime() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getMTime();
+ }
+ public String getSTime() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getSTime();
+ }
+ public String getCompTime() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getCompTime();
+ }
+ public String getOwner() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getOwner();
+ }
+ public String getExecuteNode() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getExecuteNode();
+ }
+ public String getEllapsedTime() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getEllapsedTime();
+ }
+
+ public String getUsedCPUTime() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getUsedCPUTime();
+ }
+
+ public String getUsedMemory() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getUsedMem();
+ }
+ public void getShellName() {
+ this.getJobDescriptorDocument().getJobDescriptor().getShellName();
+ }
+
+ public String getJobName() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getJobName();
+ }
+
+ public String getJobId() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+ }
+
+
+ public String getVariableList() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+ }
+ public String getSubmitArgs() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
+ }
+
+ public String[] getPostJobCommands(){
+ if(this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands() != null) {
+ return this.getJobDescriptorDocument().getJobDescriptor().getPostJobCommands().getCommandArray();
+ }
+ return null;
+ }
+
+ public String[] getModuleCommands() {
+ if (this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands() != null) {
+ return this.getJobDescriptorDocument().getJobDescriptor().getModuleLoadCommands().getCommandArray();
+ }
+ return null;
+ }
+
+ public String[] getPreJobCommands(){
+ if(this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands() != null) {
+ return this.getJobDescriptorDocument().getJobDescriptor().getPreJobCommands().getCommandArray();
+ }
+ return null;
+ }
+
+ public String getJobSubmitterCommand(){
+ return this.getJobDescriptorDocument().getJobDescriptor().getJobSubmitterCommand();
+ }
+
+ public String getPartition(){
+ return this.getJobDescriptorDocument().getJobDescriptor().getPartition();
+ }
+
+ public String getUserName(){
+ return this.getJobDescriptorDocument().getJobDescriptor().getUserName();
+ }
+
+ public void setCallBackIp(String ip){
+ this.jobDescriptionDocument.getJobDescriptor().setCallBackIp(ip);
+ }
+
+ public void setCallBackPort(String ip){
+ this.jobDescriptionDocument.getJobDescriptor().setCallBackPort(ip);
+ }
+
+
+ public String getCallBackIp(){
+ return this.jobDescriptionDocument.getJobDescriptor().getCallBackIp();
+ }
+ public String getCallBackPort(){
+ return this.jobDescriptionDocument.getJobDescriptor().getCallBackPort();
+ }
+
+ public void setMailType(String emailType) {
+ this.getJobDescriptorDocument().getJobDescriptor().setMailType(emailType);
+ }
+
+ public String getMailType() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getMailType();
+ }
+ public void setMailAddress(String emailAddress) {
+ this.getJobDescriptorDocument().getJobDescriptor().setMailAddress(emailAddress);
+ }
+
+ public String getMailAddress() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getMailAddress();
+ }
+
+ public String getChassisName() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getChassisName();
+ }
+
+ public void setChassisName(String chassisName){
+ this.getJobDescriptorDocument().getJobDescriptor().setChassisName(chassisName);
+ }
+
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobManagerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobManagerConfiguration.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobManagerConfiguration.java
new file mode 100644
index 0000000..661aba0
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobManagerConfiguration.java
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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.gfac.core;
+
+import org.apache.airavata.gfac.core.cluster.OutputParser;
+import org.apache.airavata.gfac.core.cluster.RawCommandInfo;
+
+public interface JobManagerConfiguration {
+
+ public RawCommandInfo getCancelCommand(String jobID);
+
+ public String getJobDescriptionTemplateName();
+
+ public RawCommandInfo getMonitorCommand(String jobID);
+
+ public RawCommandInfo getUserBasedMonitorCommand(String userName);
+
+ public RawCommandInfo getJobIdMonitorCommand(String jobName , String userName);
+
+ public String getScriptExtension();
+
+ public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath);
+
+ public OutputParser getParser();
+
+ public String getInstalledPath();
+
+ public String getBaseCancelCommand();
+
+ public String getBaseMonitorCommand();
+
+ public String getBaseSubmitCommand();
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/SSHApiException.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/SSHApiException.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/SSHApiException.java
new file mode 100644
index 0000000..a2db122
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/SSHApiException.java
@@ -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.gfac.core;
+
+/**
+ * An exception class to wrap SSH command execution related errors.
+ */
+public class SSHApiException extends Exception {
+
+ public SSHApiException(String message) {
+ super(message);
+ }
+
+ public SSHApiException(String message, Exception e) {
+ super(message, e);
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/Cluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/Cluster.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/Cluster.java
new file mode 100644
index 0000000..b116bdc
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/Cluster.java
@@ -0,0 +1,161 @@
+/*
+ *
+ * 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.gfac.core.cluster;
+
+import com.jcraft.jsch.Session;
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.SSHApiException;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This interface represents a Cluster machine
+ * End users of the API can implement this and come up with their own
+ * implementations, but mostly this interface is for internal usage.
+ */
+public interface Cluster {
+
+ /**
+ * This will submit a job to the cluster with a given pbs file and some parameters
+ *
+ * @param pbsFilePath path of the pbs file
+ * @param workingDirectory working directory where pbs should has to copy
+ * @return jobId after successful job submission
+ * @throws SSHApiException throws exception during error
+ */
+ public String submitBatchJobWithScript(String pbsFilePath, String workingDirectory) throws SSHApiException;
+
+ /**
+ * This will submit the given job and not performing any monitoring
+ *
+ * @param jobDescriptor job descriptor to submit to cluster, this contains all the parameter
+ * @return jobID after successful job submission.
+ * @throws SSHApiException throws exception during error
+ */
+ public String submitBatchJob(JobDescriptor jobDescriptor) throws SSHApiException;
+
+ /**
+ * This will copy the localFile to remoteFile location in configured cluster
+ *
+ * @param remoteFile remote file location, this can be a directory too
+ * @param localFile local file path of the file which needs to copy to remote location
+ * @throws SSHApiException throws exception during error
+ */
+ public void scpTo(String remoteFile, String localFile) throws SSHApiException;
+
+ /**
+ * This will copy a remote file in path rFile to local file lFile
+ * @param remoteFile remote file path, this has to be a full qualified path
+ * @param localFile This is the local file to copy, this can be a directory too
+ * @throws SSHApiException
+ */
+ public void scpFrom(String remoteFile, String localFile) throws SSHApiException;
+
+ /**
+ * This will copy a remote file in path rFile to local file lFile
+ * @param remoteFile remote file path, this has to be a full qualified path
+ * @param localFile This is the local file to copy, this can be a directory too
+ * @throws SSHApiException
+ */
+ public void scpThirdParty(String remoteFileSorce, String remoteFileTarget) throws SSHApiException;
+
+ /**
+ * This will create directories in computing resources
+ * @param directoryPath the full qualified path for the directory user wants to create
+ * @throws SSHApiException throws during error
+ */
+ public void makeDirectory(String directoryPath) throws SSHApiException;
+
+
+ /**
+ * This will get the job description of a job which is there in the cluster
+ * if jbo is not available with the given ID it returns
+ * @param jobID jobId has to pass
+ * @return Returns full job description of the job which submitted successfully
+ * @throws SSHApiException throws exception during error
+ */
+ public JobDescriptor getJobDescriptorById(String jobID) throws SSHApiException;
+
+ /**
+ * This will delete the given job from the queue
+ *
+ * @param jobID jobId of the job which user wants to delete
+ * @return return the description of the deleted job
+ * @throws SSHApiException throws exception during error
+ */
+ public JobDescriptor cancelJob(String jobID) throws SSHApiException;
+
+ /**
+ * This will get the job status of the the job associated with this jobId
+ *
+ * @param jobID jobId of the job user want to get the status
+ * @return job status of the given jobID
+ * @throws SSHApiException throws exception during error
+ */
+ public JobStatus getJobStatus(String jobID) throws SSHApiException;
+ /**
+ * This will get the job status of the the job associated with this jobId
+ *
+ * @param jobName jobName of the job user want to get the status
+ * @return jobId of the given jobName
+ * @throws SSHApiException throws exception during error
+ */
+ public String getJobIdByJobName(String jobName, String userName) throws SSHApiException;
+
+ /**
+ * This method can be used to poll the jobstatuses based on the given
+ * user but we should pass the jobID list otherwise we will get unwanted
+ * job statuses which submitted by different middleware outside apache
+ * airavata with the same uername which we are not considering
+ * @param userName userName of the jobs which required to get the status
+ * @param jobIDs precises set of jobIDs
+ * @return
+ */
+ public void getJobStatuses(String userName,Map<String,JobStatus> jobIDs)throws SSHApiException;
+ /**
+ * This will list directories in computing resources
+ * @param directoryPath the full qualified path for the directory user wants to create
+ * @throws SSHApiException throws during error
+ */
+ public List<String> listDirectory(String directoryPath) throws SSHApiException;
+
+ /**
+ * This method can be used to get created ssh session
+ * to reuse the created session.
+ * @throws SSHApiException
+ */
+ public Session getSession() throws SSHApiException;
+
+ /**
+ * This method can be used to close the connections initialized
+ * to handle graceful shutdown of the system
+ * @throws SSHApiException
+ */
+ public void disconnect() throws SSHApiException;
+
+ /**
+ * This gives the server Info
+ * @return
+ */
+ public ServerInfo getServerInfo();
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandInfo.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandInfo.java
new file mode 100644
index 0000000..18e3e4e
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandInfo.java
@@ -0,0 +1,34 @@
+package org.apache.airavata.gfac.core.cluster;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * Encapsulates information about
+ */
+public interface CommandInfo {
+
+ /**
+ * Gets the executable command as a string.
+ * @return String encoded command. Should be able to execute
+ * directly on remote shell. Should includes appropriate parameters.
+ */
+ String getCommand();
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandOutput.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandOutput.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandOutput.java
new file mode 100644
index 0000000..e50d25a
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/CommandOutput.java
@@ -0,0 +1,49 @@
+package org.apache.airavata.gfac.core.cluster;/*
+ *
+ * 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.
+ *
+ */
+
+
+import com.jcraft.jsch.Channel;
+
+import java.io.OutputStream;
+
+/**
+ * Output of a certain command. TODO rethink
+ */
+public interface CommandOutput {
+
+ /**
+ * Gets the output of the command as a stream.
+ * @param channel Command output as a stream.
+ */
+ void onOutput(Channel channel);
+
+ /**
+ * Gets standard error as a output stream.
+ * @return Command error as a stream.
+ */
+ OutputStream getStandardError();
+
+ /**
+ * The command exit code.
+ * @param code The program exit code
+ */
+ void exitCode(int code);
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/JobStatus.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/JobStatus.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/JobStatus.java
new file mode 100644
index 0000000..6e8e144
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/JobStatus.java
@@ -0,0 +1,110 @@
+ /*
+ *
+ * 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.gfac.core.cluster;
+
+ /**
+ * This will contains all the PBS specific job statuses.
+ * C - Job is completed after having run/
+ * E - Job is exiting after having run.
+ * H - Job is held.
+ * Q - job is queued, eligible to run or routed.
+ * R - job is running.
+ * T - job is being moved to new location.
+ * W - job is waiting for its execution time
+ * (-a option) to be reached.
+ * S - (Unicos only) job is suspend.
+ */
+ public enum JobStatus {
+ C, E, H, Q, R, T, W, S,U,F,CA,CD,CF,CG,NF,PD,PR,TO,qw,t,r,h,Er,Eqw,PEND,RUN,PSUSP,USUSP,SSUSP,DONE,EXIT,UNKWN,ZOMBI;
+
+ public static JobStatus fromString(String status){
+ if(status != null){
+ if("C".equals(status)){
+ return JobStatus.C;
+ }else if("E".equals(status)){
+ return JobStatus.E;
+ }else if("H".equals(status)){
+ return JobStatus.H;
+ }else if("Q".equals(status)){
+ return JobStatus.Q;
+ }else if("R".equals(status)){
+ return JobStatus.R;
+ }else if("T".equals(status)){
+ return JobStatus.T;
+ }else if("W".equals(status)){
+ return JobStatus.W;
+ }else if("S".equals(status)){
+ return JobStatus.S;
+ }else if("F".equals(status)){
+ return JobStatus.F;
+ }else if("S".equals(status)){
+ return JobStatus.S;
+ }else if("CA".equals(status)){
+ return JobStatus.CA;
+ }else if("CF".equals(status)){
+ return JobStatus.CF;
+ }else if("CD".equals(status)){
+ return JobStatus.CD;
+ }else if("CG".equals(status)){
+ return JobStatus.CG;
+ }else if("NF".equals(status)){
+ return JobStatus.NF;
+ }else if("PD".equals(status)){
+ return JobStatus.PD;
+ }else if("PR".equals(status)){
+ return JobStatus.PR;
+ }else if("TO".equals(status)){
+ return JobStatus.TO;
+ }else if("U".equals(status)){
+ return JobStatus.U;
+ }else if("qw".equals(status)){
+ return JobStatus.qw;
+ }else if("t".equals(status)){
+ return JobStatus.t;
+ }else if("r".equals(status)){
+ return JobStatus.r;
+ }else if("h".equals(status)){
+ return JobStatus.h;
+ }else if("Er".equals(status)){
+ return JobStatus.Er;
+ }else if("Eqw".equals(status)){
+ return JobStatus.Er;
+ }else if("RUN".equals(status)){ // LSF starts here
+ return JobStatus.RUN;
+ }else if("PEND".equals(status)){
+ return JobStatus.PEND;
+ }else if("DONE".equals(status)){
+ return JobStatus.DONE;
+ }else if("PSUSP".equals(status)){
+ return JobStatus.PSUSP;
+ }else if("USUSP".equals(status)){
+ return JobStatus.USUSP;
+ }else if("SSUSP".equals(status)){
+ return JobStatus.SSUSP;
+ }else if("EXIT".equals(status)){
+ return JobStatus.EXIT;
+ }else if("ZOMBI".equals(status)){
+ return JobStatus.ZOMBI;
+ }
+ }
+ return JobStatus.U;
+ }
+ }
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java
new file mode 100644
index 0000000..658a5bc
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.gfac.core.cluster;
+
+import org.apache.airavata.gfac.core.JobDescriptor;
+import org.apache.airavata.gfac.core.SSHApiException;
+
+import java.util.Map;
+
+public interface OutputParser {
+
+ /**
+ * Tihs can be used to fill a jobdescriptor based on the output
+ * @param descriptor
+ * @return
+ */
+ public void parseSingleJob(JobDescriptor descriptor, String rawOutput)throws SSHApiException;
+
+ /**
+ * This can be used to parseSingleJob the result of a job submission to get the JobID
+ * @param rawOutput
+ * @return
+ */
+ public String parseJobSubmission(String rawOutput)throws SSHApiException;
+
+
+ /**
+ * This can be used to get the job status from the output
+ * @param jobID
+ * @param rawOutput
+ */
+ public JobStatus parseJobStatus(String jobID, String rawOutput)throws SSHApiException;
+
+ /**
+ * This can be used to parseSingleJob a big output and get multipleJob statuses
+ * @param statusMap list of status map will return and key will be the job ID
+ * @param rawOutput
+ */
+ public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput)throws SSHApiException;
+
+ /**
+ * filter the jobId value of given JobName from rawOutput
+ * @param jobName
+ * @param rawOutput
+ * @return
+ * @throws SSHApiException
+ */
+ public String parseJobId(String jobName, String rawOutput) throws SSHApiException;
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/RawCommandInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/RawCommandInfo.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/RawCommandInfo.java
new file mode 100644
index 0000000..80f5d0a
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/RawCommandInfo.java
@@ -0,0 +1,53 @@
+/*
+ *
+ * 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.gfac.core.cluster;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 8/14/13
+ * Time: 5:18 PM
+ */
+
+/**
+ * The raw command information. String returned by getCommand is directly executed in SSH
+ * shell. E.g :- getCommand return string set for rawCommand - "/opt/torque/bin/qsub /home/ogce/test.pbs".
+ */
+public class RawCommandInfo implements CommandInfo {
+
+ private String rawCommand;
+
+ public RawCommandInfo(String cmd) {
+ this.rawCommand = cmd;
+ }
+
+ public String getCommand() {
+ return this.rawCommand;
+ }
+
+ public String getRawCommand() {
+ return rawCommand;
+ }
+
+ public void setRawCommand(String rawCommand) {
+ this.rawCommand = rawCommand;
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/ServerInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/ServerInfo.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/ServerInfo.java
new file mode 100644
index 0000000..183f60b
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/ServerInfo.java
@@ -0,0 +1,65 @@
+package org.apache.airavata.gfac.core.cluster;/*
+ *
+ * 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.
+ *
+ */
+
+/**
+ * Encapsulate server information.
+ */
+public class ServerInfo {
+
+ private String host;
+ private String userName;
+ private int port = 22;
+
+ public ServerInfo(String userName, String host) {
+ this.userName = userName;
+ this.host = host;
+ }
+
+ public ServerInfo(String userName,String host, int port) {
+ this.host = host;
+ this.userName = userName;
+ this.port = port;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
index aa98ef6..8d2609a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
@@ -22,7 +22,6 @@ package org.apache.airavata.gfac.core.handler;
import org.apache.airavata.common.utils.MonitorPublisher;
import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
import org.apache.airavata.gfac.core.states.GfacHandlerState;
import org.apache.airavata.gfac.core.GFacUtils;
import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
http://git-wip-us.apache.org/repos/asf/airavata/blob/19afc7e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
new file mode 100644
index 0000000..e552eb7
--- /dev/null
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
@@ -0,0 +1,166 @@
+/*
+ * XML Type: afterAnyList
+ * Namespace: http://airavata.apache.org/gfac/core/2012/12
+ * Java type: org.apache.airavata.gfac.core.x2012.x12.AfterAnyList
+ *
+ * Automatically generated - do not modify.
+ */
+package org.apache.airavata.gfac.core.x2012.x12;
+
+
+/**
+ * An XML afterAnyList(@http://airavata.apache.org/gfac/core/2012/12).
+ *
+ * This is a complex type.
+ */
+public interface AfterAnyList extends org.apache.xmlbeans.XmlObject
+{
+ public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(AfterAnyList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("afteranylisteefatype");
+
+ /**
+ * Gets array of all "afterAny" elements
+ */
+ java.lang.String[] getAfterAnyArray();
+
+ /**
+ * Gets ith "afterAny" element
+ */
+ java.lang.String getAfterAnyArray(int i);
+
+ /**
+ * Gets (as xml) array of all "afterAny" elements
+ */
+ org.apache.xmlbeans.XmlString[] xgetAfterAnyArray();
+
+ /**
+ * Gets (as xml) ith "afterAny" element
+ */
+ org.apache.xmlbeans.XmlString xgetAfterAnyArray(int i);
+
+ /**
+ * Returns number of "afterAny" element
+ */
+ int sizeOfAfterAnyArray();
+
+ /**
+ * Sets array of all "afterAny" element
+ */
+ void setAfterAnyArray(java.lang.String[] afterAnyArray);
+
+ /**
+ * Sets ith "afterAny" element
+ */
+ void setAfterAnyArray(int i, java.lang.String afterAny);
+
+ /**
+ * Sets (as xml) array of all "afterAny" element
+ */
+ void xsetAfterAnyArray(org.apache.xmlbeans.XmlString[] afterAnyArray);
+
+ /**
+ * Sets (as xml) ith "afterAny" element
+ */
+ void xsetAfterAnyArray(int i, org.apache.xmlbeans.XmlString afterAny);
+
+ /**
+ * Inserts the value as the ith "afterAny" element
+ */
+ void insertAfterAny(int i, java.lang.String afterAny);
+
+ /**
+ * Appends the value as the last "afterAny" element
+ */
+ void addAfterAny(java.lang.String afterAny);
+
+ /**
+ * Inserts and returns a new empty value (as xml) as the ith "afterAny" element
+ */
+ org.apache.xmlbeans.XmlString insertNewAfterAny(int i);
+
+ /**
+ * Appends and returns a new empty value (as xml) as the last "afterAny" element
+ */
+ org.apache.xmlbeans.XmlString addNewAfterAny();
+
+ /**
+ * Removes the ith "afterAny" element
+ */
+ void removeAfterAny(int i);
+
+ /**
+ * A factory class with static methods for creating instances
+ * of this type.
+ */
+
+ public static final class Factory
+ {
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList newInstance() {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList newInstance(org.apache.xmlbeans.XmlOptions options) {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
+
+ /** @param xmlAsString the string value to parse */
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
+
+ /** @param file the file from which to load an xml document */
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
+
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
+
+ /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
+
+ /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+ public static org.apache.airavata.gfac.core.x2012.x12.AfterAnyList parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+ return (org.apache.airavata.gfac.core.x2012.x12.AfterAnyList) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
+
+ /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+ return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
+
+ /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
+ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
+ return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
+
+ private Factory() { } // No instance of this class allowed
+ }
+}