annotate WebServiceToolWorkflow/getMethods.py @ 0:d5cd409b8a18 default tip

Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
author ganjoo
date Tue, 07 Jun 2011 18:00:50 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
1 import warnings
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
2
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
3 with warnings.catch_warnings():
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
4 warnings.simplefilter("ignore")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
5 import platform
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
6
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
7 from jpype._jpackage import JPackage
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
8 from jpype import *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
9 import os.path
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
10 import sys
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
11
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
12 class Document(object):
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
13
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
14 #invoked to get methods described in a WADL document
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
15 def getWADLMethods(self, wadlUrl, outputFileUrl ):
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
16
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
17 #get environment variables JAVA_HOME and GALAXY_HOME
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
18 javahome = os.environ.get('JAVA_HOME')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
19 galaxyhome=os.environ.get('GALAXY_HOME')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
20
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
21 #classpath, jarpath are variables pointing to the java libraries required to parse a WADL document
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
22 classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
23 jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
24
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
25 #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
26 #you can replace lines 28 to 35, with startJVM("LOCATION OF YOUR LIBJVM.SO","-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
27 machine = platform.machine()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
28 if machine == 'x86_64' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
29 startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
30 elif machine == 'i686' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
31 startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
32 elif machine == 'sun4u' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
33 startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
34 else :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
35 System.exit("Could not identify machine, please specify path to libjvm.so")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
36
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
37 #tell JPYPE that the package name is lsdis
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
38 pkg=JPackage('lsdis')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
39
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
40 urlToPass=java.net.URL(wadlUrl)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
41
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
42 #convert __tilda__ to ~
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
43 if(wadlUrl.find('__tilda__')>-1):
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
44 ulist = wadlUrl.split('__tilda__')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
45 urlToPass = java.net.URL('~'.join(ulist))
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
46
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
47
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
48 outputfile=open(outputFileUrl,'w')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
49 outputfile.seek(0,0)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
50
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
51 urls = []
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
52 methods = []
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
53
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
54 #using JPYPE call appropriate Java classes and methods to parse the WADL document and get a list of methods defined in it
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
55 WADLParserDriver=pkg.WADLParserDriver
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
56 wPD=WADLParserDriver()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
57 wPD.parse(urlToPass)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
58 urls = wPD.getUrl()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
59 methods = wPD.getCompleteMethodList()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
60
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
61 #write the url of the WADL and the list of methods to the output in a tabular format, for the Step 2 tool to read from.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
62 i=0
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
63 for url in urls:
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
64 outputfile.write(wadlUrl+"\t")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
65 outputfile.write(str(methods[i].getId())+"\t")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
66 outputfile.write(str(url)+"\n")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
67 i=i+1
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
68
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
69
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
70
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
71 #invoked to get REST methods described in a WSDL 2.0 document. Steps are similar to getWADLMethods except the library to parse WSDL 2.0 is used.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
72 def getWSDLMethods(self, wsdlUrl, outputFileUrl ):
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
73 javahome = os.environ.get('JAVA_HOME')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
74 galaxyhome=os.environ.get('GALAXY_HOME')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
75 classpath= galaxyhome + '/tools/restClientWSDL/WodenWSDLParser/bin'
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
76 jarpath = galaxyhome + '/tools/restClientWSDL/WodenWSDLParser/lib/'
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
77 machine = platform.machine()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
78
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
79 #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
80 #you can replace lines 81 to 88, with startJVM("LOCATION OF YOUR LIBJVM.SO","-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
81 if machine == 'x86_64' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
82 startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
83 elif machine == 'i686' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
84 startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
85 elif machine == 'sun4u' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
86 startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
87 else :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
88 System.exit("Could not identify machine, please specify path to libjvm.so")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
89
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
90 pkg=JPackage('lsdis')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
91
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
92 outputfile=open(outputFileUrl,'w')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
93 outputfile.seek(0,0)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
94 length=(len(sys.argv))
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
95
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
96 urls = []
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
97 methods = []
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
98
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
99 if(wsdlUrl.find('__tilda__')>-1):
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
100 ulist = wsdlUrl.split('__tilda__')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
101 urlToPass = '~'.join(ulist)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
102
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
103 WSDLParserDriver=pkg.WSDLParserDriver
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
104 wPD=WSDLParserDriver()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
105 wPD.parse(urlToPass)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
106 urls = wPD.getUrl()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
107 methods = wPD.getCompleteMethodList()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
108
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
109 i=0
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
110 for url in urls:
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
111 outputfile.write(wsdlUrl+"\t")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
112 outputfile.write(str(methods[i].getName().getLocalPart())+"\t")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
113 outputfile.write(str(url)+"\n")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
114 i=i+1
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
115
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
116
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
117 # invoked to get methods described in a SAWADL document
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
118 def getSAWADLMethods(self, sawadlUrl, outputFileUrl ):
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
119 javahome = os.environ.get('JAVA_HOME')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
120 galaxyhome=os.environ.get('GALAXY_HOME')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
121 classpath= galaxyhome + '/tools/restclientSAWADL/lib/SAWADLParser/bin'
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
122 machine = platform.machine()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
123
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
124 #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
125 #you can replace lines 126 to 133, with startJVM("LOCATION OF YOUR LIBJVM.SO","-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
126 if machine == 'x86_64' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
127 startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
128 elif machine == 'i686' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
129 startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
130 elif machine == 'sun4u' :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
131 startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
132 else :
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
133 System.exit("Could not identify machine, please specify path to libjvm.so")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
134
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
135 pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
136
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
137
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
138
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
139 outputfile=open(outputFileUrl,'w')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
140 outputfile.seek(0,0)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
141
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
142 if(sawadlUrl.find('__tilda__')>-1):
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
143 ulist = sawadlUrl.split('__tilda__')
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
144 urlToPass = '~'.join(ulist)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
145
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
146 urls = []
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
147 methods = []
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
148
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
149
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
150 SAWADLParserDriver=pkg.SAWADLParserDriver
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
151 sawPD=SAWADLParserDriver()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
152 sawPD.parse(urlToPass)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
153 urls = sawPD.getUrl()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
154 methods = sawPD.getCompleteMethodList()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
155
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
156 i=0
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
157 for url in urls:
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
158 outputfile.write(sawadlUrl+"\t")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
159 outputfile.write(str(methods[i].getName())+"\t")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
160 outputfile.write(str(url)+"\n")
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
161 i=i+1
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
162
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
163
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
164
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
165
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
166