airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject svn commit: r1188882 - /incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/util/SchemaUtil.java
Date Tue, 25 Oct 2011 20:04:07 GMT
Author: smarru
Date: Tue Oct 25 20:04:06 2011
New Revision: 1188882

URL: http://svn.apache.org/viewvc?rev=1188882&view=rev
Log:
test main class 

Modified:
    incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/util/SchemaUtil.java

Modified: incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/util/SchemaUtil.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/util/SchemaUtil.java?rev=1188882&r1=1188881&r2=1188882&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/util/SchemaUtil.java
(original)
+++ incubator/airavata/trunk/modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/util/SchemaUtil.java
Tue Oct 25 20:04:06 2011
@@ -27,6 +27,10 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
 import org.apache.airavata.commons.gfac.type.Type;
+import org.apache.airavata.schemas.gfac.BatchApplicationDeploymentDescriptionDocument;
+import org.apache.airavata.schemas.gfac.BatchApplicationDeploymentDescriptionType;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.XmlObject;
 
 public class SchemaUtil {
     public static Type parseFromXML(String xml) {
@@ -44,4 +48,23 @@ public class SchemaUtil {
         e.close();
         return x.toString();
     }
+    
+    
+    public static void main(String[] args) throws XmlException {
+        
+        BatchApplicationDeploymentDescriptionDocument t = BatchApplicationDeploymentDescriptionDocument.Factory.newInstance();
+        
+        BatchApplicationDeploymentDescriptionType t2 = BatchApplicationDeploymentDescriptionType.Factory.newInstance();
+        
+        t.setBatchApplicationDeploymentDescription(t2 );
+        
+        t2.setCpuCount(4);
+        System.out.println(t);
+        
+        
+        XmlObject k = XmlObject.Factory.parse(t.toString());
+        if (k instanceof BatchApplicationDeploymentDescriptionDocument ){
+            System.out.println("ooo");
+        }
+    }
 }



Mime
View raw message