ops = param.getOptions();
+
+// if(ops.size()==0){
+// System.out.println("No options available");
+// }
+// else{
+// System.out.println("\t options:");
+//
+// for(Option option:param.getOptions()){
+// System.out.println("\t "+option.getName());
+// }
+// }
+ }
+ }
+
+ System.out.println();
+ System.out.println();
+ }
+ }
+}
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/README.doc
Binary file WebServiceToolWorkflow/README.doc has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/ReadMe~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/ReadMe~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,6 @@
+Add tool to tool_conf.xml
+Set GALAXY_HOME
+Set Java class path : refer line 33 in WebServiceTool_input_method.py, line 25 getMethods.py
+
+install: jpype, python, java.
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WADLRESTclient2.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WADLRESTclient2.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,68 @@
+import warnings
+import platform
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+
+
+
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/restclientWADL/ParserForWADL/bin'
+ jarpath = galaxyhome + '/tools/restclientWADL/WADLParser/dist/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+
+ pkg=JPackage('lsdis')
+ urlToPass=java.net.URL(sys.argv[2])
+ wadlUrl = sys.argv[2]
+
+ outputfileParamNames=open(sys.argv[5],'w')
+ outputfileParamNames.seek(0,0)
+# outputfileParamTypes=open(sys.argv[6],'w')
+# outputfileParamTypes.seek(0,0)
+
+ webserviceId = sys.argv[3]
+ resUrl = sys.argv[4]
+
+ urls = []
+ methods = []
+
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ i=0
+ for method in methods:
+ x = str(method.getId())
+ y = str(urls.get(0))
+ if x == webserviceId :
+ if y == resUrl :
+ for param in method.getRequest().getParams():
+ if param.isRequired():
+ val = 'true'
+ else :
+ val = 'false'
+ outputfileParamNames.write(str(param.getName())+"\t" + str(param.getType())+"\t" + str(param.getDefault1()) + "\t" + val +"\t"+resUrl+"\n")
+# outputfileParamTypes.write(str(param.getType())+"\n")
+ break
+ i=i+1
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool1.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool1.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,23 @@
+import warnings
+import platform
+import os,sys
+from getMethods import *
+from getMethods1 import *
+
+url = sys.argv[1]
+urllist = url.split('.')
+
+
+wadlDocument = Document()
+#wadlDocument1 = Document1()
+
+if urllist[len(urllist)-1]=='wadl' or urllist[len(urllist)-1]=='WADL':
+ wadlDocument.getWADLMethods(url,sys.argv[2])
+ # wadlDocument1.getWADLMethods(url,sys.argv[2])
+elif urllist[len(urllist)-1]=='wsdl' or urllist[len(urllist)-1]=='WSDL':
+ wadlDocument.getWSDLMethods(url,sys.argv[2])
+ # wadlDocument1.getWSDLMethods(url,sys.argv[2])
+elif urllist[len(urllist)-1]=='sawadl' or urllist[len(urllist)-1]=='SAWADL':
+ wadlDocument.getSAWADLMethods(url,sys.argv[2])
+ # wadlDocument1.getSAWADLMethods(url,sys.argv[2])
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool1.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool1.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,77 @@
+
+ This tool takes the URL of an external Web service. The URL should point to the description document of a Web service. Currently support for only REST Web services is provided. Therefore, this description document can be a WADL or WSDL 2.0 or SAWADL document only.
+
+ WebServiceTool_input_url.py
+ $url
+ $output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** Enter the url (of the REST Web service) description document of type WADL, WSDL 2.0, or SAWADL in the above box.
+
+
+All the Web services come with a description document like WADL or WSDL document. Galaxy can read this information
+to create the tool.
+
+For further assistance find samples of WADL, WSDL 2.0 and SAWADL below.
+
+WADL : DDBJ sample services:
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJBlast.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJGetEntry.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJNCBIGenomeAnnotationGetGeneList.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/Ensembl.wadl
+
+
+ More detailed information about all REST services at DDBJ can be found at http://www.xml.nig.ac.jp/index.html
+
+
+ EuPathDB sample services:
+
+ http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.wadl
+
+
+ http://eupathdb.org/eupathdb/webservices/GeneQuestions/GenesByTextSearch.wadl
+
+
+ More detailed information about all REST services at EuPathDB can be found at http://eupathdb.org/eupathdb/serviceList.jsp
+
+
+SAWADL :
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/GenesByTextSearch.sawadl
+
+
+WSDL 2.0 :
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/booklist.wsdl
+
+*NOTE: Step 1, Step 2 and Step 3 merely add this tool to Galaxy. To use the tool, after completing Step 3, go to the Tools section on left
+and find the tool under Web Service Tools and Web Service Workflow Tools.*
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool2.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool2.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,82 @@
+import warnings
+import platform
+import os,sys
+from generateClient import *
+from generateClient1 import *
+
+##input : wadl/wsdl/sawadl-url, method name
+##generate a client as tool for Galaxy:
+#1. Add client xml address to Galaxy tool-conf.xml file - call edit_tool_conf.py
+#2. Generate client xml file - call generate client.py
+
+url = sys.argv[2]
+urllist = url.split('.')
+
+#f=open(sys.argv[5],'w')
+#f.write('url: ' + url + '\t')
+#f.write('reached here 1')
+#f.close()
+
+clientGenerator = ClientGenerator(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
+clientGenerator1 = ClientGenerator1(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
+
+if urllist[len(urllist)-1]=='wadl' or urllist[len(urllist)-1]=='WADL':
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+ clientGenerator1.wadlClient()
+ clientGenerator.wadlClient()
+
+elif urllist[len(urllist)-1]=='wsdl' or urllist[len(urllist)-1]=='WSDL':
+ clientGenerator.wsdlClient()
+ clientGenerator1.wsdlClient()
+elif urllist[len(urllist)-1]=='sawadl' or urllist[len(urllist)-1]=='SAWADL':
+
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/lib/SAWADLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ #f=open(sys.argv[5],'w')
+ #f.write('reached here 2 \t')
+ #f.close()
+
+ clientGenerator.sawadlClient()
+ clientGenerator1.sawadlClient()
+ #f=open(sys.argv[5],'w')
+ #f.write('reached here 3')
+ #f.close()
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool2.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool2.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,76 @@
+
+ This tool lets the user choose a method and a resource from the Web service description document. Many methods/operations could be grouped together in one description document. But each method/operation requires a unique tool to invoke it. So each method has to be registered with Galaxy individually.
+
+ WebServiceTool_input_method.py
+ $url
+ $wadl
+ $webservice
+ $resourceUrl
+ $output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** a. For your information only. The previous step that was executed is displayed. No action required.
+
+.. class:: infomark
+
+**TIP:** b. Displays the Web service tool chosen in Step 1. No action required
+
+.. class:: infomark
+
+**TIP:** c. Some tools have more than one function. It is important to select the appropriate function.
+ One or more functions may be displayed here.
+
+.. class:: infomark
+
+**TIP:** d. Different tools have different options to refine the tool. This could be a choice of formats
+ or resources you want to search.
+ Make selection based on tool documentation or experience.
+
+
+*NOTE: Step 1, Step 2 and Step 3 merely add this tool to Galaxy. To use the tool, after completing Step 3, go to the Tools section on left
+and find the tool under Web Service Tools and Web Service Workflow Tools.*
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool_input_method.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool_input_method.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,94 @@
+import warnings
+import platform
+import os,sys
+from generateClient import *
+from generateClient1 import *
+
+'''input : wadl/wsdl/sawadl-url, method name
+purpose:
+1. Calls methods from generateClient1.py to generate client description for one-time invocation
+of the Web service. This client description is added as a xml file under ./clients/
+2. Calls methods from generateClient.py to generate client description for invocation of Web service
+in a workflow. This client description is added as a xml file under ./workflowclients/
+3. Adds the path to the above xml files to Galaxy tool-conf.xml file using call edit_tool_conf.py
+'''
+
+#read the url passed as an argument
+url = sys.argv[2]
+
+#split url passed on '.' character
+urllist = url.split('.')
+
+clientGenerator = ClientGenerator(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
+clientGenerator1 = ClientGenerator1(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
+
+#if url passed is of a WADL document
+if urllist[len(urllist)-1]=='wadl' or urllist[len(urllist)-1]=='WADL':
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ machine = platform.machine()
+
+#start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
+#you can replace lines 32 to 41, with startJVM("LOCATION OF YOUR LIBJVM.SO","-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+#generate client xml for one time invocation of a Web service
+ clientGenerator1.wadlClient()
+
+#generate client xml for invocation of a Web service in workflows
+ clientGenerator.wadlClient()
+
+#if url passed is of a WSDL 2.0 document
+elif urllist[len(urllist)-1]=='wsdl' or urllist[len(urllist)-1]=='WSDL':
+ clientGenerator.wsdlClient()
+ clientGenerator1.wsdlClient()
+
+#if url passed is of a SAWADL document
+elif urllist[len(urllist)-1]=='sawadl' or urllist[len(urllist)-1]=='SAWADL':
+
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/lib/SAWADLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ #f=open(sys.argv[5],'w')
+ #f.write('reached here 2 \t')
+ #f.close()
+
+ clientGenerator.sawadlClient()
+ clientGenerator1.sawadlClient()
+ #f=open(sys.argv[5],'w')
+ #f.write('reached here 3')
+ #f.close()
+
+ shutdownJVM()
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool_input_method.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool_input_method.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,85 @@
+import warnings
+import platform
+import os,sys
+from generateClient import *
+from generateClient1 import *
+
+'''input : wadl/wsdl/sawadl-url, method name
+purpose:
+1. Calls methods from generateClient1.py to generate client description for one-time invocation
+of the Web service. This client description is added as a xml file under ./clients/
+2. Calls methods from generateClient.py to generate client description for invocation of Web service
+in a workflow. This client description is added as a xml file under ./workflowclients/
+3. Adds the path to the above xml files to Galaxy tool-conf.xml file using call edit_tool_conf.py
+'''
+
+#read the url passed as an argument
+url = sys.argv[2]
+urllist = url.split('.')
+
+clientGenerator = ClientGenerator(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
+clientGenerator1 = ClientGenerator1(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
+
+if urllist[len(urllist)-1]=='wadl' or urllist[len(urllist)-1]=='WADL':
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ machine = platform.machine()
+
+#start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
+#you can replace lines 32 to 41, with startJVM("LOCATION OF YOUR LIBJVM.SO","-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ clientGenerator1.wadlClient()
+ clientGenerator.wadlClient()
+
+elif urllist[len(urllist)-1]=='wsdl' or urllist[len(urllist)-1]=='WSDL':
+ clientGenerator.wsdlClient()
+ clientGenerator1.wsdlClient()
+elif urllist[len(urllist)-1]=='sawadl' or urllist[len(urllist)-1]=='SAWADL':
+
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/lib/SAWADLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ #f=open(sys.argv[5],'w')
+ #f.write('reached here 2 \t')
+ #f.close()
+
+ clientGenerator.sawadlClient()
+ clientGenerator1.sawadlClient()
+ #f=open(sys.argv[5],'w')
+ #f.write('reached here 3')
+ #f.close()
+
+ shutdownJVM()
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool_input_method.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool_input_method.xml Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,69 @@
+
+ This tool lets the user choose a method and a resource from the Web service description document. Many methods/operations could be grouped together in one description document. But each method/operation requires a unique tool to invoke it. So each method has to be registered with Galaxy individually.
+
+ WebServiceTool_input_method.py
+ $url
+ $wadl
+ $webservice
+ $resourceUrl
+ $output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** a. For your information only. The previous step that was executed is displayed. No action required.
+
+.. class:: infomark
+
+**TIP:** b. Displays the Web service tool chosen in Step 1. No action required
+
+.. class:: infomark
+
+**TIP:** c. Some tools have more than one function. It is important to select the appropriate function.
+ One or more functions may be displayed here.
+
+.. class:: infomark
+
+**TIP:** d. Different tools have different options to refine the tool. This could be a choice of formats
+ or resources you want to search.
+ Make selection based on tool documentation or experience.
+
+
+*NOTE: Step 1, Step 2 and Step 3 merely add this tool to Galaxy. To use the tool, after completing Step 3, go to the Tools section on left
+and find the tool under Web Service Tools and Web Service Workflow Tools.*
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool_input_method.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool_input_method.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,69 @@
+
+ This tool lets the user choose a method and a resource from the Web service description document. Many methods/operations could be grouped together in one description document. But each method/operation requires a unique tool to invoke it. So each method has to be registered with Galaxy individually.
+
+ WebServiceTool_input_method.py
+ $url
+ $wadl
+ $webservice
+ $resourceUrl
+ $output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** a. For your information only. The previous step that was executed is displayed. No action required.
+
+.. class:: infomark
+
+**TIP:** b. Displays the Web service tool chosen in Step 1. No action required
+
+.. class:: infomark
+
+**TIP:** c. Some tools have more than one function. It is important to select the appropriate function.
+ One or more functions may be displayed here.
+
+.. class:: infomark
+
+**TIP:** d. Different tools have different options to refine the tool. This could be a choice of formats
+ or resources you want to search.
+ Make selection based on tool documentation or experience.
+
+
+*NOTE: Step 1, Step 2 and Step 3 merely add this tool to Galaxy. To use the tool, after completing Step 3, go to the Tools section on left
+and find the tool under Web Service Tools and Web Service Workflow Tools.*
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool_input_url.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool_input_url.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,19 @@
+import platform
+import os,sys
+from getMethods import *
+
+url = sys.argv[1]
+urllist = url.split('.')
+
+#instantiate a Document
+wadlDocument = Document()
+
+#depending on the extension on the document passed call the appropriate method
+if urllist[len(urllist)-1]=='wadl' or urllist[len(urllist)-1]=='WADL':
+ wadlDocument.getWADLMethods(url,sys.argv[2])
+elif urllist[len(urllist)-1]=='wsdl' or urllist[len(urllist)-1]=='WSDL':
+ wadlDocument.getWSDLMethods(url,sys.argv[2])
+elif urllist[len(urllist)-1]=='sawadl' or urllist[len(urllist)-1]=='SAWADL':
+ wadlDocument.getSAWADLMethods(url,sys.argv[2])
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool_input_url.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool_input_url.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,18 @@
+import platform
+import os,sys
+from getMethods import *
+
+url = sys.argv[1]
+urllist = url.split('.')
+
+
+wadlDocument = Document()
+
+if urllist[len(urllist)-1]=='wadl' or urllist[len(urllist)-1]=='WADL':
+ wadlDocument.getWADLMethods(url,sys.argv[2])
+elif urllist[len(urllist)-1]=='wsdl' or urllist[len(urllist)-1]=='WSDL':
+ wadlDocument.getWSDLMethods(url,sys.argv[2])
+elif urllist[len(urllist)-1]=='sawadl' or urllist[len(urllist)-1]=='SAWADL':
+ wadlDocument.getSAWADLMethods(url,sys.argv[2])
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool_input_url.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool_input_url.xml Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,66 @@
+
+ This tool takes the URL of an external Web service. The URL should point to the description document of a Web service. Currently support for only REST Web services is provided. Therefore, this description document can be a WADL or WSDL 2.0 or SAWADL document only.
+
+ WebServiceTool_input_url.py
+ $url
+ $output
+
+
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** Enter the url (of the REST Web service) description document of type WADL, WSDL 2.0, or SAWADL in the above box.
+
+
+All the Web services come with a description document like WADL or WSDL document. Galaxy can read this information
+to create the tool.
+
+For further assistance find samples of WADL, WSDL 2.0 and SAWADL below.
+
+WADL :
+
+ EuPathDB sample services:
+
+ http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.wadl
+
+
+ http://eupathdb.org/eupathdb/webservices/GeneQuestions/GenesByTextSearch.wadl
+
+
+ More detailed information about all REST services at EuPathDB can be found at http://eupathdb.org/eupathdb/serviceList.jsp
+
+
+
+ DDBJ sample services:
+
+ (__tilda__ represents ~ in the URLs below. Use ~, in place of __tilda__, if you are using a browser to access these locations and are not accessing them via Galaxy.)
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJBlast.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJGetEntry.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJNCBIGenomeAnnotationGetGeneList.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/Ensembl.wadl
+
+
+ More detailed information about all REST services at DDBJ can be found at http://www.xml.nig.ac.jp/index.html
+
+
+*NOTE: Step 1, Step 2 and Step 3 merely add this tool to Galaxy. To use the tool, after completing Step 3, go to the Tools section on left
+and find the tool under Web Service Tools and Web Service Workflow Tools.*
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WebServiceTool_input_url.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WebServiceTool_input_url.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,66 @@
+
+ This tool takes the URL of an external Web service. The URL should point to the description document of a Web service. Currently support for only REST Web services is provided. Therefore, this description document can be a WADL or WSDL 2.0 or SAWADL document only.
+
+ WebServiceTool_input_url.py
+ $url
+ $output
+
+
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** Enter the url (of the REST Web service) description document of type WADL, WSDL 2.0, or SAWADL in the above box.
+
+
+All the Web services come with a description document like WADL or WSDL document. Galaxy can read this information
+to create the tool.
+
+For further assistance find samples of WADL, WSDL 2.0 and SAWADL below.
+
+WADL :
+
+ EuPathDB sample services:
+
+ http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.wadl
+
+
+ http://eupathdb.org/eupathdb/webservices/GeneQuestions/GenesByTextSearch.wadl
+
+
+ More detailed information about all REST services at EuPathDB can be found at http://eupathdb.org/eupathdb/serviceList.jsp
+
+
+
+ DDBJ sample services:
+
+ (__tilda__ represents ~ in the URLs below. Use ~, in place of __tilda__, if you are using a browser to access these locations and are not accessing them via Galaxy.)
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJBlast.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJGetEntry.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/DDBJNCBIGenomeAnnotationGetGeneList.wadl
+
+
+ http://cs.uga.edu/__tilda__ganjoo/galaxy/Ensembl.wadl
+
+
+ More detailed information about all REST services at DDBJ can be found at http://www.xml.nig.ac.jp/index.html
+
+
+*NOTE: Step 1, Step 2 and Step 3 merely add this tool to Galaxy. To use the tool, after completing Step 3, go to the Tools section on left
+and find the tool under Web Service Tools and Web Service Workflow Tools.*
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/.classpath
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/.classpath Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/.project
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/.project Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,17 @@
+
+
+ WodenWSDLParser
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/.settings/org.eclipse.jdt.core.prefs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/.settings/org.eclipse.jdt.core.prefs Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,12 @@
+#Tue May 25 18:05:22 EDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/bin/CovertToWSDL2.class
Binary file WebServiceToolWorkflow/WodenWSDLParser/bin/CovertToWSDL2.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/bin/lsdis/WSDLParserDriver.class
Binary file WebServiceToolWorkflow/WodenWSDLParser/bin/lsdis/WSDLParserDriver.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/LICENSE.dom
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/lib/LICENSE.dom Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,71 @@
+This license came from:
+http://www.w3.org/Consortium/Legal/copyright-software-19980720
+
+
+W3C® SOFTWARE NOTICE AND LICENSE
+Copyright © 1994-2001 World
+Wide Web Consortium, World
+Wide Web Consortium , (Massachusetts Institute of
+Technology , Institut National de
+Recherche en Informatique et en Automatique , Keio University ). All Rights Reserved.
+http://www.w3.org/Consortium/Legal/
+
+This W3C work (including software, documents, or other related
+items) is being provided by the copyright holders under the
+following license. By obtaining, using and/or copying this work,
+you (the licensee) agree that you have read, understood, and will
+comply with the following terms and conditions:
+Permission to use, copy, modify, and distribute this software
+and its documentation, with or without modification, for any
+purpose and without fee or royalty is hereby granted, provided that
+you include the following on ALL copies of the software and
+documentation or portions thereof, including modifications, that
+you make:
+
+The full text of this NOTICE in a location viewable to users of
+the redistributed or derivative work.
+
+Any pre-existing intellectual property disclaimers, notices, or
+terms and conditions. If none exist, a short notice of the
+following form (hypertext is preferred, text is permitted) should
+be used within the body of any redistributed or derivative code:
+"Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of
+Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
+http://www.w3.org/Consortium/Legal/"
+
+Notice of any changes or modifications to the W3C files,
+including the date changes were made. (We recommend you provide
+URIs to the location from which the code is derived.)
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND
+COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
+USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
+PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
+SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
+SOFTWARE OR DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in
+advertising or publicity pertaining to the software without
+specific, written prior permission. Title to copyright in this
+software and any associated documentation will at all times remain
+with copyright holders.
+____________________________________
+This formulation of W3C's notice and license became active on
+August 14 1998 so as to improve compatibility with GPL. This
+version ensures that W3C software licensing terms are no more
+restrictive than GPL and consequently W3C software may be
+distributed in GPL packages. See the older formulation for the
+policy prior to this date. Please see our Copyright FAQ for common
+questions about using materials from
+our site, including specific terms and conditions for packages like
+libwww, Amaya, and Jigsaw.
+Other questions about this notice can be
+directed to site-policy@w3.org.
+
+webmaster
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/LICENSE.sax
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/lib/LICENSE.sax Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,20 @@
+This license came from: http://www.megginson.com/SAX/copying.html
+ However please note future versions of SAX may be covered
+ under http://saxproject.org/?selected=pd
+
+
+This page is now out of date -- see the new SAX site at
+http://www.saxproject.org/ for more up-to-date
+releases and other information. Please change your bookmarks.
+
+
+SAX2 is Free!
+
+I hereby abandon any property rights to SAX 2.0 (the Simple API for
+XML), and release all of the SAX 2.0 source code, compiled code, and
+documentation contained in this distribution into the Public Domain.
+SAX comes with NO WARRANTY or guarantee of fitness for any
+purpose.
+
+David Megginson, david@megginson.com
+2000-05-05
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/LICENSE.wsdl4j.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/lib/LICENSE.wsdl4j.html Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,229 @@
+
+
+Body
+
+
+
+Common Public License - v 1.0
+
+
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.
+
+
1. DEFINITIONS
+
"Contribution" means:
+
a) in the case of the initial Contributor, the initial code
+ and documentation distributed under this Agreement, and b) in
+ the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate
+ from and are distributed by that particular Contributor. A
+ Contribution 'originates' from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include additions to the Program
+ which: (i) are separate modules of software distributed in conjunction with
+ the Program under their own license agreement, and (ii) are not derivative
+ works of the Program.
+
+
"Contributor" means any person or entity that distributes the
+Program.
+
+
"Licensed Patents " mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.
+
+
"Program" means the Contributions
+distributed in accordance with this Agreement.
+
+
"Recipient" means anyone who receives the Program under this
+Agreement, including all Contributors.
+
+
2. GRANT OF RIGHTS
+
a) Subject to the
+ terms of this Agreement, each Contributor hereby grants
+ Recipient a non-exclusive, worldwide, royalty-free copyright license
+ to reproduce, prepare
+ derivative works of, publicly display, publicly perform, distribute and
+ sublicense the Contribution of such Contributor, if any, and such derivative
+ works, in source code and object code form.
+
+b) Subject to the terms of this
+ Agreement, each Contributor hereby grants Recipient a
+ non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell,
+ offer to sell, import and otherwise transfer the Contribution of such
+ Contributor, if any, in source code and object code form. This patent license
+ shall apply to the combination of the Contribution and the Program if, at the
+ time the Contribution is added by the Contributor, such addition of the
+ Contribution causes such combination to be covered by the Licensed Patents.
+ The patent license shall not apply to any other combinations which include the
+ Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor
+ grants the licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the patent or
+ other intellectual property rights of any other entity. Each Contributor
+ disclaims any liability to Recipient for claims brought by any other entity
+ based on infringement of intellectual property rights or otherwise. As a
+ condition to exercising the rights and licenses granted hereunder, each
+ Recipient hereby assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party patent license
+ is required to allow Recipient to distribute the Program, it is Recipient's
+ responsibility to acquire that license before distributing the
+Program.
+
+d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant the
+ copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
A Contributor may choose to distribute the Program in
+object code form under its own license agreement, provided that:
+
a) it complies with the terms and conditions of this
+ Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express
+ and implied, including warranties or conditions of title and non-infringement,
+ and implied warranties or conditions of merchantability and fitness for a
+ particular purpose;
+ii) effectively excludes on behalf of
+ all Contributors all liability for damages, including direct, indirect,
+ special, incidental and consequential damages, such as lost profits;
+
+iii) states that
+ any provisions which differ from this Agreement are offered by that
+ Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from
+ such Contributor, and informs licensees how to obtain it in a reasonable
+ manner on or through a medium customarily used for software
+ exchange.
+
+When the Program is made available in source code form:
+
a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy
+ of the Program.
+
+
Contributors
+may not remove or alter any copyright notices contained within the Program.
+
+
+
Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent Recipients
+to identify the originator of the Contribution.
+
+
4. COMMERCIAL DISTRIBUTION
+
Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the like.
+While this license is intended to facilitate the commercial use of the Program,
+the Contributor who includes the Program in a commercial product offering should
+do so in a manner which does not create potential liability for other
+Contributors. Therefore, if a Contributor includes the Program in a commercial
+product offering, such Contributor ("Commercial Contributor") hereby agrees to
+defend and indemnify every other Contributor ("Indemnified Contributor") against
+any losses, damages and costs (collectively "Losses") arising from claims,
+lawsuits and other legal actions brought by a third party against the
+Indemnified Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the Program in a
+commercial product offering. The obligations in this section do not apply to any
+claims or Losses relating to any actual or alleged intellectual property
+infringement. In order to qualify, an Indemnified Contributor must: a) promptly
+notify the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial Contributor
+in, the defense and any related settlement negotiations. The Indemnified
+Contributor may participate in any such claim at its own expense.
+
+
For example, a Contributor might include the Program in a
+commercial product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance claims, or
+offers warranties related to Product X, those performance claims and warranties
+are such Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+
5. NO WARRANTY
+
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
+CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
+PARTICULAR PURPOSE. Each Recipient is solely responsible for
+determining the appropriateness of using and distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not
+limited to the risks and costs of program errors, compliance with applicable
+laws, damage to or loss of data, programs or equipment, and
+unavailability or interruption of operations .
+
+
6. DISCLAIMER OF LIABILITY
+
EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR
+THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGES.
+
+
7. GENERAL
+
If any provision of this Agreement is
+invalid or unenforceable under applicable law, it shall not affect the validity
+or enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.
+
+
If Recipient institutes patent litigation against a Contributor
+with respect to a patent applicable to software (including a cross-claim or
+counterclaim in a lawsuit), then any patent licenses granted by that Contributor
+to such Recipient under this Agreement shall terminate as of the date such
+litigation is filed. In addition, if Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed.
+
+
All Recipient's rights under this Agreement shall terminate if
+it fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance. If all Recipient's rights under this
+Agreement terminate, Recipient agrees to cease use and distribution of the
+Program as soon as reasonably practicable. However, Recipient's obligations
+under this Agreement and any licenses granted by Recipient relating to the
+Program shall continue and survive.
+
+
Everyone is permitted
+to copy and distribute copies of this Agreement, but in order to avoid
+inconsistency the Agreement is copyrighted and may only be modified in the
+following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to
+ time. No one other than the Agreement
+Steward has the right to modify this Agreement. IBM is the initial Agreement
+Steward. IBM may assign the responsibility to serve as the Agreement Steward to
+a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the Agreement
+under which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including its
+Contributions) under the new version.
+ Except as expressly stated in Sections 2(a) and 2(b) above,
+Recipient receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by
+implication, estoppel or otherwise . All
+rights in the Program not expressly granted under this Agreement are
+reserved.
+
+
This Agreement is governed by the laws of the State of New York
+and the intellectual property laws of the United States of America. No party to
+this Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/LICENSE.xerces
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/lib/LICENSE.xerces Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/XmlSchema-1.4.2.jar
Binary file WebServiceToolWorkflow/WodenWSDLParser/lib/XmlSchema-1.4.2.jar has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/axis-wsdl4j-1.3.jar
Binary file WebServiceToolWorkflow/WodenWSDLParser/lib/axis-wsdl4j-1.3.jar has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/woden-api-1.0M8.jar
Binary file WebServiceToolWorkflow/WodenWSDLParser/lib/woden-api-1.0M8.jar has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/woden-impl-dom-1.0M8.jar
Binary file WebServiceToolWorkflow/WodenWSDLParser/lib/woden-impl-dom-1.0M8.jar has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/xercesImpl.jar
Binary file WebServiceToolWorkflow/WodenWSDLParser/lib/xercesImpl.jar has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/lib/xml-apis.jar
Binary file WebServiceToolWorkflow/WodenWSDLParser/lib/xml-apis.jar has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/src/CovertToWSDL2.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/src/CovertToWSDL2.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,28 @@
+import java.io.IOException;
+
+import javax.wsdl.WSDLException;
+
+import org.apache.woden.tool.converter.Convert;
+
+
+public class CovertToWSDL2 {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Convert convert = new Convert();
+ try{
+ try {
+ String convertFile = convert.convertFile("http://www.ebi.ac.uk/ws/services/WSDbfetch", "/home/ganjoo/parser/woden-dom-1.0M8/wsdl/WSDbfetch.wsdl", "/home/ganjoo/parser/woden-dom-1.0M8/wsdl/wsdl2/", true, true);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }catch(WSDLException e){
+ e.printStackTrace();
+ }
+ }
+
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/WodenWSDLParser/src/lsdis/WSDLParserDriver.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/WodenWSDLParser/src/lsdis/WSDLParserDriver.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,207 @@
+package lsdis;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Scanner;
+
+import org.apache.woden.WSDLException;
+import org.apache.woden.WSDLFactory;
+import org.apache.woden.WSDLReader;
+import org.apache.woden.wsdl20.Description;
+import org.apache.woden.wsdl20.ElementDeclaration;
+import org.apache.woden.wsdl20.Endpoint;
+import org.apache.woden.wsdl20.InterfaceMessageReference;
+import org.apache.woden.wsdl20.InterfaceOperation;
+import org.apache.woden.wsdl20.Service;
+import org.apache.woden.wsdl20.Interface;
+import org.apache.woden.wsdl20.extensions.rpc.Direction;
+import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.ws.commons.schema.XmlSchemaAll;
+import org.apache.ws.commons.schema.XmlSchemaComplexType;
+import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaGroupBase;
+import org.apache.ws.commons.schema.XmlSchemaParticle;
+import org.apache.ws.commons.schema.XmlSchemaSequence;
+import org.apache.ws.commons.schema.XmlSchemaType;
+import org.w3c.dom.NamedNodeMap;
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
+public class WSDLParserDriver {
+
+ private List completeMethodList = new ArrayList();
+ private List url = new ArrayList();
+ private List paramList = new ArrayList();
+ private List paramTypeList = new ArrayList();
+
+
+ public List getCompleteMethodList() {
+ return completeMethodList;
+ }
+
+ public List getUrl() {
+ return url;
+ }
+
+ public List getParamList() {
+ return paramList;
+ }
+ public List getParamTypeList() {
+ return paramTypeList;
+ }
+
+ public static void main(String[] args) {
+ /*Scanner keyboard = new Scanner(System.in);
+
+ System.out.println("Enter the wsdl url: ");
+ String wsdlurl = keyboard.next();*/
+ WSDLParserDriver a = new WSDLParserDriver();
+ a.parse("/home/ganjoo/parser/bookstore-sample/booklist.wsdl");
+ for(InterfaceOperation oper:a.getCompleteMethodList()){
+ a.getParameters(oper);
+ }
+ }
+
+ public void parse(String wsdlurl){
+
+ try {
+
+ WSDLFactory factory;
+ factory = WSDLFactory.newInstance();
+ WSDLReader reader = factory.newWSDLReader();
+ reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
+ Description desc = reader.readWSDL(wsdlurl);
+ Service[] services = desc.getServices();
+ for(int i=0;i
+0
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/clients/ClientCount.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/clients/ClientCount.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,2 @@
+
+5
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/clients/client_1.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/clients/client_1.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,28 @@
+import os
+import sys
+import urllib
+'''This script is the client for invoking RESTful Web services.'''
+
+outputFile = open(sys.argv[1],'w')
+resUrl = sys.argv[2]
+
+if(resUrl.find('__tilda__')>-1):
+ ulist = resUrl.split('__tilda__')
+ resUrl = '~'.join(ulist)
+
+paramdict={}
+length=(len(sys.argv))
+
+i=3
+while( i>=3 and i<(length-1)):
+ key=sys.argv[i]
+ val=sys.argv[i+1]
+ while(val.find('**')>-1):
+ vlist = val.split('**')
+ val = ' '.join(vlist)
+ paramdict[key]=val
+ i=i+2
+
+params = urllib.urlencode(paramdict)
+data = urllib.urlopen(resUrl, params).read()
+outputFile.write(data)
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/clients/client_1.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/clients/client_1.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,28 @@
+import os
+import sys
+import urllib
+'''This script is the client for invoking RESTful Web services.'''
+
+outputFile = open(sys.argv[1],'w')
+resUrl = sys.argv[2]
+
+if(resUrl.find('__tilda__')>-1):
+ ulist = resUrl.split('__tilda__')
+ resUrl = '~'.join(ulist)
+
+paramdict={}
+length=(len(sys.argv))
+
+i=3
+while( i>=3 and i<(length-1)):
+ key=sys.argv[i]
+ val=sys.argv[i+1]
+ while(val.find('**')>-1):
+ vlist = val.split('**')
+ val = ' '.join(vlist)
+ paramdict[key]=val
+ i=i+2
+
+params = urllib.urlencode(paramdict)
+data = urllib.urlopen(resUrl, params).read()
+outputFile.write(data)
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/clients/client_1.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/clients/client_1.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,107 @@
+
+ Client for method: genesbytextsearch , Web service: /home/ganjoo/parser/SAWADLParser/euPathWADL/GenesByTextSearch.sawadl
+
+ client_1.py
+ $output
+ http://eupathdb.org/webservices/GeneQuestions/GenesByTextSearch.xml
+ text_search_organism
+ $source0.user_param0
+ text_expression
+ $param1
+ text_fields
+ $param2
+ whole_words
+ $param3
+ max_pvalue
+ $param4
+
+
+
+
+ Param value will be taken from previous step
+ User will enter the param value
+
+
+
+ Entamoeba dispar
+ Entamoeba histolytica
+ Entamoeba invadens
+ Cryptosporidium parvum
+ Cryptosporidium hominis
+ Cryptosporidium muris
+ Giardia Assemblage A isolate WB
+ Giardia Assemblage B isolate GS
+ Giardia Assemblage E isolate P15
+ Encephalitozoon cuniculi
+ Encephalitozoon intestinalis
+ Plasmodium falciparum
+ Plasmodium vivax
+ Plasmodium yoelii
+ Plasmodium berghei
+ Plasmodium chabaudi
+ Plasmodium knowlesi
+ Toxoplasma gondii
+ Neospora caninum
+ Trichomonas vaginalis
+ Trypanosoma cruzi
+ Leishmania braziliensis
+ Leishmania infantum
+ Leishmania major
+ Leishmania mexicana
+ Trypanosoma brucei
+ Trypanosoma congolense
+ Trypanosoma vivax
+
+
+
+
+
+
+
+
+ Gene ID
+ Alias
+ Gene product
+ Phenotype
+ GO terms and definitions
+ Gene notes
+ User comments
+ Protein domain names and descriptions
+ Similar proteins (BLAST hits v. NRDB/PDB)
+ EC descriptions
+ Metabolic pathway names and descriptions
+
+
+ yes
+ no
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** About text_search_organism: type is xsd:string, description from ontology is "Organism identifier"
+
+.. class:: infomark
+
+**TIP:** About text_expression: type is xsd:string, description from ontology is "This term can be used for any free-form comments and annotations."
+
+.. class:: infomark
+
+**TIP:** About text_fields: type is xsd:string, description from ontology is "Undefined concept"
+
+.. class:: infomark
+
+**TIP:** About whole_words: type is xsd:string, description from ontology is "
+ A simple parameter that is a toggle (boolean value), typically a control for a modal tool
+ "
+
+.. class:: infomark
+
+**TIP:** About max_pvalue: type is xsd:string
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/clients/client_3.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/clients/client_3.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,139 @@
+
+ Client for method: genesbymolecularweight , Web service: http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.wadl
+
+ #if $cond_source.optional_param_source=="no" client_1.py $output http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.xml organism $param0 min_molecular_weight $param1 max_molecular_weight $param2 #else #client_1.py $output http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.xml organism $param0 min_molecular_weight $param1 max_molecular_weight $param2 o-fields $cond_source.param3 o-tables $cond_source.param4 #end if
+
+
+
+ Entamoeba dispar
+ Entamoeba histolytica
+ Entamoeba invadens
+ Cryptosporidium parvum
+ Cryptosporidium hominis
+ Cryptosporidium muris
+ Giardia Assemblage A isolate WB
+ Giardia Assemblage B isolate GS
+ Giardia Assemblage E isolate P15
+ Encephalitozoon cuniculi
+ Encephalitozoon intestinalis
+ Plasmodium falciparum
+ Plasmodium vivax
+ Plasmodium yoelii
+ Plasmodium berghei
+ Plasmodium chabaudi
+ Plasmodium knowlesi
+ Toxoplasma gondii
+ Neospora caninum
+ Trichomonas vaginalis
+ Trypanosoma cruzi
+ Leishmania braziliensis
+ Leishmania infantum
+ Leishmania major
+ Leishmania mexicana
+ Trypanosoma brucei
+ Trypanosoma congolense
+ Trypanosoma vivax
+
+
+
+
+
+
+ no
+ yes
+
+
+
+
+
+ all
+ none
+ primary_key
+ formatted_gene_id
+ external_db_name
+ sequence_id
+ chromosome
+ location_text
+ strand
+ gene_type
+ exon_count
+ transcript_length
+ cds_length
+ product
+ protein_length
+ tm_count
+ molecular_weight
+ isoelectric_point
+ ec_numbers_string
+ ortholog_number
+ paralog_number
+ orthomcl_name
+ signalp_scores
+ signalp_peptide
+ ann_go_function
+ ann_go_process
+ ann_go_component
+ pred_go_function
+ pred_go_process
+ pred_go_component
+ organism
+ protein_sequence
+ transcript_sequence
+ cds
+ wdk_weight
+
+
+ all
+ none
+ SNPs
+ GeneModelDump
+ InterPro
+ TMHMM
+ LowComplexity
+ SignalP
+ BlastP
+ Genbank
+ SageTags
+ Notes
+ UserComments
+ CommunityExpComments
+ EcNumber
+ MassSpec
+ GoTerms
+ Aliases
+ Phenotype
+ Y2hInteractions
+ Orthologs
+ MetabolicPathways
+ TaskComments
+ ArrayElements
+ TwoChannelDiffExpr
+ ProteinExpression
+ Mr4Reagents
+ ProteinDatabase
+ GeneLinkouts
+ 3dPreds
+ PdbSimilarities
+ Epitopes
+ IsolateOverlap
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** organism type is xsd:string
+
+.. class:: infomark
+
+**TIP:** min_molecular_weight type is xsd:string
+
+.. class:: infomark
+
+**TIP:** max_molecular_weight type is xsd:string
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/clients/client_5.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/clients/client_5.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,138 @@
+
+ Client for method: genesbymolecularweight , Web service: http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.wadl
+
+ #if $cond_source.optional_param_source=="no" #client_1.py $output http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.xml organism $param0 min_molecular_weight $param1 max_molecular_weight $param2#else #client_1.py $output http://eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.xml organism $param0 min_molecular_weight $param1 max_molecular_weight $param2 o-fields $cond_source.param3 o-tables $cond_source.param4#end if
+
+
+
+ Entamoeba dispar
+ Entamoeba histolytica
+ Entamoeba invadens
+ Cryptosporidium parvum
+ Cryptosporidium hominis
+ Cryptosporidium muris
+ Giardia Assemblage A isolate WB
+ Giardia Assemblage B isolate GS
+ Giardia Assemblage E isolate P15
+ Encephalitozoon cuniculi
+ Encephalitozoon intestinalis
+ Plasmodium falciparum
+ Plasmodium vivax
+ Plasmodium yoelii
+ Plasmodium berghei
+ Plasmodium chabaudi
+ Plasmodium knowlesi
+ Toxoplasma gondii
+ Neospora caninum
+ Trichomonas vaginalis
+ Trypanosoma cruzi
+ Leishmania braziliensis
+ Leishmania infantum
+ Leishmania major
+ Leishmania mexicana
+ Trypanosoma brucei
+ Trypanosoma congolense
+ Trypanosoma vivax
+
+
+
+
+
+
+ no
+ yes
+
+
+
+
+ all
+ none
+ primary_key
+ formatted_gene_id
+ external_db_name
+ sequence_id
+ chromosome
+ location_text
+ strand
+ gene_type
+ exon_count
+ transcript_length
+ cds_length
+ product
+ protein_length
+ tm_count
+ molecular_weight
+ isoelectric_point
+ ec_numbers_string
+ ortholog_number
+ paralog_number
+ orthomcl_name
+ signalp_scores
+ signalp_peptide
+ ann_go_function
+ ann_go_process
+ ann_go_component
+ pred_go_function
+ pred_go_process
+ pred_go_component
+ organism
+ protein_sequence
+ transcript_sequence
+ cds
+ wdk_weight
+
+
+ all
+ none
+ SNPs
+ GeneModelDump
+ InterPro
+ TMHMM
+ LowComplexity
+ SignalP
+ BlastP
+ Genbank
+ SageTags
+ Notes
+ UserComments
+ CommunityExpComments
+ EcNumber
+ MassSpec
+ GoTerms
+ Aliases
+ Phenotype
+ Y2hInteractions
+ Orthologs
+ MetabolicPathways
+ TaskComments
+ ArrayElements
+ TwoChannelDiffExpr
+ ProteinExpression
+ Mr4Reagents
+ ProteinDatabase
+ GeneLinkouts
+ 3dPreds
+ PdbSimilarities
+ Epitopes
+ IsolateOverlap
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** organism type is xsd:string
+
+.. class:: infomark
+
+**TIP:** min_molecular_weight type is xsd:string
+
+.. class:: infomark
+
+**TIP:** max_molecular_weight type is xsd:string
+
+
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/dataMediation.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/dataMediation.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,19 @@
+
+ Tool for coverting data types
+
+ #generateClient.py
+ $input
+ $output
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/dataMediation1.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/dataMediation1.xml~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,19 @@
+
+
+
+ #generateClient.py
+ $input
+ $output
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/edit_tool_conf.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/edit_tool_conf.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,64 @@
+import os
+
+class editToolConfig(object):
+ def addTool(self,toolName):
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ f1=open(galaxyhome+'/tool_conf.xml','r')
+ f1.seek(0,0)
+ f2=open(galaxyhome+'/tool_conf_backup.xml','w')
+ f2.seek(0,0)
+
+ ##first copy everything upto WebServiceTool1.xml into another file f2
+ line = f1.readline()
+ f2.write(line)
+
+ lineStripped=line.lstrip()
+ lineStripped=lineStripped.rstrip()
+
+ #add the workflow Web service invocation tool under Web Service Workflow Tools section
+ while not lineStripped == '':
+ line = f1.readline()
+ f2.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ ## add new tool to f2
+ f2.write(' \n')
+
+ ## copy rest of f1 into f2
+ while not lineStripped == '':
+ line = f1.readline()
+ f2.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ ##close f1 and f2
+ f1.close()
+ f2.close()
+
+ ##interchange modes of f1 and f2
+ f1=open(galaxyhome+'/tool_conf.xml','w')
+ f1.seek(0,0)
+ f2=open(galaxyhome+'/tool_conf_backup.xml','r')
+ f2.seek(0,0)
+
+ line = f2.readline()
+ f1.write(line)
+
+ lineStripped=line.lstrip()
+
+ ##write entire f2 into f1 (reverse roles)
+ while not lineStripped == '':
+ line = f2.readline()
+ f1.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ f1.close()
+ f2.close()
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/edit_tool_conf.pyc
Binary file WebServiceToolWorkflow/edit_tool_conf.pyc has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/edit_tool_conf.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/edit_tool_conf.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,64 @@
+import os
+
+class editToolConfig(object):
+ def addTool(self,toolName):
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ f1=open(galaxyhome+'/tool_conf.xml','r')
+ f1.seek(0,0)
+ f2=open(galaxyhome+'/tool_conf_backup.xml','w')
+ f2.seek(0,0)
+
+ ##first copy everything upto WebServiceTool1.xml into another file f2
+ line = f1.readline()
+ f2.write(line)
+
+ lineStripped=line.lstrip()
+ lineStripped=lineStripped.rstrip()
+
+ #add the workflow Web service invocation tool under Web Service Workflow Tools section
+ while not lineStripped == '':
+ line = f1.readline()
+ f2.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ ## add new tool to f2
+ f2.write(' \n')
+
+ ## copy rest of f1 into f2
+ while not lineStripped == '':
+ line = f1.readline()
+ f2.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ ##close f1 and f2
+ f1.close()
+ f2.close()
+
+ ##interchange modes of f1 and f2
+ f1=open(galaxyhome+'/tool_conf.xml','w')
+ f1.seek(0,0)
+ f2=open(galaxyhome+'/tool_conf_backup.xml','r')
+ f2.seek(0,0)
+
+ line = f2.readline()
+ f1.write(line)
+
+ lineStripped=line.lstrip()
+
+ ##write entire f2 into f1 (reverse roles)
+ while not lineStripped == '\n':
+ line = f2.readline()
+ f1.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ f1.close()
+ f2.close()
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/edit_tool_conf1.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/edit_tool_conf1.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,64 @@
+import os
+
+class editToolConfig1(object):
+ def addTool(self,toolName):
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ f1=open(galaxyhome+'/tool_conf.xml','r')
+ f1.seek(0,0)
+ f2=open(galaxyhome+'/tool_conf_backup.xml','w')
+ f2.seek(0,0)
+
+ #copy everything from tool_conf.xml upto the section 'Web Service Tools' into another file f2
+ line = f1.readline()
+ f2.write(line)
+
+ lineStripped=line.lstrip()
+ lineStripped=lineStripped.rstrip()
+
+ #add the one-time Web service invocation tool under Web Service Tools section
+ while not lineStripped == '':
+ line = f1.readline()
+ f2.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ f2.write(' \n')
+
+ #copy rest of tool_conf.xml file f2
+ while not lineStripped == '':
+ line = f1.readline()
+ f2.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ ##close f1 and f2
+ f1.close()
+ f2.close()
+
+ ##interchange modes of f1 and f2
+ f1=open(galaxyhome+'/tool_conf.xml','w')
+ f1.seek(0,0)
+ f2=open(galaxyhome+'/tool_conf_backup.xml','r')
+ f2.seek(0,0)
+
+ line = f2.readline()
+ f1.write(line)
+
+ lineStripped=line.lstrip()
+ lineStripped = lineStripped.rstrip()
+
+ ##write entire f2 into f1 (reverse roles)
+ while not lineStripped == '':
+ line = f2.readline()
+ f1.write(line)
+ lineStripped = line.lstrip()
+ lineStripped = lineStripped.rstrip()
+ else:
+ print line
+
+ f1.close()
+ f2.close()
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/edit_tool_conf1.pyc
Binary file WebServiceToolWorkflow/edit_tool_conf1.pyc has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/edit_tool_conf1.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/edit_tool_conf1.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,62 @@
+import os
+
+class editToolConfig1(object):
+ def addTool(self,toolName):
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ f1=open(galaxyhome+'/tool_conf.xml','r')
+ f1.seek(0,0)
+ f2=open(galaxyhome+'/tool_conf_backup.xml','w')
+ f2.seek(0,0)
+
+ #copy everything from tool_conf.xml upto the section 'Web Service Tools' into another file f2
+ line = f1.readline()
+ f2.write(line)
+
+ lineStripped=line.lstrip()
+ lineStripped=lineStripped.rstrip()
+
+ #add the one-time Web service invocation tool under Web Service Tools section
+ while not lineStripped == '':
+ line = f1.readline()
+ f2.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ f2.write(' \n')
+
+ #copy rest of tool_conf.xml file f2
+ while not lineStripped == '':
+ line = f1.readline()
+ f2.write(line)
+ lineStripped = line.lstrip()
+ lineStripped=lineStripped.rstrip()
+ else:
+ print line
+
+ ##close f1 and f2
+ f1.close()
+ f2.close()
+
+ ##interchange modes of f1 and f2
+ f1=open(galaxyhome+'/tool_conf.xml','w')
+ f1.seek(0,0)
+ f2=open(galaxyhome+'/tool_conf_backup.xml','r')
+ f2.seek(0,0)
+
+ line = f2.readline()
+ f1.write(line)
+
+ lineStripped=line.lstrip()
+
+ ##write entire f2 into f1 (reverse roles)
+ while not lineStripped == '\n':
+ line = f2.readline()
+ f1.write(line)
+ lineStripped = line.lstrip()
+ else:
+ print line
+
+ f1.close()
+ f2.close()
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/generateClient.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/generateClient.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,551 @@
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import platform
+
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+ import string
+ from edit_tool_conf import *
+
+class ClientGenerator(object):
+
+ #instantiate a client for invocation of the selected method of a Web service in workflows
+ def __init__(self,url,methodName,resourceName,fileName):
+ self.methodName = methodName
+ self.resourceName=resourceName
+ self.Ofile = fileName
+ #replace '__tilda__' with '~'
+ if(url.find('__tilda__')>-1):
+ ulist = url.split('__tilda__')
+ url = '~'.join(ulist)
+ self.url = url
+
+ #replace '**' with ' '
+ def formatString(self,string):
+ l = string.split(' ')
+ return '**'.join(l)
+
+ #generates a xml describing a client capable of invoking a Web service described
+ #using a WADL document. Places this xml tool under ./workflowclients/
+ def wadlClient(self):
+ ##parse wadl
+ #javahome = os.environ.get('JAVA_HOME')
+ #galaxyhome=os.environ.get('GALAXY_HOME')
+ #classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ #jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ #machine = platform.machine()
+
+ #if machine == 'x86_64' :
+ # print 'a'
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # print 'b'
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # print 'c'
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('lsdis')
+ urlToPass=java.net.URL(self.url)
+ wadlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+
+ urls = []
+ methods = []
+ params = []
+
+ #invoke the WADL parser packaged with this tool.
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ #write into the output file information about the method and Web service to be invoked.
+ f=open(self.Ofile,'w')
+ f.write(wadlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+ #get parameters for the selected method of the Web service
+ i=0
+ for method in methods:
+ f.write('\n in methods')
+ x = str(method.getId())
+ y = str(urls.get(i))
+ if x == webserviceId :
+ f.write('\n method matched')
+ f.write('\n y is' + y + ', resUrl is '+resUrl)
+ if y == resUrl :
+ f.write('res matched')
+ params = method.getRequest().getParams()
+ break
+ i=i+1
+
+
+
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ #./workflowclients/ClientCount.xml keeps the count of the clients/tools currently registered in Galaxy for Web service invocation.
+ #read the count and increment it.
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/workflowclients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/workflowclients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+ #include the count in the tool's name and id to uniquely identify it.
+ clientName = 'client_'+ str(clientCount)
+
+ #create a new xml file under ./workflowclients/
+ clientXml=open(galaxyhome+'/tools/WebServiceToolWorkflow/workflowclients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ #write the tool id, name and description
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+ #the workflow tool/client for a REST Web service invokes ./workflowclients/client_1.py to invoke the Web service
+ #write the command tag to specify the arguments passed to this client_1.py
+ clientXml.write(' \n client_1.py\n'+' #if $cond_source.optional_param_source=="no":\n $output\n ' +resUrl+'\n')
+
+
+ j=0
+ for param in params:
+ if param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName())+'\n #if $source'+str(j)+'.source'+str(j)+'_source=="user":\n $source'+str(j)+'.user_param'+str(j)+'\n #else:\n fileInput\n $source' + str(j) + '.cached_param' + str(j)+'\n #end if\n')
+ j=j+1
+
+ clientXml.write(' #else:\n $output\n ' +resUrl+'\n')
+ j=0
+ for param in params:
+ if param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName())+'\n #if $source'+str(j)+'.source'+str(j)+'_source=="user":\n $source'+str(j)+'.user_param'+str(j)+'\n #else:\n fileInput\n $source' + str(j) + '.cached_param' + str(j)+'\n #end if\n')
+ j=j+1
+
+ for param in params:
+ if not param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName())+'\n #if $cond_source.source'+str(j)+'.source'+str(j)+'_source=="user":\n $cond_source.source'+str(j)+'.user_param'+str(j)+'\n #else:\n fileInput\n $cond_source.source' + str(j) + '.cached_param' + str(j)+'\n #end if\n')
+ j=j+1
+
+ clientXml.write(' #end if\n')
+ clientXml.write(' \n')
+
+ #start writing inputs
+ clientXml.write(' \n')
+
+ #create a param for each required parameter described in the WADL. Check if defaults are specified. Create param such that
+ #it can either be given a value manually or the value can be taken from a previous step.
+ j=0
+ for param in params:
+ if param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+
+ clientXml.write('\n \n Param value will be taken from previous step \n User will enter the param value \n \n \n')
+ if param.getOptions().size()==0:
+ clientXml.write(' \n')
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptions():
+ clientXml.write(' '+option.getName()+' \n ')
+ clientXml.write(' \n')
+ clientXml.write(' \n')
+ clientXml.write(' \n \n ')
+ j=j+1
+
+ #create a conditional param for each optional parameter described in the WADL. Again the param can be given a value manually or the value can be taken from
+ #a previous step.
+ clientXml.write(' \n \n no \n yes \n \n \n \n \n')
+
+ for param in params:
+ if not param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+
+ clientXml.write('\n\n \n Param value will be taken from previous step \n User will enter the param value \n\n ')
+ if param.getOptions().size()==0:
+ clientXml.write(' \n')
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptions():
+ clientXml.write(' '+option.getName()+' \n ')
+ clientXml.write(' \n')
+ clientXml.write(' \n')
+ clientXml.write('\n \n \n')
+ j=j+1
+
+
+
+ clientXml.write(' \n \n \n \n \n \n')
+
+ #write information about each parameter in the help section
+ clientXml.write(' \n')
+ clientXml.write('Replace white space with ** in all parameter values\n')
+
+ for param in params:
+ if param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** '+ pName +' type is ' + param.getType()+'\n')
+
+ clientXml.write(' \n ')
+
+ #adds the newly created tool to tool_conf.xml in Galaxy under the 'Web Service Workflow Tools' section.
+ editor = editToolConfig()
+ editor.addTool(clientName)
+
+
+ def sawadlClient(self):
+ ##parse sawadl
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceTool/lib/SAWADLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/lib/'
+ machine = platform.machine()
+
+ #if machine == 'x86_64' :
+ # print 'a'
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # print 'b'
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # print 'c'
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
+ pkgModel =JPackage('org.semanticweb.owlapi.model')
+ pkgApiBinding =JPackage('org.semanticweb.owlapi.apibinding')
+ pkgVocab = JPackage('org.semanticweb.owlapi.vocab')
+
+ DOCUMENT_IRI = "http://cs.uga.edu/~ganjoo/galaxy/EDAM.owl"
+
+ sawadlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ annotationSet = []
+
+ SAWADLParserDriver=pkg.SAWADLParserDriver
+ sawPD=SAWADLParserDriver()
+ sawPD.parse(sawadlUrl)
+ urls = sawPD.getUrl()
+ methods = sawPD.getCompleteMethodList()
+
+ IRI = pkgModel.IRI
+ OWLRDFVocabulary = pkgVocab.OWLRDFVocabulary
+ OWLManager = pkgApiBinding.OWLManager
+ OWLLiteral = pkgModel.OWLLiteral
+ owlOntManager = OWLManager.createOWLOntologyManager()
+ ontology = owlOntManager.loadOntologyFromOntologyDocument(IRI.create(DOCUMENT_IRI))
+ dataFactory = owlOntManager.getOWLDataFactory()
+ propertyComment = dataFactory.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_COMMENT.getIRI())
+
+ f=open(self.Ofile,'w')
+ f.write(sawadlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ i=0
+ for method in methods:
+ x = str(method.getName())
+ y = str(urls.get(i))
+ if x == webserviceId :
+ f.write('method matched')
+ if y == resUrl :
+ f.write('res matched')
+ params = method.getRequest().getParamList()
+ break
+ i=i+1
+
+
+
+
+ ##generate client's xml
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+
+
+
+ clientName = 'client_'+ str(clientCount)
+
+ clientXml=open(galaxyhome+'/tools/WebServiceToolWorkflow/workflowclients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+
+ clientXml.write(' \n #client_1.py \n'+' $output \n ' +resUrl+'\n')
+ ##write such that the parameters passed to client1.py(change name to clientName.py) are dependent on a for loop
+
+
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName())+'\n#if $source'+str(j)+'.source'+str(j)+'_source=="user" $source'+str(j)+'.user_param'+str(j)+' #else $source' + str(j) + '.cached_param' + str(j)+' #end if\n')
+ j=j+1
+ clientXml.write('#if $cond_source.optional_param_source=="yes"')
+
+ for param in params:
+ if not param.getRequired()=='true' and not param.getRequired()=='True' and not param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName())+'\n#if $cond_source.source'+str(j)+'.source'+str(j)+'_source=="user" $cond_source.source'+str(j)+'.user_param'+str(j)+' #else $cond_source.source' + str(j) + '.cached_param' + str(j)+' #end if\n')
+ j=j+1
+
+ clientXml.write('#else \n#end if\n')
+ clientXml.write(' \n')
+
+ ##write inputs depending on required or not. if not required den dont display
+ ##if required- den check default value, and if options exist.Depending on that
+ ##decide the type of parameter and options
+ clientXml.write(' \n')
+
+
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write('\n \n Param value will be taken from previous step \n User will enter the param value \n \n \n')
+ if param.getOptionvalue().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptionvalue():
+ clientXml.write(' '+option+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+ clientXml.write(' \n')
+ clientXml.write(' \n \n ')
+
+ clientXml.write(' \n \n no \n yes \n \n \n \n \n')
+
+ for param in params:
+ if not param.getRequired()=='true' and not param.getRequired()=='True' and not param.getRequired()=='TRUE':
+ clientXml.write('\n \n Param value will be taken from previous step \n User will enter the param value \n \n \n')
+ if param.getOptionvalue().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptionvalue():
+ clientXml.write(' '+option+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+ clientXml.write(' \n')
+ clientXml.write(' \n \n ')
+
+ clientXml.write(' \n \n')
+
+ clientXml.write(' \n \n \n \n')
+
+ clientXml.write(' \n')
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** About '+ param.getName() +': type is ' + param.getType())
+
+ modelRef = sawPD.getCompleteModelReference(param)
+ if not modelRef is None:
+ paramClass = dataFactory.getOWLClass(IRI.create(modelRef));
+ annotationSet = paramClass.getAnnotations(ontology,propertyComment)
+ for annotation in annotationSet:
+ if isinstance(annotation.getValue(),OWLLiteral):
+ val = annotation.getValue()
+ if val.isOWLStringLiteral() and not val.isOWLTypedLiteral():
+ print 'val.getLiteral()=' + val.getLiteral()
+ clientXml.write(', description from ontology is "' + val.getLiteral()+'"')
+ break
+ clientXml.write('\n')
+ clientXml.write(' \n ')
+ editor = editToolConfig()
+ editor.addTool(clientName)
+
+ ##later add help feature
+
+ def wsdlClient(self):
+ ##parse wadl
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceTool/WodenWSDLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/WodenWSDLParser/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('lsdis')
+ wsdlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ paramTypes = []
+
+ WSDLParserDriver =pkg.WSDLParserDriver
+ wPD=WSDLParserDriver()
+ wPD.parse(wsdlUrl)
+ methods = wPD.getCompleteMethodList()
+ urls = wPD.getUrl()
+
+ f=open(self.Ofile,'w')
+ f.write(wsdlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ i=0
+ for method in methods:
+ x = str(method.getName().getLocalPart())
+ if x == webserviceId :
+ wPD.getParameters(x)
+ f.write('method matched')
+ paramTypes = wPD.getParamTypeList()
+ params = wPD.getParamList()
+ break
+ i=i+1
+
+
+
+
+ ##generate client's xml
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+
+
+
+ clientName = 'client_'+ str(clientCount)
+
+ clientXml=open(galaxyhome+'/tools/WebServiceTool/clients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+
+ clientXml.write(' \n client_1.py \n'+' $output \n ' +resUrl+'\n')
+ ##write such that the parameters passed to client1.py(change name to clientName.py) are dependent on a for loop
+
+ j=0
+ for param in params:
+ clientXml.write(' '+self.formatString(param)+'\n')
+ clientXml.write(' $param' + str(j)+'\n')
+ j=j+1
+ clientXml.write(' \n')
+
+ ##write inputs depending on required or not. if not required den dont display
+ ##if required- den check default value, and if options exist.Depending on that
+ ##decide the type of parameter and options
+ clientXml.write(' \n')
+
+ j=0
+ for param in params:
+ clientXml.write(' \n')
+ j=j+1
+
+
+
+ clientXml.write(' \n \n \n \n')
+
+ clientXml.write(' \n')
+
+ j=0
+ for param in params:
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** '+ param +' type is ' + paramTypes[j] +'\n')
+
+ clientXml.write(' \n ')
+ editor = editToolConfig()
+ editor.addTool(clientName)
+
+ ##later add help feature
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/generateClient.pyc
Binary file WebServiceToolWorkflow/generateClient.pyc has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/generateClient.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/generateClient.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,551 @@
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import platform
+
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+ import string
+ from edit_tool_conf import *
+
+class ClientGenerator(object):
+
+ #instantiate a client for invocation of the selected method of a Web service in workflows
+ def __init__(self,url,methodName,resourceName,fileName):
+ self.methodName = methodName
+ self.resourceName=resourceName
+ self.Ofile = fileName
+ #replace '__tilda__' with '~'
+ if(url.find('__tilda__')>-1):
+ ulist = url.split('__tilda__')
+ url = '~'.join(ulist)
+ self.url = url
+
+ #replace '**' with ' '
+ def formatString(self,string):
+ l = string.split(' ')
+ return '**'.join(l)
+
+ #generates a xml describing a client capable of invoking a Web service described
+ #using a WADL document. Places this xml tool under ./workflowclients/
+ def wadlClient(self):
+ ##parse wadl
+ #javahome = os.environ.get('JAVA_HOME')
+ #galaxyhome=os.environ.get('GALAXY_HOME')
+ #classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ #jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ #machine = platform.machine()
+
+ #if machine == 'x86_64' :
+ # print 'a'
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # print 'b'
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # print 'c'
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('lsdis')
+ urlToPass=java.net.URL(self.url)
+ wadlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+
+ urls = []
+ methods = []
+ params = []
+
+ #invoke the WADL parser packaged with this tool.
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ #write into the output file information about the method and Web service to be invoked.
+ f=open(self.Ofile,'w')
+ f.write(wadlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+ #get parameters for the selected method of the Web service
+ i=0
+ for method in methods:
+ f.write('\n in methods')
+ x = str(method.getId())
+ y = str(urls.get(i))
+ if x == webserviceId :
+ f.write('\n method matched')
+ f.write('\n y is' + y + ', resUrl is '+resUrl)
+ if y == resUrl :
+ f.write('res matched')
+ params = method.getRequest().getParams()
+ break
+ i=i+1
+
+
+
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ #./workflowclients/ClientCount.xml keeps the count of the clients/tools currently registered in Galaxy for Web service invocation.
+ #read the count and increment it.
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/workflowclients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/workflowclients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+ #include the count in the tool's name and id to uniquely identify it.
+ clientName = 'client_'+ str(clientCount)
+
+ #create a new xml file under ./workflowclients/
+ clientXml=open(galaxyhome+'/tools/WebServiceToolWorkflow/workflowclients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ #write the tool id, name and description
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+ #the workflow tool/client for a REST Web service invokes ./workflowclients/client_1.py to invoke the Web service
+ #write the command tag to specify the arguments passed to this client_1.py
+ clientXml.write(' \n client_1.py\n'+' #if $cond_source.optional_param_source=="no":\n $output\n ' +resUrl+'\n')
+
+
+ j=0
+ for param in params:
+ if param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName())+'\n #if $source'+str(j)+'.source'+str(j)+'_source=="user":\n $source'+str(j)+'.user_param'+str(j)+'\n #else:\n fileInput\n $source' + str(j) + '.cached_param' + str(j)+'\n #end if\n')
+ j=j+1
+
+ clientXml.write(' #else:\n $output\n ' +resUrl+'\n')
+ j=0
+ for param in params:
+ if param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName())+'\n #if $source'+str(j)+'.source'+str(j)+'_source=="user":\n $source'+str(j)+'.user_param'+str(j)+'\n #else:\n fileInput\n $source' + str(j) + '.cached_param' + str(j)+'\n #end if\n')
+ j=j+1
+
+ for param in params:
+ if not param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName())+'\n #if $cond_source.source'+str(j)+'.source'+str(j)+'_source=="user":\n $cond_source.source'+str(j)+'.user_param'+str(j)+'\n #else:\n fileInput\n $cond_source.source' + str(j) + '.cached_param' + str(j)+'\n #end if\n')
+ j=j+1
+
+ clientXml.write(' #end if\n')
+ clientXml.write(' \n')
+
+ #start writing inputs
+ clientXml.write(' \n')
+
+ #create a param for each required parameter described in the WADL. Check if defaults are specified. Create param such that
+ #it can either be given a value manually or the value can be taken from a previous step.
+ j=0
+ for param in params:
+ if param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+
+ clientXml.write('\n \n Param value will be taken from previous step \n User will enter the param value \n \n \n')
+ if param.getOptions().size()==0:
+ clientXml.write(' \n')
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptions():
+ clientXml.write(' '+option.getName()+' \n ')
+ clientXml.write(' \n')
+ clientXml.write(' \n')
+ clientXml.write(' \n \n ')
+ j=j+1
+
+ #create a conditional param for each optional parameter described in the WADL. Again the param can be given a value manually or the value can be taken from
+ #a previous step.
+ clientXml.write(' \n \n no \n yes \n \n \n \n \n')
+
+ for param in params:
+ if not param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+
+ clientXml.write('\n\n \n Param value will be taken from previous step \n User will enter the param value \n\n ')
+ if param.getOptions().size()==0:
+ clientXml.write(' \n')
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptions():
+ clientXml.write(' '+option.getName()+' \n ')
+ clientXml.write(' \n')
+ clientXml.write(' \n')
+ clientXml.write('\n \n \n')
+ j=j+1
+
+
+
+ clientXml.write(' \n \n \n \n \n \n')
+
+ #write information about each parameter in the help section
+ clientXml.write(' \n')
+ clientXml.write('Replace white space with ** in all parameter values\n')
+
+ for param in params:
+ if param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** '+ pName +' type is ' + param.getType()+'\n')
+
+ clientXml.write(' \n ')
+
+ #adds the newly created tool to tool_conf.xml in Galaxy under the 'Web Service Workflow Tools' section.
+ editor = editToolConfig()
+ editor.addTool(clientName)
+
+
+ def sawadlClient(self):
+ ##parse sawadl
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceTool/lib/SAWADLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/lib/'
+ machine = platform.machine()
+
+ #if machine == 'x86_64' :
+ # print 'a'
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # print 'b'
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # print 'c'
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
+ pkgModel =JPackage('org.semanticweb.owlapi.model')
+ pkgApiBinding =JPackage('org.semanticweb.owlapi.apibinding')
+ pkgVocab = JPackage('org.semanticweb.owlapi.vocab')
+
+ DOCUMENT_IRI = "http://cs.uga.edu/~ganjoo/galaxy/EDAM.owl"
+
+ sawadlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ annotationSet = []
+
+ SAWADLParserDriver=pkg.SAWADLParserDriver
+ sawPD=SAWADLParserDriver()
+ sawPD.parse(sawadlUrl)
+ urls = sawPD.getUrl()
+ methods = sawPD.getCompleteMethodList()
+
+ IRI = pkgModel.IRI
+ OWLRDFVocabulary = pkgVocab.OWLRDFVocabulary
+ OWLManager = pkgApiBinding.OWLManager
+ OWLLiteral = pkgModel.OWLLiteral
+ owlOntManager = OWLManager.createOWLOntologyManager()
+ ontology = owlOntManager.loadOntologyFromOntologyDocument(IRI.create(DOCUMENT_IRI))
+ dataFactory = owlOntManager.getOWLDataFactory()
+ propertyComment = dataFactory.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_COMMENT.getIRI())
+
+ f=open(self.Ofile,'w')
+ f.write(sawadlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ i=0
+ for method in methods:
+ x = str(method.getName())
+ y = str(urls.get(i))
+ if x == webserviceId :
+ f.write('method matched')
+ if y == resUrl :
+ f.write('res matched')
+ params = method.getRequest().getParamList()
+ break
+ i=i+1
+
+
+
+
+ ##generate client's xml
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+
+
+
+ clientName = 'client_'+ str(clientCount)
+
+ clientXml=open(galaxyhome+'/tools/WebServiceToolWorkflow/workflowclients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+
+ clientXml.write(' \n #client_1.py \n'+' $output \n ' +resUrl+'\n')
+ ##write such that the parameters passed to client1.py(change name to clientName.py) are dependent on a for loop
+
+
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName())+'\n#if $source'+str(j)+'.source'+str(j)+'_source=="user" $source'+str(j)+'.user_param'+str(j)+' #else $source' + str(j) + '.cached_param' + str(j)+' #end if\n')
+ j=j+1
+ clientXml.write('#if $cond_source.optional_param_source=="yes"')
+
+ for param in params:
+ if not param.getRequired()=='true' and not param.getRequired()=='True' and not param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName())+'\n#if $cond_source.source'+str(j)+'.source'+str(j)+'_source=="user" $cond_source.source'+str(j)+'.user_param'+str(j)+' #else $cond_source.source' + str(j) + '.cached_param' + str(j)+' #end if\n')
+ j=j+1
+
+ clientXml.write('#else \n#end if\n')
+ clientXml.write(' \n')
+
+ ##write inputs depending on required or not. if not required den dont display
+ ##if required- den check default value, and if options exist.Depending on that
+ ##decide the type of parameter and options
+ clientXml.write(' \n')
+
+
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write('\n \n Param value will be taken from previous step \n User will enter the param value \n \n \n')
+ if param.getOptionvalue().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptionvalue():
+ clientXml.write(' '+option+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+ clientXml.write(' \n')
+ clientXml.write(' \n \n ')
+
+ clientXml.write(' \n \n no \n yes \n \n \n \n \n')
+
+ for param in params:
+ if not param.getRequired()=='true' and not param.getRequired()=='True' and not param.getRequired()=='TRUE':
+ clientXml.write('\n \n Param value will be taken from previous step \n User will enter the param value \n \n \n')
+ if param.getOptionvalue().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptionvalue():
+ clientXml.write(' '+option+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+ clientXml.write(' \n')
+ clientXml.write(' \n \n ')
+
+ clientXml.write(' \n \n')
+
+ clientXml.write(' \n \n \n \n')
+
+ clientXml.write(' \n')
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** About '+ param.getName() +': type is ' + param.getType())
+
+ modelRef = sawPD.getCompleteModelReference(param)
+ if not modelRef is None:
+ paramClass = dataFactory.getOWLClass(IRI.create(modelRef));
+ annotationSet = paramClass.getAnnotations(ontology,propertyComment)
+ for annotation in annotationSet:
+ if isinstance(annotation.getValue(),OWLLiteral):
+ val = annotation.getValue()
+ if val.isOWLStringLiteral() and not val.isOWLTypedLiteral():
+ print 'val.getLiteral()=' + val.getLiteral()
+ clientXml.write(', description from ontology is "' + val.getLiteral()+'"')
+ break
+ clientXml.write('\n')
+ clientXml.write(' \n ')
+ editor = editToolConfig()
+ editor.addTool(clientName)
+
+ ##later add help feature
+
+ def wsdlClient(self):
+ ##parse wadl
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceTool/WodenWSDLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/WodenWSDLParser/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('lsdis')
+ wsdlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ paramTypes = []
+
+ WSDLParserDriver =pkg.WSDLParserDriver
+ wPD=WSDLParserDriver()
+ wPD.parse(wsdlUrl)
+ methods = wPD.getCompleteMethodList()
+ urls = wPD.getUrl()
+
+ f=open(self.Ofile,'w')
+ f.write(wsdlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ i=0
+ for method in methods:
+ x = str(method.getName().getLocalPart())
+ if x == webserviceId :
+ wPD.getParameters(x)
+ f.write('method matched')
+ paramTypes = wPD.getParamTypeList()
+ params = wPD.getParamList()
+ break
+ i=i+1
+
+
+
+
+ ##generate client's xml
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+
+
+
+ clientName = 'client_'+ str(clientCount)
+
+ clientXml=open(galaxyhome+'/tools/WebServiceTool/clients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+
+ clientXml.write(' \n client_1.py \n'+' $output \n ' +resUrl+'\n')
+ ##write such that the parameters passed to client1.py(change name to clientName.py) are dependent on a for loop
+
+ j=0
+ for param in params:
+ clientXml.write(' '+self.formatString(param)+'\n')
+ clientXml.write(' $param' + str(j)+'\n')
+ j=j+1
+ clientXml.write(' \n')
+
+ ##write inputs depending on required or not. if not required den dont display
+ ##if required- den check default value, and if options exist.Depending on that
+ ##decide the type of parameter and options
+ clientXml.write(' \n')
+
+ j=0
+ for param in params:
+ clientXml.write(' \n')
+ j=j+1
+
+
+
+ clientXml.write(' \n \n \n \n')
+
+ clientXml.write(' \n')
+
+ j=0
+ for param in params:
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** '+ param +' type is ' + paramTypes[j] +'\n')
+
+ clientXml.write(' \n ')
+ editor = editToolConfig()
+ editor.addTool(clientName)
+
+ ##later add help feature
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/generateClient1.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/generateClient1.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,549 @@
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import platform
+
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+ import string
+ from edit_tool_conf1 import *
+
+class ClientGenerator1(object):
+
+ #instantiate a client for one time invocation of the selected method of a Web service
+ def __init__(self,url,methodName,resourceName,fileName):
+ self.methodName = methodName
+ self.resourceName=resourceName
+ self.Ofile = fileName
+ #replace '__tilda__' with '~'
+ if(url.find('__tilda__')>-1):
+ ulist = url.split('__tilda__')
+ url = '~'.join(ulist)
+ self.url = url
+
+ #replace '**' with ' '
+ def formatString(self,string):
+ l = string.split(' ')
+ return '**'.join(l)
+
+ #generates a xml describing a client capable of invoking a Web service described
+ #using a WADL document. Places this xml tool under ./clients/
+ def wadlClient(self):
+ ##parse wadl
+ #javahome = os.environ.get('JAVA_HOME')
+ #galaxyhome=os.environ.get('GALAXY_HOME')
+ #classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ #jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ #machine = platform.machine()
+
+ #if machine == 'x86_64' :
+ # print 'a'
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # print 'b'
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # print 'c'
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('lsdis')
+ urlToPass=java.net.URL(self.url)
+ wadlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ docs = []
+
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ #write into the output file information about the method and Web service to be invoked.
+ f=open(self.Ofile,'w')
+ f.write(wadlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ #get parameters for the selected method of the Web service
+ i=0
+ for method in methods:
+ f.write('in for loop')
+ x = str(method.getId())
+ y = str(urls.get(i))
+ if x == webserviceId :
+ f.write('method matched')
+ if y == resUrl :
+ f.write('res matched')
+ params = method.getRequest().getParams()
+ break
+ i=i+1
+
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ #./clients/ClientCount.xml keeps the count of the clients/tools currently registered in Galaxy for Web service invocation.
+ #read the count and increment it.
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/ClientCount.xml','w')
+
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+ #include the count in the tool's name and id to uniquely identify it.
+ clientName = 'client_'+ str(clientCount)
+
+ #create a new xml file under ./clients/
+ clientXml=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ #write the tool id, name and description
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+ #the one-time invocation tool/client for a REST Web service invokes ./clients/client_1.py to invoke the Web service
+ #write the command tag to specify the arguments passed to this client_1.py
+ clientXml.write(' \n #if $cond_source.optional_param_source=="no" #client_1.py'+' $output ' +resUrl)
+
+ j=0
+
+ for param in params:
+ if param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $param' + str(j))
+ j=j+1
+ clientXml.write(' #else #client_1.py'+' $output ' +resUrl)
+ j=0
+ for param in params:
+ if param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $param' + str(j))
+ j=j+1
+
+ for param in params:
+ if not param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $cond_source.param' + str(j))
+ j=j+1
+ clientXml.write(' #end if \n \n')
+
+ #start writing inputs
+ clientXml.write(' \n')
+
+ #create a param for each required parameter described in the WADL. Check if defaults and options are specified in the WADL
+ j=0
+ for param in params:
+ if param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+ if param.getOptions().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptions():
+ clientXml.write(' '+option.getName()+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+
+ #create a conditional param for each optional parameter described in the WADL.
+ clientXml.write('\n \n \n no \n yes \n \n')
+ clientXml.write(' \n ')
+ clientXml.write(' \n')
+ for param in params:
+ if not param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+ if param.getOptions().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptions():
+ clientXml.write(' '+option.getName()+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+
+
+ clientXml.write(' \n ')
+ clientXml.write(' \n \n \n \n')
+
+ #write information about each parameter in the help section
+ clientXml.write(' \n')
+
+ clientXml.write('Replace white space with ** in all parameter values\n')
+
+ for param in params:
+ if param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** '+ pName +' type is ' + param.getType()+'\n')
+
+ clientXml.write(' \n ')
+
+ #adds the newly created tool to tool_conf.xml in Galaxy under the 'Web Service Tools' section.
+ editor = editToolConfig1()
+ editor.addTool(clientName)
+
+ ##later add help feature
+
+ def sawadlClient(self):
+ ##parse sawadl
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceTool/lib/SAWADLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/lib/'
+ machine = platform.machine()
+
+ #if machine == 'x86_64' :
+ # print 'a'
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # print 'b'
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # print 'c'
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
+ pkgModel =JPackage('org.semanticweb.owlapi.model')
+ pkgApiBinding =JPackage('org.semanticweb.owlapi.apibinding')
+ pkgVocab = JPackage('org.semanticweb.owlapi.vocab')
+
+ DOCUMENT_IRI = "http://cs.uga.edu/~ganjoo/galaxy/EDAM.owl"
+
+ sawadlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ annotationSet = []
+
+ SAWADLParserDriver=pkg.SAWADLParserDriver
+ sawPD=SAWADLParserDriver()
+ sawPD.parse(sawadlUrl)
+ urls = sawPD.getUrl()
+ methods = sawPD.getCompleteMethodList()
+
+ IRI = pkgModel.IRI
+ OWLRDFVocabulary = pkgVocab.OWLRDFVocabulary
+ OWLManager = pkgApiBinding.OWLManager
+ OWLLiteral = pkgModel.OWLLiteral
+ owlOntManager = OWLManager.createOWLOntologyManager()
+ ontology = owlOntManager.loadOntologyFromOntologyDocument(IRI.create(DOCUMENT_IRI))
+ dataFactory = owlOntManager.getOWLDataFactory()
+ propertyComment = dataFactory.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_COMMENT.getIRI())
+
+ f=open(self.Ofile,'w')
+ f.write(sawadlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ i=0
+ for method in methods:
+ x = str(method.getName())
+ y = str(urls.get(i))
+ if x == webserviceId :
+ f.write('method matched')
+ if y == resUrl :
+ f.write('res matched')
+ params = method.getRequest().getParamList()
+ break
+ i=i+1
+
+
+
+
+ ##generate client's xml
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+ clientName = 'client_'+ str(clientCount)
+
+ clientXml=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+
+ clientXml.write(' \n #if $cond_source.optional_param_source=="no" #client_1.py'+' $output ' +resUrl)
+ ##write such that the parameters passed to client1.py(change name to clientName.py) are dependent on a for loop
+
+
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName())+'\n')
+ clientXml.write(' $param' + str(j)+'\n')
+ j=j+1
+
+ clientXml.write(' #else #client_1.py'+' $output ' +resUrl)
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $param' + str(j))
+ j=j+1
+
+ for param in params:
+ if not param.getRequired()=='true' and not param.getRequired()=='True' and not param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $cond_source.param' + str(j))
+ j=j+1
+
+ clientXml.write('#end if \n \n')
+
+ ##write inputs depending on required or not. if not required den dont display
+ ##if required- den check default value, and if options exist.Depending on that
+ ##decide the type of parameter and options
+ clientXml.write(' \n')
+
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ f.write('\n '+ param.getName() + ' options: '+str(param.getOptionvalue().size()))
+ if param.getOptionvalue().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptionvalue():
+ clientXml.write(' '+option+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+
+
+ clientXml.write('\n \n \n no \n yes \n \n')
+ clientXml.write(' \n ')
+ clientXml.write(' \n')
+
+ for param in params:
+ if not param.getRequired()=='true' and not param.getRequired()=='True' and not param.getRequired()=='TRUE':
+ f.write('\n '+ param.getName() + ' options: '+str(param.getOptionvalue().size()))
+ if param.getOptionvalue().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptionvalue():
+ clientXml.write(' '+option+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+
+ clientXml.write(' \n \n')
+
+ clientXml.write(' \n \n \n \n')
+
+ clientXml.write(' \n')
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** About '+ param.getName() +': type is ' + param.getType())
+
+ modelRef = sawPD.getCompleteModelReference(param)
+ if not modelRef is None:
+ paramClass = dataFactory.getOWLClass(IRI.create(modelRef));
+ annotationSet = paramClass.getAnnotations(ontology,propertyComment)
+ for annotation in annotationSet:
+ if isinstance(annotation.getValue(),OWLLiteral):
+ val = annotation.getValue()
+ if val.isOWLStringLiteral() and not val.isOWLTypedLiteral():
+ print 'val.getLiteral()=' + val.getLiteral()
+ clientXml.write(', description from ontology is "' + val.getLiteral()+'"')
+ break
+ clientXml.write('\n')
+ clientXml.write(' \n ')
+ editor = editToolConfig1()
+ editor.addTool(clientName)
+
+ ##later add help feature
+
+ def wsdlClient(self):
+ ##parse wadl
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceTool/WodenWSDLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/WodenWSDLParser/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('lsdis')
+ wsdlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ paramTypes = []
+
+ WSDLParserDriver =pkg.WSDLParserDriver
+ wPD=WSDLParserDriver()
+ wPD.parse(wsdlUrl)
+ methods = wPD.getCompleteMethodList()
+ urls = wPD.getUrl()
+
+ f=open(self.Ofile,'w')
+ f.write(wsdlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ i=0
+ for method in methods:
+ x = str(method.getName().getLocalPart())
+ if x == webserviceId :
+ wPD.getParameters(x)
+ f.write('method matched')
+ paramTypes = wPD.getParamTypeList()
+ params = wPD.getParamList()
+ break
+ i=i+1
+
+
+
+
+ ##generate client's xml
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+
+
+
+ clientName = 'client_'+ str(clientCount)
+
+ clientXml=open(galaxyhome+'/tools/WebServiceTool/clients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+
+ clientXml.write(' \n client_1.py \n'+' $output \n ' +resUrl+'\n')
+ ##write such that the parameters passed to client1.py(change name to clientName.py) are dependent on a for loop
+
+ j=0
+ for param in params:
+ clientXml.write(' '+self.formatString(param)+'\n')
+ clientXml.write(' $param' + str(j)+'\n')
+ j=j+1
+ clientXml.write(' \n')
+
+ ##write inputs depending on required or not. if not required den dont display
+ ##if required- den check default value, and if options exist.Depending on that
+ ##decide the type of parameter and options
+ clientXml.write(' \n')
+
+ j=0
+ for param in params:
+ clientXml.write(' \n')
+ j=j+1
+
+
+
+ clientXml.write(' \n \n \n \n')
+
+ clientXml.write(' \n')
+
+ clientXml.write('** Replace white with ** in all parameter values **\n')
+
+ j=0
+ for param in params:
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** '+ param +' type is ' + paramTypes[j] +'\n')
+
+ clientXml.write(' \n ')
+ editor = editToolConfig()
+ editor.addTool(clientName)
+
+ ##later add help feature
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/generateClient1.pyc
Binary file WebServiceToolWorkflow/generateClient1.pyc has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/generateClient1.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/generateClient1.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,548 @@
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import platform
+
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+ import string
+ from edit_tool_conf1 import *
+
+class ClientGenerator1(object):
+
+ #instantiate a client for one time invocation of the selected method of a Web service
+ def __init__(self,url,methodName,resourceName,fileName):
+ self.methodName = methodName
+ self.resourceName=resourceName
+ self.Ofile = fileName
+ #replace '__tilda__' with '~'
+ if(url.find('__tilda__')>-1):
+ ulist = url.split('__tilda__')
+ url = '~'.join(ulist)
+ self.url = url
+
+ #replace '**' with ' '
+ def formatString(self,string):
+ l = string.split(' ')
+ return '**'.join(l)
+
+ #generates a xml describing a client capable of invoking a Web service described
+ #using a WADL document. Places this xml tool under ./clients/
+ def wadlClient(self):
+ ##parse wadl
+ #javahome = os.environ.get('JAVA_HOME')
+ #galaxyhome=os.environ.get('GALAXY_HOME')
+ #classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ #jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ #machine = platform.machine()
+
+ #if machine == 'x86_64' :
+ # print 'a'
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # print 'b'
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # print 'c'
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('lsdis')
+ urlToPass=java.net.URL(self.url)
+ wadlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ docs = []
+
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ #write into the output file information about the method and Web service to be invoked.
+ f=open(self.Ofile,'w')
+ f.write(wadlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ #get parameters for the selected method of the Web service
+ i=0
+ for method in methods:
+ x = str(method.getId())
+ y = str(urls.get(i))
+ if x == webserviceId :
+ f.write('method matched')
+ if y == resUrl :
+ f.write('res matched')
+ params = method.getRequest().getParams()
+ break
+ i=i+1
+
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ #./clients/ClientCount.xml keeps the count of the clients/tools currently registered in Galaxy for Web service invocation.
+ #read the count and increment it.
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/ClientCount.xml','w')
+
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+ #include the count in the tool's name and id to uniquely identify it.
+ clientName = 'client_'+ str(clientCount)
+
+ #create a new xml file under ./clients/
+ clientXml=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ #write the tool id, name and description
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+ #the one-time invocation tool/client for a REST Web service invokes ./clients/client_1.py to invoke the Web service
+ #write the command tag to specify the arguments passed to this client_1.py
+ clientXml.write(' \n #if $cond_source.optional_param_source=="no" #client_1.py'+' $output ' +resUrl)
+
+ j=0
+
+ for param in params:
+ if param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $param' + str(j))
+ j=j+1
+ clientXml.write(' #else #client_1.py'+' $output ' +resUrl)
+ j=0
+ for param in params:
+ if param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $param' + str(j))
+ j=j+1
+
+ for param in params:
+ if not param.isRequired():
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $cond_source.param' + str(j))
+ j=j+1
+ clientXml.write(' #end if \n \n')
+
+ #start writing inputs
+ clientXml.write(' \n')
+
+ #create a param for each required parameter described in the WADL. Check if defaults and options are specified in the WADL
+ j=0
+ for param in params:
+ if param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+ if param.getOptions().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptions():
+ clientXml.write(' '+option.getName()+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+
+ #create a conditional param for each optional parameter described in the WADL.
+ clientXml.write('\n \n \n no \n yes \n \n')
+ clientXml.write(' \n ')
+ clientXml.write(' \n')
+ for param in params:
+ if not param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+ if param.getOptions().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptions():
+ clientXml.write(' '+option.getName()+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+
+
+ clientXml.write(' \n ')
+ clientXml.write(' \n \n \n \n')
+
+ #write information about each parameter in the help section
+ clientXml.write(' \n')
+
+ clientXml.write('Replace white space with ** in all parameter values\n')
+
+ for param in params:
+ if param.isRequired():
+ pName = param.getName()
+ for doc in param.getDocs():
+ if doc.getTitle()=="prompt" or doc.getTitle()=="Prompt" or doc.getTitle()=="PROMPT":
+ pName = doc.getInnerText()
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** '+ pName +' type is ' + param.getType()+'\n')
+
+ clientXml.write(' \n ')
+
+ #adds the newly created tool to tool_conf.xml in Galaxy under the 'Web Service Tools' section.
+ editor = editToolConfig1()
+ editor.addTool(clientName)
+
+ ##later add help feature
+
+ def sawadlClient(self):
+ ##parse sawadl
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceTool/lib/SAWADLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/lib/'
+ machine = platform.machine()
+
+ #if machine == 'x86_64' :
+ # print 'a'
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # print 'b'
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # print 'c'
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
+ pkgModel =JPackage('org.semanticweb.owlapi.model')
+ pkgApiBinding =JPackage('org.semanticweb.owlapi.apibinding')
+ pkgVocab = JPackage('org.semanticweb.owlapi.vocab')
+
+ DOCUMENT_IRI = "http://cs.uga.edu/~ganjoo/galaxy/EDAM.owl"
+
+ sawadlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ annotationSet = []
+
+ SAWADLParserDriver=pkg.SAWADLParserDriver
+ sawPD=SAWADLParserDriver()
+ sawPD.parse(sawadlUrl)
+ urls = sawPD.getUrl()
+ methods = sawPD.getCompleteMethodList()
+
+ IRI = pkgModel.IRI
+ OWLRDFVocabulary = pkgVocab.OWLRDFVocabulary
+ OWLManager = pkgApiBinding.OWLManager
+ OWLLiteral = pkgModel.OWLLiteral
+ owlOntManager = OWLManager.createOWLOntologyManager()
+ ontology = owlOntManager.loadOntologyFromOntologyDocument(IRI.create(DOCUMENT_IRI))
+ dataFactory = owlOntManager.getOWLDataFactory()
+ propertyComment = dataFactory.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_COMMENT.getIRI())
+
+ f=open(self.Ofile,'w')
+ f.write(sawadlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ i=0
+ for method in methods:
+ x = str(method.getName())
+ y = str(urls.get(i))
+ if x == webserviceId :
+ f.write('method matched')
+ if y == resUrl :
+ f.write('res matched')
+ params = method.getRequest().getParamList()
+ break
+ i=i+1
+
+
+
+
+ ##generate client's xml
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+ clientName = 'client_'+ str(clientCount)
+
+ clientXml=open(galaxyhome+'/tools/WebServiceToolWorkflow/clients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+
+ clientXml.write(' \n #if $cond_source.optional_param_source=="no" #client_1.py'+' $output ' +resUrl)
+ ##write such that the parameters passed to client1.py(change name to clientName.py) are dependent on a for loop
+
+
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName())+'\n')
+ clientXml.write(' $param' + str(j)+'\n')
+ j=j+1
+
+ clientXml.write(' #else #client_1.py'+' $output ' +resUrl)
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $param' + str(j))
+ j=j+1
+
+ for param in params:
+ if not param.getRequired()=='true' and not param.getRequired()=='True' and not param.getRequired()=='TRUE':
+ clientXml.write(' '+self.formatString(param.getName()))
+ clientXml.write(' $cond_source.param' + str(j))
+ j=j+1
+
+ clientXml.write('#end if \n \n')
+
+ ##write inputs depending on required or not. if not required den dont display
+ ##if required- den check default value, and if options exist.Depending on that
+ ##decide the type of parameter and options
+ clientXml.write(' \n')
+
+ j=0
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ f.write('\n '+ param.getName() + ' options: '+str(param.getOptionvalue().size()))
+ if param.getOptionvalue().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptionvalue():
+ clientXml.write(' '+option+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+
+
+ clientXml.write('\n \n \n no \n yes \n \n')
+ clientXml.write(' \n ')
+ clientXml.write(' \n')
+
+ for param in params:
+ if not param.getRequired()=='true' and not param.getRequired()=='True' and not param.getRequired()=='TRUE':
+ f.write('\n '+ param.getName() + ' options: '+str(param.getOptionvalue().size()))
+ if param.getOptionvalue().size()==0:
+ clientXml.write(' \n')
+ j=j+1
+ else:
+ clientXml.write(' \n' )
+ for option in param.getOptionvalue():
+ clientXml.write(' '+option+' \n ')
+ clientXml.write(' \n')
+ j=j+1
+
+ clientXml.write(' \n \n')
+
+ clientXml.write(' \n \n \n \n')
+
+ clientXml.write(' \n')
+ for param in params:
+ if param.getRequired()=='true' or param.getRequired()=='True' or param.getRequired()=='TRUE':
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** About '+ param.getName() +': type is ' + param.getType())
+
+ modelRef = sawPD.getCompleteModelReference(param)
+ if not modelRef is None:
+ paramClass = dataFactory.getOWLClass(IRI.create(modelRef));
+ annotationSet = paramClass.getAnnotations(ontology,propertyComment)
+ for annotation in annotationSet:
+ if isinstance(annotation.getValue(),OWLLiteral):
+ val = annotation.getValue()
+ if val.isOWLStringLiteral() and not val.isOWLTypedLiteral():
+ print 'val.getLiteral()=' + val.getLiteral()
+ clientXml.write(', description from ontology is "' + val.getLiteral()+'"')
+ break
+ clientXml.write('\n')
+ clientXml.write(' \n ')
+ editor = editToolConfig1()
+ editor.addTool(clientName)
+
+ ##later add help feature
+
+ def wsdlClient(self):
+ ##parse wadl
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceTool/WodenWSDLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/WodenWSDLParser/lib/'
+ machine = platform.machine()
+
+ if machine == 'x86_64' :
+ print 'a'
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ print 'b'
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ print 'c'
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+
+ pkg=JPackage('lsdis')
+ wsdlUrl = self.url
+
+ webserviceId = self.methodName
+ resUrl = self.resourceName
+
+ urls = []
+ methods = []
+ params = []
+ paramTypes = []
+
+ WSDLParserDriver =pkg.WSDLParserDriver
+ wPD=WSDLParserDriver()
+ wPD.parse(wsdlUrl)
+ methods = wPD.getCompleteMethodList()
+ urls = wPD.getUrl()
+
+ f=open(self.Ofile,'w')
+ f.write(wsdlUrl)
+ f.write('\n'+ resUrl)
+ f.write('\n'+webserviceId)
+
+
+ i=0
+ for method in methods:
+ x = str(method.getName().getLocalPart())
+ if x == webserviceId :
+ wPD.getParameters(x)
+ f.write('method matched')
+ paramTypes = wPD.getParamTypeList()
+ params = wPD.getParamList()
+ break
+ i=i+1
+
+
+
+
+ ##generate client's xml
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','r')
+ clientCountFile.readline()
+ clientCountStr = clientCountFile.read(1)
+ clientCount=string.atoi(clientCountStr)
+ clientCount=clientCount+1
+ clientCountFile.close()
+
+ clientCountFile=open(galaxyhome+'/tools/WebServiceTool/clients/ClientCount.xml','w')
+ clientCountFile.write(' \n')
+ clientCountFile.write(str(clientCount))
+ clientCountFile.write(' \n')
+
+
+
+
+ clientName = 'client_'+ str(clientCount)
+
+ clientXml=open(galaxyhome+'/tools/WebServiceTool/clients/'+clientName+'.xml','w')
+ clientXml.seek(0,0)
+
+ clientXml.write('\n')
+ clientXml.write(' Client for method: '+self.methodName+' , Web service: '+self.url+' \n')
+
+
+ clientXml.write(' \n client_1.py \n'+' $output \n ' +resUrl+'\n')
+ ##write such that the parameters passed to client1.py(change name to clientName.py) are dependent on a for loop
+
+ j=0
+ for param in params:
+ clientXml.write(' '+self.formatString(param)+'\n')
+ clientXml.write(' $param' + str(j)+'\n')
+ j=j+1
+ clientXml.write(' \n')
+
+ ##write inputs depending on required or not. if not required den dont display
+ ##if required- den check default value, and if options exist.Depending on that
+ ##decide the type of parameter and options
+ clientXml.write(' \n')
+
+ j=0
+ for param in params:
+ clientXml.write(' \n')
+ j=j+1
+
+
+
+ clientXml.write(' \n \n \n \n')
+
+ clientXml.write(' \n')
+
+ clientXml.write('** Replace white with ** in all parameter values **\n')
+
+ j=0
+ for param in params:
+ clientXml.write('\n.. class:: infomark\n\n**TIP:** '+ param +' type is ' + paramTypes[j] +'\n')
+
+ clientXml.write(' \n ')
+ editor = editToolConfig()
+ editor.addTool(clientName)
+
+ ##later add help feature
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/getMethods.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/getMethods.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,166 @@
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import platform
+
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+
+class Document(object):
+
+ #invoked to get methods described in a WADL document
+ def getWADLMethods(self, wadlUrl, outputFileUrl ):
+
+ #get environment variables JAVA_HOME and GALAXY_HOME
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ #classpath, jarpath are variables pointing to the java libraries required to parse a WADL document
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+
+ #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
+ #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)
+ machine = platform.machine()
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ #tell JPYPE that the package name is lsdis
+ pkg=JPackage('lsdis')
+
+ urlToPass=java.net.URL(wadlUrl)
+
+ #convert __tilda__ to ~
+ if(wadlUrl.find('__tilda__')>-1):
+ ulist = wadlUrl.split('__tilda__')
+ urlToPass = java.net.URL('~'.join(ulist))
+
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+
+ urls = []
+ methods = []
+
+ #using JPYPE call appropriate Java classes and methods to parse the WADL document and get a list of methods defined in it
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ #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.
+ i=0
+ for url in urls:
+ outputfile.write(wadlUrl+"\t")
+ outputfile.write(str(methods[i].getId())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
+ #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.
+ def getWSDLMethods(self, wsdlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/restClientWSDL/WodenWSDLParser/bin'
+ jarpath = galaxyhome + '/tools/restClientWSDL/WodenWSDLParser/lib/'
+ machine = platform.machine()
+
+ #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
+ #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)
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('lsdis')
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+ length=(len(sys.argv))
+
+ urls = []
+ methods = []
+
+ if(wsdlUrl.find('__tilda__')>-1):
+ ulist = wsdlUrl.split('__tilda__')
+ urlToPass = '~'.join(ulist)
+
+ WSDLParserDriver=pkg.WSDLParserDriver
+ wPD=WSDLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(wsdlUrl+"\t")
+ outputfile.write(str(methods[i].getName().getLocalPart())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+ # invoked to get methods described in a SAWADL document
+ def getSAWADLMethods(self, sawadlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/restclientSAWADL/lib/SAWADLParser/bin'
+ machine = platform.machine()
+
+ #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
+ #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)
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
+
+
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+
+ if(sawadlUrl.find('__tilda__')>-1):
+ ulist = sawadlUrl.split('__tilda__')
+ urlToPass = '~'.join(ulist)
+
+ urls = []
+ methods = []
+
+
+ SAWADLParserDriver=pkg.SAWADLParserDriver
+ sawPD=SAWADLParserDriver()
+ sawPD.parse(urlToPass)
+ urls = sawPD.getUrl()
+ methods = sawPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(sawadlUrl+"\t")
+ outputfile.write(str(methods[i].getName())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/getMethods.pyc
Binary file WebServiceToolWorkflow/getMethods.pyc has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/getMethods.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/getMethods.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,166 @@
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import platform
+
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+
+class Document(object):
+
+ #invoked to get methods described in a WADL document
+ def getWADLMethods(self, wadlUrl, outputFileUrl ):
+
+ #get environment variables JAVA_HOME and GALAXY_HOME
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+
+ #classpath, jarpath are variables pointing to the java libraries required to parse a WADL document
+ classpath= galaxyhome + '/tools/WebServiceTool/ParserForWADL/bin'
+ jarpath = galaxyhome + '/tools/WebServiceTool/ParserForWADL/lib/'
+
+ #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
+ #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)
+ machine = platform.machine()
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ #tell JPYPE that the package name is lsdis
+ pkg=JPackage('lsdis')
+
+ urlToPass=java.net.URL(wadlUrl)
+
+ #convert __tilda__ to ~
+ if(wadlUrl.find('__tilda__')>-1):
+ ulist = wadlUrl.split('__tilda__')
+ urlToPass = java.net.URL('~'.join(ulist))
+
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+
+ urls = []
+ methods = []
+
+ #using JPYPE call appropriate Java classes and methods to parse the WADL document and get a list of methods defined in it
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ #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.
+ i=0
+ for url in urls:
+ outputfile.write(wadlUrl+"\t")
+ outputfile.write(str(methods[i].getId())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
+ #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.
+ def getWSDLMethods(self, wsdlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/restClientWSDL/WodenWSDLParser/bin'
+ jarpath = galaxyhome + '/tools/restClientWSDL/WodenWSDLParser/lib/'
+ machine = platform.machine()
+
+ #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
+ #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)
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('lsdis')
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+ length=(len(sys.argv))
+
+ urls = []
+ methods = []
+
+ if(wsdlUrl.find('__tilda__')>-1):
+ ulist = wsdlUrl.split('__tilda__')
+ urlToPass = '~'.join(ulist)
+
+ WSDLParserDriver=pkg.WSDLParserDriver
+ wPD=WSDLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(wsdlUrl+"\t")
+ outputfile.write(str(methods[i].getName().getLocalPart())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+ # invoked to get methods described in a SAWADL document
+ def getSAWADLMethods(self, sawadlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/restclientSAWADL/lib/SAWADLParser/bin'
+ machine = platform.machine()
+
+ #start JVM depending on the machine. The location of libjvm.so is assumed to be standard.
+ #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)
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
+
+
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+
+ if(sawadlUrl.find('__tilda__')>-1):
+ ulist = sawadlUrl.split('__tilda__')
+ urlToPass = '~'.join(ulist)
+
+ urls = []
+ methods = []
+
+
+ SAWADLParserDriver=pkg.SAWADLParserDriver
+ sawPD=SAWADLParserDriver()
+ sawPD.parse(urlToPass)
+ urls = sawPD.getUrl()
+ methods = sawPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(sawadlUrl+"\t")
+ outputfile.write(str(methods[i].getName())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/getMethods1.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/getMethods1.py Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,132 @@
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import platform
+
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+
+class Document1(object):
+
+ def getWADLMethods(self, wadlUrl, outputFileUrl ):
+ #javahome = os.environ.get('JAVA_HOME')
+ #galaxyhome=os.environ.get('GALAXY_HOME')
+ #classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ #jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ #machine = platform.machine()
+ #if machine == 'x86_64' :
+ # startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'i686' :
+ # startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #elif machine == 'sun4u' :
+ # startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ #else :
+ # System.exit("Could not identify machine, please specify path to libjvm.so")
+ pkg=JPackage('lsdis')
+ urlToPass=java.net.URL(wadlUrl)
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+
+ urls = []
+ methods = []
+
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(wadlUrl+"\t")
+ outputfile.write(str(methods[i].getId())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
+ def getWSDLMethods(self, wsdlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/WodenWSDLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/WodenWSDLParser/lib/'
+ machine = platform.machine()
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('lsdis')
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+ length=(len(sys.argv))
+
+ urls = []
+ methods = []
+
+ WSDLParserDriver=pkg.WSDLParserDriver
+ wPD=WSDLParserDriver()
+ wPD.parse(wsdlUrl)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(wsdlUrl+"\t")
+ outputfile.write(str(methods[i].getName().getLocalPart())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
+
+ def getSAWADLMethods(self, sawadlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/restclientSAWADL/lib/SAWADLParser/bin'
+
+ machine = platform.machine()
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
+
+
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+
+
+ urls = []
+ methods = []
+
+ SAWADLParserDriver=pkg.SAWADLParserDriver
+ sawPD=SAWADLParserDriver()
+ sawPD.parse(sawadlUrl)
+ urls = sawPD.getUrl()
+ methods = sawPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(sawadlUrl+"\t")
+ outputfile.write(str(methods[i].getName())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/getMethods1.pyc
Binary file WebServiceToolWorkflow/getMethods1.pyc has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/getMethods1.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/getMethods1.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,132 @@
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ import platform
+
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+
+class Document1(object):
+
+ def getWADLMethods(self, wadlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/ParserForWADL/lib/'
+ machine = platform.machine()
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+ pkg=JPackage('lsdis')
+ urlToPass=java.net.URL(wadlUrl)
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+
+ urls = []
+ methods = []
+
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(wadlUrl+"\t")
+ outputfile.write(str(methods[i].getId())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
+ def getWSDLMethods(self, wsdlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/WebServiceToolWorkflow/WodenWSDLParser/bin'
+ jarpath = galaxyhome + '/tools/WebServiceToolWorkflow/WodenWSDLParser/lib/'
+ machine = platform.machine()
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('lsdis')
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+ length=(len(sys.argv))
+
+ urls = []
+ methods = []
+
+ WSDLParserDriver=pkg.WSDLParserDriver
+ wPD=WSDLParserDriver()
+ wPD.parse(wsdlUrl)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(wsdlUrl+"\t")
+ outputfile.write(str(methods[i].getName().getLocalPart())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
+
+ def getSAWADLMethods(self, sawadlUrl, outputFileUrl ):
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/restclientSAWADL/lib/SAWADLParser/bin'
+
+ machine = platform.machine()
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('edu.uga.cs.lsdis.meteors.wadls')
+
+
+
+ outputfile=open(outputFileUrl,'w')
+ outputfile.seek(0,0)
+
+
+ urls = []
+ methods = []
+
+ SAWADLParserDriver=pkg.SAWADLParserDriver
+ sawPD=SAWADLParserDriver()
+ sawPD.parse(sawadlUrl)
+ urls = sawPD.getUrl()
+ methods = sawPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(sawadlUrl+"\t")
+ outputfile.write(str(methods[i].getName())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/getWADLMethods.py~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/getWADLMethods.py~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,52 @@
+import warnings
+import platform
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ from jpype._jpackage import JPackage
+ from jpype import *
+ import os.path
+ import sys
+
+ javahome = os.environ.get('JAVA_HOME')
+ galaxyhome=os.environ.get('GALAXY_HOME')
+ classpath= galaxyhome + '/tools/restclientWADL/ParserForWADL/bin'
+ jarpath = galaxyhome + '/tools/restclientWADL/WADLParser/dist/lib/'
+ machine = platform.machine()
+ if machine == 'x86_64' :
+ startJVM("%s/jre/lib/amd64/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'i686' :
+ startJVM("%s/jre/lib/i386/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ elif machine == 'sun4u' :
+ startJVM("%s/jre/lib/sparc/server/libjvm.so" % javahome,"-ea", "-Djava.class.path=%s" % classpath,"-Djava.ext.dirs=%s" % jarpath)
+ else :
+ System.exit("Could not identify machine, please specify path to libjvm.so")
+
+ pkg=JPackage('lsdis')
+ urlToPass=java.net.URL(sys.argv[1])
+ wadlUrl = sys.argv[1]
+
+ outputfile=open(sys.argv[2],'w')
+ outputfile.seek(0,0)
+
+
+ length=(len(sys.argv))
+
+ urls = []
+ methods = []
+
+ WADLParserDriver=pkg.WADLParserDriver
+ wPD=WADLParserDriver()
+ wPD.parse(urlToPass)
+ urls = wPD.getUrl()
+ methods = wPD.getCompleteMethodList()
+
+ i=0
+ for url in urls:
+ outputfile.write(wadlUrl+"\t")
+ outputfile.write(str(methods[i].getId())+"\t")
+ outputfile.write(str(url)+"\n")
+ i=i+1
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/.classpath
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/.classpath Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/.project
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/.project Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,17 @@
+
+
+ SAWADLParser
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/3A4_PurchaseOrder_CoreElements.xsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/3A4_PurchaseOrder_CoreElements.xsd Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,447 @@
+
+
+
+
+
+ Authors: Michal Zaremba, Holger Lausen
+$Revision: 1.2 $
+$Date: 2006/03/22 17:05:21 $
+
+This XML Core Elements has been created on the basis of the RosettaNet specification (http://rosettanet.org/)
+and is solely intended for the Semantic Web Challenge (http://www.sws-challenge.org/).
+
+
+
+
+
+ Unformatted text.
+
+
+
+
+
+
+
+
+ The name of a business entity.
+
+
+
+
+
+
+
+
+
+ The collection of business properties that describe a business identity and location.
+
+
+
+
+
+
+
+
+
+ The first line of a physical address.
+
+
+
+
+
+
+
+
+
+ The name of a city.
+
+
+
+
+
+
+
+
+
+ Code identifying geographic location as specified by a national postal code.
+
+
+
+
+
+
+
+ The actual physical location of an entity as prescribed by local postal authorities, including country identification as it relates to the party or a product.
+
+
+
+
+
+
+
+
+
+
+
+
+ The collection of business properties that identify and describe the actual physical location of an entity as prescribed by local postal authorities, including country identification.
+
+
+
+
+
+
+
+
+
+ The collection of business properties that describe a business partners' identity, their contact information, where they are physically located and their function in a supply chain.
+
+
+
+
+
+
+
+
+
+
+
+ The collection of business properties that describe a business partners' role in a partner interface process.
+
+
+
+
+
+
+
+
+
+
+
+ Magnitude of currency amount.
+
+
+
+
+
+
+
+ The collection of business properties that describe the monetary amount defined by a specified currency.
+
+
+
+
+
+
+
+
+
+
+ Total price for an entire business document.
+
+
+
+
+
+
+
+
+
+ The partner and/or location to which the product must be delivered.
+
+
+
+
+
+
+
+
+
+ Specifies a specific date. Date stamp based on the ISO 8601 specification. The "Z" following the day identifier (DD) is used to indicate Coordinated Universal Time. Informal format: YYYYMMDDZ
+
+
+
+
+
+
+
+ The collection of business properties that describe the occurrence of the public conveyance of goods as a commercial enterprise.
+
+
+
+
+
+
+
+
+
+
+ The date a transportation event is requested to occur.
+
+
+
+
+
+
+
+
+
+ Used to indicate "Yes", "No" statements.
+
+
+
+
+
+
+
+ Indicates whether the order is a drop shipment.
+
+
+
+
+
+
+
+
+
+ The role receiving the document in a business document exchange.
+
+
+
+
+
+
+
+
+
+ Unique tracking identification number that identifies a request.
+
+
+
+
+
+
+
+
+
+ Unique identifier, i.e. a numeric value or alphanumeric value, for a business document.
+
+
+
+
+
+
+
+ Number of the line in the document.
+
+
+
+
+
+
+
+ The information that identifies the business document being sent. This identifier is used to represent the specific business document associated with the defined business process.
+
+
+
+
+
+
+
+
+
+ Specifies an instance in time. Based on the ISO 8601 specification where "YYYY" represents the year, "MM" the month and "DD" the day. The letter "T" is the date/time separator and "hh", "mm", "ss.sss" represent hour, minute and second respectively. This representation is immediately followed by a "Z" to indicate Coordinated Universal Time. Informal format: YYYYMMDDThhmmss
+
+
+
+
+
+
+
+ The date-time stamp indicating when this business document was generated.
+
+
+
+
+
+
+
+
+
+ Name of the contact person(s) within the organization.
+
+
+
+
+
+
+
+
+
+ Electronic mail address.
+
+
+
+
+
+
+
+ The electro-technical communication number, e.g., telephone number, facsimile number, pager number.
+
+
+
+
+
+
+
+ The date-time that the requesting business document was generated. This is the same as the date-time stamp of the original business document.
+
+
+
+
+
+
+
+
+
+ The monetary total associated with a line item.
+
+
+
+
+
+
+
+
+
+ The price requested for a unit of product.
+
+
+
+
+
+
+
+
+
+ Global unique product identifier. RosettaNet has adopted the Global Trade Identification Number (GTIN).
+
+
+
+
+
+
+
+ The collection of business properties that describe proprietary and global identifier information regarding a product.
+
+
+
+
+
+
+
+
+
+ Line number assigned to an item by the product buyer.
+
+
+
+
+
+
+
+
+
+ A quantity specifying the number of product units.
+
+
+
+
+
+
+
+ Quantity of product shipped.
+
+
+
+
+
+
+
+
+
+ The collection of business properties that describe information regarding the quantity of the product shipped.
+
+
+
+
+
+
+
+
+
+
+ The quantity of product requested.
+
+
+
+
+
+
+
+
+
+ The numerical schema designed to achieve contact via telephone.
+
+
+
+
+
+
+
+
+
+ Quantity of product shipped currently scheduled for shipment.
+
+
+
+
+
+
+
+
+
+ The collection of business properties that provide communication and address information for contacting a person, organization or business.
+
+
+
+
+
+
+
+
+
+
+
+ Agreed upon sale price for each unit ordered.
+
+
+
+
+
+
+
+
+
+ The role initiating a business document exchange.
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/3A4_PurchaseOrder_Dictionary.xsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/3A4_PurchaseOrder_Dictionary.xsd Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,1031 @@
+
+
+
+
+ Authors: Michal Zaremba, Holger Lausen
+$Revision: 1.2 $
+$Date: 2006/03/06 15:30:27 $
+
+This XML Dictionary has been created on the basis of the RosettaNet specification (http://rosettanet.org/)
+and is solely intended for the Semantic Web Challenge (http://www.sws-challenge.org/).
+
+
+
+ A code identifying type of exception process in order to enable the back-end integration.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code identifying the three character currency code specified in ISO 4217-1995.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code identifying a party's role in the supply chain.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code identifying a product unit of measure.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code identifying category specification for a purchase order.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PO generated to exchange a product that is not related to Warranty Replacement.
+
+
+
+
+
+
+
+
+ for mass production wafer
+
+
+
+
+
+
+ PO generated to replenish stock to achieve target levels.
+
+
+
+
+
+ Before the yield is qualifed, the buyer requests the wafer manufacturer to produce the wafer according to the current spec., however, the manufacturer is not responsible for the yield
+
+
+
+
+
+
+ applicable to a single geographical site
+
+
+
+
+
+
+
+ applicable to worldwide
+
+
+
+
+
+
+
+ Code identifying an event during the transportation of a shipment.
+
+
+
+
+
+ The event representing when the product should arrive on the recipient's dock.
+
+
+
+
+ The event representing when the product is scheduled to be picked up from the shipper's dock.
+
+
+
+
+ The event representing when the product is requested to ship.
+
+
+
+
+
+
+
+ Code identifying the status of a purchase order.
+
+
+
+
+
+
+
+
+
+
+
+ Code identifying the three character currency code specified in ISO 4217-1995.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/3A4_Simplified_PurchaseOrderRequest.xsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/3A4_Simplified_PurchaseOrderRequest.xsd Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,76 @@
+
+
+
+
+ Authors: Michal Zaremba, Holger Lausen
+$Revision: 1.6 $
+$Date: 2006/04/12 16:32:29 $
+
+This XML Schema has been created on the basis of the RosettaNet specification (http://rosettanet.org/)
+and is solely intended for the Semantic Web Challenge (http://www.sws-challenge.org/). The Schema has
+been simplified in several aspect, e.g. all Tax related aspect have been deleted for the saint of simplicity.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The collection of business properties that describe a buyer's offer to purchase a quantity of products at an agreed price and schedule.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The collection of business properties that describe a business document entry for a product.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The collection of business properties that describe various types of product quantity used in an ordering process.
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/AcknowledgementOfReceipt.xsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/AcknowledgementOfReceipt.xsd Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,43 @@
+
+
+
+
+ Authors: Michal Zaremba, Holger Lausen
+$Revision: 1.1 $
+$Date: 2006/03/06 17:45:10 $
+
+This XML Schema has been created on the basis of the RosettaNet specification (http://rosettanet.org/)
+and is solely intended for the Semantic Web Challenge (http://www.sws-challenge.org/).
+
+
+
+
+ Business information returned to a requesting party to verify business document receipt.
+
+
+
+
+
+
+
+
+
+ Information required to support non-repudiation of receipt.
+
+
+
+
+
+
+
+
+
+ The base-64 encoded digest of the entire original mime message received. The digest MUST use the same algorithm as the original signed message.
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/NewTemplate.sawadl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/NewTemplate.sawadl Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Min Molecular Weight (Daltons)
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/NewTemplate.sawadl~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/NewTemplate.sawadl~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Min Molecular Weight (Daltons)
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/NewsSearchResponse.xsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/NewsSearchResponse.xsd Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/Template.sawadl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/Template.sawadl Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/sample.wadl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/sample.wadl Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/Files/xml.xsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/Files/xml.xsd Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,146 @@
+
+
+
+
+
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+
+ Note that local names in this namespace are intended to be defined
+ only by the World Wide Web Consortium or its subgroups. The
+ following names are currently defined in this namespace and should
+ not be used with conflicting semantics by any Working Group,
+ specification, or document instance:
+
+ base (as an attribute name): denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.
+
+ id (as an attribute name): denotes an attribute whose value
+ should be interpreted as if declared to be of type ID.
+ The xml:id specification is not yet a W3C Recommendation,
+ but this attribute is included here to facilitate experimentation
+ with the mechanisms it proposes. Note that it is _not_ included
+ in the specialAttrs attribute group.
+
+ lang (as an attribute name): denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.
+
+ space (as an attribute name): denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.
+
+ Father (in any context at all): denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+
+ In appreciation for his vision, leadership and dedication
+ the W3C XML Plenary on this 10th day of February, 2000
+ reserves for Jon Bosak in perpetuity the XML name
+ xml:Father
+
+
+
+
+ This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
+ attributes on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ <schema . . .>
+ . . .
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ <type . . .>
+ . . .
+ <attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes
+
+
+
+ In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2005/08/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself, or with the XML namespace itself. In other words, if the XML
+ Schema or XML namespaces change, the version of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2005/08/xml.xsd will not change.
+
+
+
+
+
+ Attempting to install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values is probably never
+ going to be a realistic possibility. See
+ RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
+ at http://www.iana.org/assignments/lang-tag-apps.htm for
+ further information.
+
+ The union allows for the 'un-declaration' of xml:lang with
+ the empty string.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.
+
+
+
+
+
+ See http://www.w3.org/TR/xml-id/ for
+ information about this attribute.
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/.classpath
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/bin/.classpath Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/.project
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/bin/.project Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,17 @@
+
+
+ SAWADALParser
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/Parser.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/Parser.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ApplicationImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ApplicationImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/Constants$SemanticExtensionType.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/Constants$SemanticExtensionType.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/Constants.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/Constants.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/GrammarsImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/GrammarsImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/IncludeImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/IncludeImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/MethodImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/MethodImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ModelReferenceImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ModelReferenceImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/OperationAddOnImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/OperationAddOnImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ParamImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ParamImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ParamsImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ParamsImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/RequestImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/RequestImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ResourceImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ResourceImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ResponseImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/ResponseImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/SAWADLParserDriver.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/SAWADLParserDriver.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaConstants.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaConstants.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaDeserializer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaDeserializer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImportImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImportImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaReferenceImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaReferenceImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaSerializer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaSerializer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/factory/WADLFactoryImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/factory/WADLFactoryImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/IOUtils.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/IOUtils.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/ObjectRegistry.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/ObjectRegistry.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/SchemaUtils.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/SchemaUtils.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/StringUtils.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/StringUtils.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/xml/DOM2Writer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/xml/DOM2Writer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/xml/DOMUtils.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/xml/DOMUtils.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/xml/QNameUtils.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/xml/QNameUtils.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/xml/XPathUtils.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/util/xml/XPathUtils.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/xml/WADLReaderImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/xml/WADLReaderImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/xml/WADLWriterImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/edu/uga/cs/lsdis/meteors/wadls/xml/WADLWriterImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Application.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Application.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Effect.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Effect.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Grammars.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Grammars.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Include.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Include.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Method.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Method.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/ModelReference.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/ModelReference.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/ModelReferenceExtensible.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/ModelReferenceExtensible.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Param.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Param.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Params.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Params.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/PreCondition.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/PreCondition.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Request.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Request.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Resource.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Resource.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Response.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/Response.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/WADLSException.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/WADLSException.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/AttributeExtensible.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/AttributeExtensible.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ElementExtensible.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ElementExtensible.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ExtensibilityElement.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ExtensibilityElement.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ExtensionDeserializer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ExtensionDeserializer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ExtensionRegistry.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ExtensionRegistry.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ExtensionSerializer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/ExtensionSerializer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/UnknownExtensibilityElement.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/UnknownExtensibilityElement.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/UnknownExtensionDeserializer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/UnknownExtensionDeserializer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/UnknownExtensionSerializer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/UnknownExtensionSerializer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/schema/Schema.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/schema/Schema.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/schema/SchemaImport.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/schema/SchemaImport.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/schema/SchemaReference.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/extensions/schema/SchemaReference.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/factory/WADLFactory.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/factory/WADLFactory.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/xml/WADLLocator.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/xml/WADLLocator.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/xml/WADLReader.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/xml/WADLReader.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/xml/WADLWriter.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/wadls/xml/WADLWriter.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/xml/namespace/QName.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/bin/javax/xml/namespace/QName.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/euPathWADL/GenesByMolecularWeight.sawadl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/euPathWADL/GenesByMolecularWeight.sawadl Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,169 @@
+
+
+
+
+
+ Molecular Weight
+
+ Find genes whose unmodified protein product has a molecular weight in a range that you specify.
+
+
+ Find genes whose unmodified protein product has a molecular weight in a range that you specify.
+ Molecular weights are machine calculated from the raw translation and does not take into account any protein or residue modifications. For translations containing ambiguous amino acid codes (B, Z, X) we calculate the average of the upper and lower bound of the molecular weight.
+
+
+
+
+Organism
+Organism
+
+Entamoeba dispar,Entamoeba histolytica,Entamoeba invadens,Cryptosporidium parvum,Cryptosporidium hominis,Cryptosporidium muris,Giardia Assemblage A isolate WB,Giardia Assemblage B isolate GS,Giardia Assemblage E isolate P15,Encephalitozoon cuniculi,Encephalitozoon intestinalis,Plasmodium falciparum,Plasmodium vivax,Plasmodium yoelii,Plasmodium berghei,Plasmodium chabaudi,Plasmodium knowlesi,Toxoplasma gondii,Neospora caninum,Trichomonas vaginalis,Trypanosoma cruzi,Leishmania braziliensis,Leishmania infantum,Leishmania major,Leishmania mexicana,Trypanosoma brucei,Trypanosoma congolense,Trypanosoma vivax
+p
+
+Provide one or more values. Use comma as a delimter.
+
+
+Entamoeba dispar
+
+
+
+Entamoeba histolytica
+
+
+
+Entamoeba invadens
+
+
+
+Cryptosporidium parvum
+
+
+
+Cryptosporidium hominis
+
+
+
+Cryptosporidium muris
+
+
+
+Giardia Assemblage A isolate WB
+
+
+
+Giardia Assemblage B isolate GS
+
+
+
+Giardia Assemblage E isolate P15
+
+
+
+Encephalitozoon cuniculi
+
+
+
+Encephalitozoon intestinalis
+
+
+
+Plasmodium falciparum
+
+
+
+Plasmodium vivax
+
+
+
+Plasmodium yoelii
+
+
+
+Plasmodium berghei
+
+
+
+Plasmodium chabaudi
+
+
+
+Plasmodium knowlesi
+
+
+
+Toxoplasma gondii
+
+
+
+Neospora caninum
+
+
+
+Trichomonas vaginalis
+
+
+
+Trypanosoma cruzi
+
+
+
+Leishmania braziliensis
+
+
+
+Leishmania infantum
+
+
+
+Leishmania major
+
+
+
+Leishmania mexicana
+
+
+
+Trypanosoma brucei
+
+
+
+Trypanosoma congolense
+
+
+
+Trypanosoma vivax
+
+
+
+
+Min Molecular Weight (Daltons)
+Lower bound for the protein molecular weight
+10000
+
+
+
+Max Molecular Weight (Daltons)
+Upper bound for the protein molecular weight
+50000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/euPathWADL/GenesByMolecularWeight.sawadl~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/euPathWADL/GenesByMolecularWeight.sawadl~ Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,169 @@
+
+
+
+
+
+ Molecular Weight
+
+ Find genes whose unmodified protein product has a molecular weight in a range that you specify.
+
+
+ Find genes whose unmodified protein product has a molecular weight in a range that you specify.
+ Molecular weights are machine calculated from the raw translation and does not take into account any protein or residue modifications. For translations containing ambiguous amino acid codes (B, Z, X) we calculate the average of the upper and lower bound of the molecular weight.
+
+
+
+
+Organism
+Organism
+
+Entamoeba dispar,Entamoeba histolytica,Entamoeba invadens,Cryptosporidium parvum,Cryptosporidium hominis,Cryptosporidium muris,Giardia Assemblage A isolate WB,Giardia Assemblage B isolate GS,Giardia Assemblage E isolate P15,Encephalitozoon cuniculi,Encephalitozoon intestinalis,Plasmodium falciparum,Plasmodium vivax,Plasmodium yoelii,Plasmodium berghei,Plasmodium chabaudi,Plasmodium knowlesi,Toxoplasma gondii,Neospora caninum,Trichomonas vaginalis,Trypanosoma cruzi,Leishmania braziliensis,Leishmania infantum,Leishmania major,Leishmania mexicana,Trypanosoma brucei,Trypanosoma congolense,Trypanosoma vivax
+p
+
+Provide one or more values. Use comma as a delimter.
+
+
+Entamoeba dispar
+
+
+
+Entamoeba histolytica
+
+
+
+Entamoeba invadens
+
+
+
+Cryptosporidium parvum
+
+
+
+Cryptosporidium hominis
+
+
+
+Cryptosporidium muris
+
+
+
+Giardia Assemblage A isolate WB
+
+
+
+Giardia Assemblage B isolate GS
+
+
+
+Giardia Assemblage E isolate P15
+
+
+
+Encephalitozoon cuniculi
+
+
+
+Encephalitozoon intestinalis
+
+
+
+Plasmodium falciparum
+
+
+
+Plasmodium vivax
+
+
+
+Plasmodium yoelii
+
+
+
+Plasmodium berghei
+
+
+
+Plasmodium chabaudi
+
+
+
+Plasmodium knowlesi
+
+
+
+Toxoplasma gondii
+
+
+
+Neospora caninum
+
+
+
+Trichomonas vaginalis
+
+
+
+Trypanosoma cruzi
+
+
+
+Leishmania braziliensis
+
+
+
+Leishmania infantum
+
+
+
+Leishmania major
+
+
+
+Leishmania mexicana
+
+
+
+Trypanosoma brucei
+
+
+
+Trypanosoma congolense
+
+
+
+Trypanosoma vivax
+
+
+
+
+Min Molecular Weight (Daltons)
+Lower bound for the protein molecular weight
+10000
+
+
+
+Max Molecular Weight (Daltons)
+Upper bound for the protein molecular weight
+50000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/.classpath
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/.classpath Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/.project
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/.project Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,17 @@
+
+
+ SAWADALParser
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/Parser.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/Parser.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/Parser.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/Parser.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,47 @@
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.wadls.Application;
+import javax.wadls.Method;
+import javax.wadls.Param;
+import javax.wadls.Request;
+import javax.wadls.Resource;
+import javax.wadls.WADLSException;
+import javax.wadls.factory.WADLFactory;
+import javax.wadls.xml.WADLReader;
+import javax.xml.namespace.QName;
+
+import edu.uga.cs.lsdis.meteors.wadls.Constants;
+import edu.uga.cs.lsdis.meteors.wadls.ParamImpl;
+import edu.uga.cs.lsdis.meteors.wadls.SAWADLParserDriver;
+
+
+public class Parser {
+
+
+ public static void main(String[] args){
+
+// //String consumerWADLS="http://localhost:9090/testcase2/Template.sawadl";
+// String consumerWADLS="/home/ganjoo/parser/SAWADLParser/Files/Template.sawadl";
+// WADLReader wadlReader;
+// try {
+// wadlReader = WADLFactory.newInstance().newWADLReader();
+// wadlReader.setFeature(Constants.FEATURE_PARSE_SAWADL,true);
+// //wadlReader.setExtensionRegistry(new PopulatedExtensionRegistry());
+// Application app = wadlReader.readWADL(consumerWADLS);
+//
+ SAWADLParserDriver spd = new SAWADLParserDriver();
+ //String fileURL = "/home/ganjoo/parser/SAWADLParser/Files/sample.wadl";
+ String fileURL = "/home/ganjoo/parser/SAWADLParser/euPathWADL/GenesByMolecularWeight.sawadl";
+ try {
+ spd.parse(fileURL);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+
+ }
+ }
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ApplicationImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ApplicationImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ApplicationImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ApplicationImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,606 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.net.URI;
+import java.util.*;
+
+import javax.wadls.*;
+import javax.wadls.extensions.*;
+import javax.wadls.extensions.ExtensionRegistry;
+import javax.xml.namespace.*;
+import org.w3c.dom.*;
+
+/**
+ * This class represents a WSDLS definition.
+ *
+ * @author Zixin Wu (wuzixin@uga.edu)
+ * @author Paul Fremantle
+ * @author Nirmal Mukhi
+ * @author Matthew J. Duftler
+ * @author namelessNerd
+ */
+public class ApplicationImpl implements Application
+{
+ protected String documentBaseURI = null;
+ protected QName name = null;
+ protected String targetNamespace = null;
+ protected Map namespaces = new HashMap();
+ protected Map includes = new HashMap();
+ protected Params params = null;
+ protected Grammars grammars = null;
+ protected Map resources = new HashMap();
+ protected Element docEl = null;
+ protected String resourcespath=null;
+ protected List extElements = new Vector();
+
+ // added by namelessNerd
+ protected List modelReferenceList= new ArrayList();
+ protected List ontologyNamespaces= new ArrayList();
+ // end namelessNerd additions
+
+ protected ExtensionRegistry extReg = null;
+
+ public static final long serialVersionUID = 1;
+
+ /**
+ * Get all the Parts which has a modelReference with the specified namespace and concept.
+ * @param namespace The namespace of the modelReference
+ * @param concept The concept of the modelReference
+ * @return All the Parts which has a modelReference with the specified namespace and concept.
+ */
+
+ /**
+ * Get all the Operations which has a modelReference with the specified namespace and concept.
+ * @param namespace The namespace of the modelReference
+ * @param concept The concept of the modelReference
+ * @return All the Operations which has a modelReference with the specified namespace and concept.
+ */
+ public List getMethodsByModelReference(URI namespace, String concept){
+ //TODO not implemented yet.
+ return null;
+ }
+
+
+ /**
+ * Get all the XSD Elements which has a modelReference with the specified namespace and concept.
+ * @param namespace The namespace of the modelReference
+ * @param concept The concept of the modelReference
+ * @return All the XSD Elements which has a modelReference with the specified namespace and concept.
+ */
+ public List getXSDElementsByModelReference(URI namespace, String concept){
+ //TODO not implemented yet.
+ return null;
+ }
+
+ /**
+ * Get all the XSD ComplexTypes which has a modelReference with the specified namespace and concept.
+ * @param namespace The namespace of the modelReference
+ * @param concept The concept of the modelReference
+ * @return All the XSD ComplexTypes which has a modelReference with the specified namespace and concept.
+ */
+ public List getXSDComplexTypeByModelReference(URI namespace, String concept){
+ //TODO not implemented yet.
+ return null;
+ }
+
+
+ /**
+ * Set the document base URI of this definition. Can be used to
+ * represent the origin of the Definition, and can be exploited
+ * when resolving relative URIs (e.g. in <import>s).
+ *
+ * @param documentBaseURI the document base URI of this definition
+ */
+
+ /**
+ * Create a new modelReference.
+ *
+ * @return the newly created modelReference.
+ */
+ public ModelReference createModelReference(){
+ return new ModelReferenceImpl();
+ }
+
+
+
+ /**
+ * Create a new precondition.
+ *
+ * @return the newly created precondition
+ */
+ public PreCondition createPreCondition(){
+ return new OperationAddOnImpl();
+ }
+
+ /**
+ * Create a new effect.
+ *
+ * @return the newly created effect
+ */
+ public Effect createEffect(){
+ return new OperationAddOnImpl();
+ }
+
+ public void setDocumentBaseURI(String documentBaseURI)
+ {
+ this.documentBaseURI = documentBaseURI;
+ }
+
+
+ /**
+ * Get the document base URI of this definition.
+ *
+ * @return the document base URI
+ */
+ public String getDocumentBaseURI()
+ {
+ return documentBaseURI;
+ }
+
+ public void setResourcesPath(String resourcespath)
+ {
+ this.resourcespath = resourcespath;
+ }
+
+
+ /**
+ * Get the document base URI of this definition.
+ *
+ * @return the document base URI
+ */
+ public String getResourcesPath()
+ {
+ return resourcespath;
+ }
+
+ /**
+ * Set the name of this definition.
+ *
+ * @param name the desired name
+ */
+ public void setQName(QName name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the name of this definition.
+ *
+ * @return the definition name
+ */
+ public QName getQName()
+ {
+ return name;
+ }
+
+ /**
+ * Set the target namespace in which WSDL elements are defined.
+ *
+ * @param targetNamespace the target namespace
+ */
+ public void setTargetNamespace(String targetNamespace)
+ {
+ this.targetNamespace = targetNamespace;
+ }
+
+ /**
+ * Get the target namespace in which the WSDL elements
+ * are defined.
+ *
+ * @return the target namespace
+ */
+ public String getTargetNamespace()
+ {
+ return targetNamespace;
+ }
+
+ /**
+ * Get the target namespace in which the WSDL elements
+ * are defined.
+ *
+ * @return the target namespace
+ */
+ public List getAllModelReference()
+ {
+ // grabModel
+ return modelReferenceList;
+ }
+
+ /**
+ * This is a way to add a namespace association to a definition.
+ * It is similar to adding a namespace prefix declaration to the
+ * top of a <wsdl:definition> element. This has nothing to do
+ * with the <wsdl:import> element; there are separate methods for
+ * dealing with information described by <wsdl:import> elements.
+ *
+ * @param prefix the prefix to use for this namespace (when
+ * rendering this information as XML). Use null or an empty string
+ * to describe the default namespace (i.e. xmlns="...").
+ * @param namespaceURI the namespace URI to associate the prefix
+ * with. If you use null, the namespace association will be removed.
+ */
+ public void addNamespace(String prefix, String namespaceURI)
+ {
+ if (prefix == null)
+ {
+ prefix = "";
+ }
+
+ if (namespaceURI != null)
+ {
+ namespaces.put(prefix, namespaceURI);
+ }
+ else
+ {
+ namespaces.remove(prefix);
+ }
+ }
+
+ /**
+ * Get the namespace URI associated with this prefix. Or null if
+ * there is no namespace URI associated with this prefix. This is
+ * unrelated to the <wsdl:import> element.
+ *
+ * @see #addNamespace(String, String)
+ * @see #getPrefix(String)
+ */
+ public String getNamespace(String prefix)
+ {
+ if (prefix == null)
+ {
+ prefix = "";
+ }
+
+ return (String)namespaces.get(prefix);
+ }
+
+ /**
+ * Get a prefix associated with this namespace URI. Or null if
+ * there are no prefixes associated with this namespace URI. This is
+ * unrelated to the <wsdl:import> element.
+ *
+ * @see #addNamespace(String, String)
+ * @see #getNamespace(String)
+ */
+ public String getPrefix(String namespaceURI)
+ {
+ if (namespaceURI == null)
+ {
+ return null;
+ }
+
+ Iterator entryIterator = namespaces.entrySet().iterator();
+
+ while (entryIterator.hasNext())
+ {
+ Map.Entry entry = (Map.Entry)entryIterator.next();
+ String prefix = (String)entry.getKey();
+ String assocNamespaceURI = (String)entry.getValue();
+
+ if (namespaceURI.equals(assocNamespaceURI))
+ {
+ return prefix;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Get all namespace associations in this definition. The keys are
+ * the prefixes, and the namespace URIs are the values. This is
+ * unrelated to the <wsdl:import> element.
+ *
+ * @see #addNamespace(String, String)
+ */
+ public Map getNamespaces()
+ {
+ return namespaces;
+ }
+
+ /**
+ * Set the types section.
+ */
+ public void setParams(Params params)
+ {
+ this.params = params;
+ }
+
+ public void setGrammars(Grammars grammars)
+ {
+ this.grammars = grammars;
+ }
+ /**
+ * Get the types section.
+ *
+ * @return the types section
+ */
+ public Params getParams()
+ {
+ return params;
+ }
+
+ public Grammars getGrammars()
+ {
+ return grammars;
+ }
+
+ /**
+ * Add an import to this WADL description.
+ *
+ * @param importDef the import to be added
+ */
+ public void addInclude(Include includeApp)
+ {
+ String namespaceURI = includeApp.getNamespaceURI();
+ List includeList = (List)includes.get(namespaceURI);
+
+ if (includeList == null)
+ {
+ includeList = new Vector();
+
+ includes.put(namespaceURI, includeList);
+ }
+
+ includeList.add(includeApp);
+ }
+
+ /**
+ * Get the list of imports for the specified namespaceURI.
+ *
+ * @param namespaceURI the namespaceURI associated with the
+ * desired imports.
+ * @return a list of the corresponding imports, or null if
+ * there weren't any matching imports
+ */
+ public List getIncludes(String namespaceURI)
+ {
+ return (List)includes.get(namespaceURI);
+ }
+
+ /**
+ * Get a map of lists containing all the imports defined here.
+ * The map's keys are the namespaceURIs, and the map's values
+ * are lists. There is one list for each namespaceURI for which
+ * imports have been defined.
+ */
+ public Map getIncludes()
+ {
+ return includes;
+ }
+
+
+ /**
+ * Add a portType to this WSDL description.
+ *
+ * @param portType the portType to be added
+ */
+ public void addResource(Resource portType)
+ {
+ resources.put(portType.getQName(), portType);
+
+ }
+
+ /**
+ * Get the specified portType. Also checks imported documents.
+ *
+ * @param name the name of the desired portType.
+ * @return the corresponding portType, or null if there wasn't
+ * any matching portType
+ */
+ public Resource getResource(QName name)
+ {
+ Resource resource = (Resource)resources.get(name);
+
+ if (resource == null && name != null)
+ {
+ resource = (Resource)getFromIncludes(Constants.ELEM_RESOURCE, name);
+ }
+
+ return resource;
+ }
+
+ /**
+ * Remove the specified portType from this definition.
+ *
+ * @param name the name of the portType to remove
+ * @return the portType previously associated with this qname, if there
+ * was one; may return null
+ */
+ public Resource removeResource(QName name)
+ {
+ return (Resource)resources.remove(name);
+ }
+
+ /**
+ * Get all the portTypes defined here.
+ */
+ public Map getResources()
+ {
+ return resources;
+ }
+
+
+ /**
+ * Set the documentation element for this document. This dependency
+ * on org.w3c.dom.Element should eventually be removed when a more
+ * appropriate way of representing this information is employed.
+ *
+ * @param docEl the documentation element
+ */
+ public void setDocumentationElement(Element docEl)
+ {
+ this.docEl = docEl;
+ }
+
+ /**
+ * Get the documentation element. This dependency on org.w3c.dom.Element
+ * should eventually be removed when a more appropriate way of
+ * representing this information is employed.
+ *
+ * @return the documentation element
+ */
+ public Element getDocumentationElement()
+ {
+ return docEl;
+ }
+
+ /**
+ * Get all the extensibility elements defined here.
+ */
+ public List getExtensibilityElements()
+ {
+ return extElements;
+ }
+
+
+ /**
+ * Create a new import.
+ *
+ * @return the newly created import
+ */
+ public Include createInclude()
+ {
+ return new IncludeImpl();
+ }
+
+ /**
+ * Create a new input.
+ *
+ * @return the newly created input
+ */
+ public Request createRequest()
+ {
+ return new RequestImpl();
+ }
+
+
+ /**
+ * Create a new operation.
+ *
+ * @return the newly created operation
+ */
+ public Method createMethod()
+ {
+ return new MethodImpl();
+ }
+
+ /**
+ * Create a new output.
+ *
+ * @return the newly created output
+ */
+ public Response createResponse()
+ {
+ return new ResponseImpl();
+ }
+
+ /**
+ * Create a new port type.
+ *
+ * @return the newly created port type
+ */
+ public Resource createResource()
+ {
+ return new ResourceImpl();
+ }
+
+ /**
+ * Create a new types section.
+ *
+ * @return the newly created types section
+ */
+ public Params createParams()
+ {
+ return new ParamsImpl(this);
+ }
+ public Grammars createGrammars()
+ {
+ return new GrammarsImpl(this);
+ }
+
+ private Object getFromIncludes(String typeOfApplication, QName name)
+ {
+ Object ret = null;
+ List includeList = getIncludes(name.getNamespaceURI());
+
+ if (includeList != null)
+ {
+ Iterator includeIterator = includeList.iterator();
+
+ while (includeIterator.hasNext())
+ {
+ Include includeApp = (Include)includeIterator.next();
+
+ if (includeApp != null)
+ {
+ Application includedApp = includeApp.getApplication();
+
+ if (includedApp != null)
+ {
+ /*
+ These object comparisons will work fine because
+ this private method is only called from within
+ this class, using only the pre-defined constants
+ from the Constants class as the typeOfDefinition
+ argument.
+ */
+ if (typeOfApplication == Constants.ELEM_RESOURCE)
+ {
+ ret = includedApp.getResource(name);
+ }
+
+ if (ret != null)
+ {
+ return ret;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+ }
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("Definition: name=" + name +
+ " targetNamespace=" + targetNamespace);
+
+ if (includes != null)
+ {
+ Iterator includeIterator = includes.values().iterator();
+
+ while (includeIterator.hasNext())
+ {
+ strBuf.append("\n" + includeIterator.next());
+ }
+ }
+
+ if (params != null)
+ {
+ strBuf.append("\n" + params);
+ }
+
+
+
+ if (resources != null)
+ {
+ Iterator resourceIterator = resources.values().iterator();
+
+ while (resourceIterator.hasNext())
+ {
+ strBuf.append("\n" + resourceIterator.next());
+ }
+ }
+
+
+ return strBuf.toString();
+ }
+
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/Constants$SemanticExtensionType.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/Constants$SemanticExtensionType.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/Constants.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/Constants.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/Constants.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/Constants.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,191 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import javax.xml.namespace.*;
+
+/**
+ * This class contains the constatns of WSDLS
+ * @author Zixin Wu (wuzixin@uga.edu)
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ */
+public class Constants
+{
+ // Namespace URIs.
+ public static final String NS_URI_WADL =
+ "http://wadl.dev.java.net/2009/02";
+
+ public static final String NS_URI_WADLS =
+ "http://lsdis.cs.uga.edu/projects/meteor-s/wadl-s/examples/WSSemantics.xsd";
+ public static final String NS_URI_SAWADL =
+ "http://www.w3.org/2002/ws/sawadl/spec/sawadl#";
+ public static final String NS_URI_XMLNS =
+ "http://www.w3.org/2000/xmlns/";
+
+ //Prefix
+ public static final String PREFIX_WSDLS =
+ "wssem";
+
+ // Top-level element names.
+ public static final String ELEM_DEFINITIONS = "application";
+ public static final String ELEM_GRAMMARS = "grammars";
+ public static final String ELEM_PARAM = "param";
+ public static final String ELEM_TYPES = "types";
+ public static final String ELEM_RESOURCE = "resource";
+ // Non top-level element names.
+ public static final String ELEM_OPERATION = "method";
+ public static final String ELEM_PRECON = "precondition";
+ public static final String ELEM_EFFECT = "effect";
+ public static final String ELEM_INPUT = "request";
+ public static final String ELEM_OUTPUT = "response";
+ public static final String ELEM_HREF = "href";
+ public static final String ELEM_RESOURCES = "resources";
+ public static final String ELEM_INCLUDE = "include";
+ public static final String ELEM_IMPORT = "import";
+ public static final String ELEM_DOCUMENTATION = "doc";
+ public static final String ELEM_REPRESENTATION = "representation";
+
+
+ // Top-level qualified element names.
+ public static final QName Q_ELEM_DEFINITIONS =
+ new QName(NS_URI_WADL, ELEM_DEFINITIONS);
+ public static final QName Q_ELEM_TYPES =
+ new QName(NS_URI_WADL, ELEM_TYPES);
+ public static final QName Q_ELEM_GRAMMARS =
+ new QName(NS_URI_WADL, ELEM_GRAMMARS);
+ public static final QName Q_ELEM_PARAM =
+ new QName(NS_URI_WADL, ELEM_PARAM);
+ public static final QName Q_ELEM_RESOURCE =
+ new QName(NS_URI_WADL, ELEM_RESOURCE);
+ public static final QName Q_ELEM_RESOURCES =
+ new QName(NS_URI_WADL, ELEM_RESOURCES);
+
+ // Non top-level qualified element names.
+ public static final QName Q_ELEM_OPERATION =
+ new QName(NS_URI_WADL, ELEM_OPERATION);
+ public static QName Q_ELEM_PRECON;
+ public static QName Q_ELEM_EFFECT;
+ public static QName Q_ELEM_CATEGORY;
+ public static final QName Q_ELEM_INPUT =
+ new QName(NS_URI_WADL, ELEM_INPUT);
+ public static final QName Q_ELEM_OUTPUT =
+ new QName(NS_URI_WADL, ELEM_OUTPUT);
+ public static final QName Q_ELEM_DOCUMENTATION =
+ new QName(NS_URI_WADL, ELEM_DOCUMENTATION);
+ public static final QName Q_ELEM_REPRESENTATION =
+ new QName(NS_URI_WADL, ELEM_REPRESENTATION);
+ public static final QName Q_ELEM_INCLUDE =
+ new QName(NS_URI_WADL, ELEM_INCLUDE);
+
+ // Attribute names.
+ public static final String ATTR_NAME = "name";
+ public static final String PARAM_STYLE = "style";
+ public static final String PARAM_NAME = "name";
+ public static final String PARAM_TYPE = "type";
+ public static final String PARAM_REQUIRED = "required";
+ public static final String PARAM_DEFAULT = "default";
+ public static final String OPTION_VALUE = "value";
+ public static final String ATTR_BASE = "base";
+ public static final String REQUEST_ELEMENT_NAME ="element";
+ public static final String ATTR_PRE = "precondition";
+ public static final String ID_NAME = "id";
+ public static final String RESOURCE_ATTR_NAME = "path";
+ public static final String ATTR_TARGET_NAMESPACE = "targetNamespace";
+ public static final String ATTR_ELEMENT = "element";
+ public static final String ATTR_TYPE = "type";
+ public static final String ATTR_MESSAGE = "message";
+ public static final String ATTR_MODELREF = "modelReference";
+ public static final String ATTR_LIFTINGSCHEMAMAPPING = "liftingSchemaMapping";
+ public static final String ATTR_LOWERINGSCHEMAMAPPING = "loweringSchemaMapping";
+ public static final String ATTR_PARAMETER_ORDER = "parameterOrder";
+ public static final String ATTR_EXPRESSION = "expression";
+ public static final String ATTR_BINDING = "binding";
+ public static final String ATTR_XMLNS = "xmlns";
+ public static final String ATTR_NAMESPACE = "namespace";
+ public static final String ATTR_LOCATION = "location";
+ public static final String ATTR_REQUIRED = "required";
+ public static final String ATTR_TAXONOMYURI = "taxonomyURI";
+ public static final String ATTR_TAXONOMYCODE = "taxonomyCode";
+
+ // Lists of native attribute names.
+ public static final String[] PART_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_TYPE, ATTR_ELEMENT, ATTR_MODELREF};
+ public static final String[] BINDING_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_TYPE};
+ public static final String[] BINDING_FAULT_ATTR_NAMES =
+ new String[]{ATTR_NAME};
+ public static final String[] BINDING_INPUT_ATTR_NAMES =
+ new String[]{ATTR_NAME};
+ public static final String[] BINDING_OPERATION_ATTR_NAMES =
+ new String[]{ATTR_NAME};
+ public static final String[] BINDING_OUTPUT_ATTR_NAMES =
+ new String[]{ATTR_NAME};
+ public static final String[] FAULT_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_MESSAGE};
+ public static final String[] IMPORT_ATTR_NAMES =
+ new String[]{ATTR_NAMESPACE, ATTR_LOCATION};
+ public static final String[] INPUT_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_MESSAGE};
+ public static final String[] CATEGORY_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_TAXONOMYURI, ATTR_TAXONOMYCODE};
+ public static final String[] OPADDON_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_EXPRESSION};
+ public static final String[] MESSAGE_ATTR_NAMES =
+ new String[]{ATTR_NAME};
+ public static final String[] OPERATION_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_PARAMETER_ORDER};
+ public static final String[] OUTPUT_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_MESSAGE};
+ public static final String[] PORT_ATTR_NAMES =
+ new String[]{ATTR_NAME, ATTR_BINDING};
+ public static final String[] PORT_TYPE_ATTR_NAMES =
+ new String[]{RESOURCE_ATTR_NAME};
+ public static final String[] SERVICE_ATTR_NAMES =
+ new String[]{ATTR_NAME};
+ public static final String[] TYPES_ATTR_NAMES =
+ new String[]{};
+
+ // Qualified attribute names.
+ public static final QName Q_ATTR_REQUIRED =
+ new QName(NS_URI_WADL, ATTR_REQUIRED);
+ public static QName Q_ATTR_MODELREF;
+ public static QName Q_ATTR_LIFTINGSCHEMAMAPPING;
+ public static QName Q_ATTR_LOWERINGSCHEMAMAPPING;
+
+ // XML Declaration string.
+ public static final String XML_DECL_DEFAULT = "UTF-8";
+ public static final String XML_DECL_START =
+ "";
+
+ // Feature names.
+ public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
+ public static final String FEATURE_IMPORT_DOCUMENTS =
+ "javax.wsdl.importDocuments";
+ public static final String FEATURE_PARSE_SAWSDL = "urn:w3.org:sawsdl";
+ public static final String FEATURE_PARSE_SAWADL = "urn:w3.org:sawadl";
+
+ public static enum SemanticExtensionType {
+ WADLS, SAWADL;
+ }
+
+ public static final void setSemanticExtensionURI(SemanticExtensionType type) {
+ String uri = NS_URI_WADLS;
+ if(type == SemanticExtensionType.SAWADL)
+ uri = NS_URI_SAWADL;
+
+ Q_ELEM_PRECON =
+ new QName(uri, ELEM_PRECON);
+ Q_ELEM_EFFECT =
+ new QName(uri, ELEM_EFFECT);
+ Q_ATTR_MODELREF =
+ new QName(uri, ATTR_MODELREF);
+ Q_ATTR_LIFTINGSCHEMAMAPPING =
+ new QName(uri, ATTR_LIFTINGSCHEMAMAPPING);
+ Q_ATTR_LOWERINGSCHEMAMAPPING =
+ new QName(uri, ATTR_LOWERINGSCHEMAMAPPING);
+ }
+
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/GrammarsImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/GrammarsImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/GrammarsImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/GrammarsImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,272 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.wadls.Application;
+import javax.wadls.ModelReference;
+import javax.wadls.Grammars;
+import javax.wadls.WADLSException;
+import javax.wadls.extensions.schema.Schema;
+import javax.wadls.extensions.ExtensibilityElement;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+
+import edu.uga.cs.lsdis.meteors.wadls.util.SchemaUtils;
+
+/**
+ * This class represents the <types> section of a WSDL document.
+ *
+ * @author Zixin Wu (wuzixin@uga.edu)
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ */
+public class GrammarsImpl implements Grammars
+{
+ protected Application app = null; //WADLS Definition
+ protected List modelReferences = null;
+ protected Element docEl = null;
+ protected List extElements = new Vector();
+ protected Map allSchemas = null;
+
+
+ public static final long serialVersionUID = 1;
+
+ public GrammarsImpl(Application app){
+ this.app = app;
+ }
+
+ public List getTopLevelSchemas(){
+ return SchemaUtils.getSchemas(this.extElements);
+ }
+
+ /**
+ * Get the DOM elements of all the schemas in this Types.
+ * @return A list of DOM elements of all the schemas in this Types.
+ */
+ public Map getSchemas(){
+ return this.allSchemas;
+ }
+
+ public void setSchemas(Map allSchemas){
+ this.allSchemas = allSchemas;
+ }
+
+
+ /**
+ * Get the DOM element of the first schema in this Types.
+ * @return The DOM element of the first schema in this Types.
+ */
+ public Schema getFirstSchema(){
+ return SchemaUtils.getFirstSchema(this.extElements);
+ }
+ public ModelReference getModelReference(){
+ if(modelReferences == null)
+ return null;
+ return modelReferences.get(0);
+ }
+
+ public List getModelReferences(Element startElement, String path, Application app) throws WADLSException, URISyntaxException {
+ Element el = getXSDEle(startElement, path);
+ if (el == null)
+ return null;
+ String attrModelReference = el.getAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_MODELREF);
+ if (attrModelReference.equals(""))
+ return null;
+ List mrefs = ModelReferenceImpl.getModelReferences(attrModelReference, app);
+ if(mrefs.size() == 0)
+ return null;
+ return mrefs;
+ }
+ public ModelReference getModelReference(Element startElement, String path, Application app) throws WADLSException, URISyntaxException{
+ List mrefs = getModelReferences(startElement, path, app);
+ return mrefs.get(0);
+ }
+
+
+ private Element getXSDEle(Element startElement, String path) throws WADLSException{
+ if (path == null || path == "")
+ return startElement;
+ String eleName = startElement.getLocalName();
+ if (eleName.equals("element")){ //search the target from ();
+ modelReferences.add(0, modelReference);
+ }
+
+ public List getModelReferences() {
+ return modelReferences;
+ }
+
+ public void setModelReferences(List refs) {
+ modelReferences = refs;
+ }
+
+ /**
+ * Set the documentation element for this document. This dependency
+ * on org.w3c.dom.Element should eventually be removed when a more
+ * appropriate way of representing this information is employed.
+ *
+ * @param docEl the documentation element
+ */
+ public void setDocumentationElement(Element docEl)
+ {
+ this.docEl = docEl;
+ }
+
+ public void setModelReferences(Element startElement, String path, List refs) throws WADLSException {
+ for(ModelReference ref : refs) {
+ addModelReference(startElement, path, ref);
+ }
+ }
+
+ public void addModelReference(Element startElement, String path, ModelReference modelReference) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+
+ if (modelReference != null){
+ String strModelReference = modelReference.value();
+ Attr attr = el.getAttributeNodeNS(
+ Constants.NS_URI_WADLS, Constants.ATTR_MODELREF);
+ if(attr == null) {
+ attr = el.getOwnerDocument().createAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_MODELREF);
+ attr.setPrefix(Constants.PREFIX_WSDLS);
+ el.setAttributeNodeNS(attr);
+ }
+ String value = attr.getValue();
+ if(value != null) {
+ value += " " + strModelReference;
+ } else {
+ value = strModelReference;
+ }
+ attr.setValue(value);
+ modelReference.setParent(el);
+ }
+ else
+ el.removeAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_MODELREF);
+ }
+
+
+ /**
+ * Get the documentation element. This dependency on org.w3c.dom.Element
+ * should eventually be removed when a more appropriate way of
+ * representing this information is employed.
+ *
+ * @return the documentation element
+ */
+ public Element getDocumentationElement()
+ {
+ return docEl;
+ }
+
+ public void setLoweringSchemaMapping(Element startElement, String path, String schemaMapping) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+ if (schemaMapping != null){
+ Attr attr = el.getOwnerDocument().createAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LOWERINGSCHEMAMAPPING);
+ attr.setPrefix(Constants.PREFIX_WSDLS);
+ attr.setValue(schemaMapping);
+ el.setAttributeNodeNS(attr);
+ }
+ else
+ el.removeAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LOWERINGSCHEMAMAPPING);
+ }
+
+ public void setLiftingSchemaMapping(Element startElement, String path, String schemaMapping) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+ if (schemaMapping != null){
+ Attr attr = el.getOwnerDocument().createAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LIFTINGSCHEMAMAPPING);
+ attr.setPrefix(Constants.PREFIX_WSDLS);
+ attr.setValue(schemaMapping);
+ el.setAttributeNodeNS(attr);
+ }
+ else
+ el.removeAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LIFTINGSCHEMAMAPPING);
+ }
+ public String getLoweringSchemaMapping(Element startElement, String path) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+ if (el == null)
+ return null;
+ String attrSchemaMapping = el.getAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LOWERINGSCHEMAMAPPING);
+ if (attrSchemaMapping == "")
+ return null;
+ return attrSchemaMapping;
+
+ }
+
+ public String getLiftingSchemaMapping(Element startElement, String path) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+ if (el == null)
+ return null;
+ String attrSchemaMapping = el.getAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LIFTINGSCHEMAMAPPING);
+ if (attrSchemaMapping == "")
+ return null;
+ return attrSchemaMapping;
+
+ }
+
+
+ /**
+ * Add an extensibility element.
+ *
+ * @param extElement the extensibility element to be added
+ */
+
+
+ /**
+ * Get all the extensibility elements defined here.
+ */
+
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("Types:");
+
+ if (extElements != null)
+ {
+ Iterator extIterator = extElements.iterator();
+
+ while (extIterator.hasNext())
+ {
+ strBuf.append("\n" + extIterator.next());
+ }
+ }
+
+ return strBuf.toString();
+ }
+
+
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/IncludeImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/IncludeImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/IncludeImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/IncludeImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,207 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.util.*;
+
+import javax.wadls.*;
+import javax.xml.namespace.*;
+import org.w3c.dom.*;
+
+/**
+ * This class represents an import, and may contain a reference
+ * to the imported definition.
+ *
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ */
+public class IncludeImpl implements Include
+{
+ protected String namespaceURI = null;
+ protected String locationURI = null;
+ /*
+ This would need to be made into a generic reference to handle other
+ types of referenced documents.
+ */
+ protected Application application = null;
+ protected Element docEl = null;
+ protected Map extensionAttributes = new HashMap();
+ protected List nativeAttributeNames =
+ Arrays.asList(Constants.IMPORT_ATTR_NAMES);
+
+ public static final long serialVersionUID = 1;
+
+ public void setNamespaceURI(String namespaceURI)
+ {
+ this.namespaceURI = namespaceURI;
+ }
+
+ public String getNamespaceURI()
+ {
+ return namespaceURI;
+ }
+
+ public void setLocationURI(String locationURI)
+ {
+ this.locationURI = locationURI;
+ }
+
+ public String getLocationURI()
+ {
+ return locationURI;
+ }
+
+ /**
+ * This property can be used to hang a referenced Definition,
+ * and the top-level Definition (i.e. the one with the <import>)
+ * will use this Definition when resolving referenced WSDL parts.
+ * This would need to be made into a generic reference to handle
+ * other types of referenced documents.
+ */
+ public void setApplication(Application application)
+ {
+ this.application = application;
+ }
+
+ /**
+ * This property can be used to hang a referenced Definition,
+ * and the top-level Definition (i.e. the one with the <import>)
+ * will use this Definition when resolving referenced WSDL parts.
+ * This would need to be made into a generic reference to handle
+ * other types of referenced documents.
+ */
+ public Application getApplication()
+ {
+ return application;
+ }
+
+ /**
+ * Set the documentation element for this document. This dependency
+ * on org.w3c.dom.Element should eventually be removed when a more
+ * appropriate way of representing this information is employed.
+ *
+ * @param docEl the documentation element
+ */
+ public void setDocumentationElement(Element docEl)
+ {
+ this.docEl = docEl;
+ }
+
+ /**
+ * Get the documentation element. This dependency on org.w3c.dom.Element
+ * should eventually be removed when a more appropriate way of
+ * representing this information is employed.
+ *
+ * @return the documentation element
+ */
+ public Element getDocumentationElement()
+ {
+ return docEl;
+ }
+
+ /**
+ * Set an extension attribute on this element. Pass in a null value to remove
+ * an extension attribute.
+ *
+ * @param name the extension attribute name
+ * @param value the extension attribute value. Can be a String, a QName, a
+ * List of Strings, or a List of QNames.
+ *
+ * @see #getExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public void setExtensionAttribute(QName name, Object value)
+ {
+ if (value != null)
+ {
+ extensionAttributes.put(name, value);
+ }
+ else
+ {
+ extensionAttributes.remove(name);
+ }
+ }
+
+ /**
+ * Retrieve an extension attribute from this element. If the extension
+ * attribute is not defined, null is returned.
+ *
+ * @param name the extension attribute name
+ *
+ * @return the value of the extension attribute, or null if
+ * it is not defined. Can be a String, a QName, a List of Strings, or a List
+ * of QNames.
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public Object getExtensionAttribute(QName name)
+ {
+ return extensionAttributes.get(name);
+ }
+
+ /**
+ * Get the map containing all the extension attributes defined
+ * on this element. The keys are the qnames of the attributes.
+ *
+ * @return a map containing all the extension attributes defined
+ * on this element
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttribute
+ */
+ public Map getExtensionAttributes()
+ {
+ return extensionAttributes;
+ }
+
+ /**
+ * Get the list of local attribute names defined for this element in
+ * the WSDL specification.
+ *
+ * @return a List of Strings, one for each local attribute name
+ */
+ public List getNativeAttributeNames()
+ {
+ return nativeAttributeNames;
+ }
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("Import:");
+
+ if (namespaceURI != null)
+ {
+ strBuf.append("\nnamespaceURI=" + namespaceURI);
+ }
+
+ if (locationURI != null)
+ {
+ strBuf.append("\nlocationURI=" + locationURI);
+ }
+
+ if (application != null)
+ {
+ strBuf.append("\napplication=" + application);
+ }
+
+ Iterator keys = extensionAttributes.keySet().iterator();
+
+ while (keys.hasNext())
+ {
+ QName name = (QName)keys.next();
+
+ strBuf.append("\nextension attribute: " + name + "=" +
+ extensionAttributes.get(name));
+ }
+
+ return strBuf.toString();
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/MethodImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/MethodImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/MethodImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/MethodImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,274 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import javax.wadls.Effect;
+import javax.wadls.Request;
+import javax.wadls.ModelReference;
+import javax.wadls.Method;
+import javax.wadls.Response;
+import javax.wadls.PreCondition;
+import org.w3c.dom.Element;
+
+/**
+ * This class represents a WSDL operation.
+ * It includes information on input, output and fault
+ * messages associated with usage of the operation.
+ *
+ * @author Zixin Wu (wuzixin@uga.edu)
+ * @author Paul Fremantle (pzf@us.ibm.com)
+ * @author Nirmal Mukhi (nmukhi@us.ibm.com)
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ */
+public class MethodImpl implements Method
+{
+ protected String name = null;
+ protected Request request = null;
+ protected Response response = null;
+ protected List modelRefs = null;
+ protected PreCondition preCondition = null;
+ protected Effect effect = null;
+ protected List parameterOrder = null;
+ protected Element docEl = null;
+ protected List extElements = new Vector();
+ protected boolean isUndefined = true;
+
+ public static final long serialVersionUID = 1;
+
+
+ public void addModelReference (ModelReference modelReference){
+ if (this.modelRefs == null)
+ modelRefs= new ArrayList ();
+ modelRefs.add(modelReference);
+ }
+
+
+ /**
+ * Get the modelReference of this operation.
+ *
+ * @return the modelReference value
+ */
+
+ public ModelReference getModelReference(){
+ if(modelRefs == null)
+ return null;
+ return modelRefs.get(0);
+ }
+
+ /**
+ * Set the precondition of this operation.
+ *
+ * @param preCondition the desired precondition
+ */
+ public void setPreCondition(PreCondition preCondition){
+ this.preCondition = preCondition;
+ }
+
+ /**
+ * Get the precondition of this operation.
+ *
+ * @return the precondition
+ */
+ public PreCondition getPreCondition(){
+ return this.preCondition;
+ }
+
+ /**
+ * Set the effect of this operation.
+ *
+ * @param effect the desired effect
+ */
+ public void setEffect(Effect effect){
+ this.effect = effect;
+ }
+
+ /**
+ * Get the effect of this operation.
+ *
+ * @return The effect
+ */
+ public Effect getEffect(){
+ return this.effect;
+ }
+
+ /**
+ * Set the name of this operation.
+ *
+ * @param name the desired name
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the name of this operation.
+ *
+ * @return the operation name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Set the input message specification for this operation.
+ *
+ * @param input the new input message
+ */
+ public void setRequest(Request request)
+ {
+ this.request = request;
+ }
+
+ /**
+ * Get the input message specification for this operation.
+ *
+ * @return the input message
+ */
+ public Request getRequest()
+ {
+ return request;
+ }
+
+ /**
+ * Set the output message specification for this operation.
+ *
+ * @param output the new output message
+ */
+ public void setResponse(Response response)
+ {
+ this.response = response;
+ }
+
+ /**
+ * Get the output message specification for this operation.
+ *
+ * @return the output message specification for the operation
+ */
+ public Response getResponse()
+ {
+ return response;
+ }
+
+
+
+ /**
+ * Set the parameter ordering for a request-response,
+ * or solicit-response operation.
+ *
+ * @param parameterOrder a list of named parameters
+ * containing the part names to reflect the desired
+ * order of parameters for RPC-style operations
+ */
+ public void setParameterOrdering(List parameterOrder)
+ {
+ this.parameterOrder = parameterOrder;
+ }
+
+ /**
+ * Get the parameter ordering for this operation.
+ *
+ * @return the parameter ordering, a list consisting
+ * of message part names
+ */
+ public List getParameterOrdering()
+ {
+ return parameterOrder;
+ }
+
+ /**
+ * Set the documentation element for this document. This dependency
+ * on org.w3c.dom.Element should eventually be removed when a more
+ * appropriate way of representing this information is employed.
+ *
+ * @param docEl the documentation element
+ */
+ public void setDocumentationElement(Element docEl)
+ {
+ this.docEl = docEl;
+ }
+
+ /**
+ * Get the documentation element. This dependency on org.w3c.dom.Element
+ * should eventually be removed when a more appropriate way of
+ * representing this information is employed.
+ *
+ * @return the documentation element
+ */
+ public Element getDocumentationElement()
+ {
+ return docEl;
+ }
+
+ public void setUndefined(boolean isUndefined)
+ {
+ this.isUndefined = isUndefined;
+ }
+
+ public boolean isUndefined()
+ {
+ return isUndefined;
+ }
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("Operation: name=" + name);
+
+ if (parameterOrder != null)
+ {
+ strBuf.append("\nparameterOrder=" + parameterOrder);
+ }
+
+
+ if (request != null)
+ {
+ strBuf.append("\n" + request);
+ }
+
+ if (response != null)
+ {
+ strBuf.append("\n" + response);
+ }
+
+ if (modelRefs != null)
+ for(ModelReference ref : modelRefs) {
+ strBuf.append('\n');
+ strBuf.append(ref);
+ }
+ /* if (modelRef != null)
+ {
+ strBuf.append("\n" + modelRef);
+ }*/
+
+ if (preCondition != null)
+ {
+ strBuf.append("\n" + preCondition);
+ }
+
+ if (effect != null)
+ {
+ strBuf.append("\n" + effect);
+ }
+
+ return strBuf.toString();
+ }
+
+ public List getModelReferences() {
+ return modelRefs;
+ }
+
+ public void setModelReferences(List refs) {
+ modelRefs = refs;
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ModelReferenceImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ModelReferenceImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ModelReferenceImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ModelReferenceImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,217 @@
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.wadls.Application;
+import javax.wadls.ModelReference;
+import javax.wadls.WADLSException;
+
+/**
+ * This class represents a ModelReference.
+ *
+ * @author Zixin Wu (wuzixin@uga.edu)
+ *
+ */
+public class ModelReferenceImpl implements ModelReference {
+
+ /**
+ * The URI of the ontology used in the model reference
+ */
+ protected URI namespace;
+
+ /**
+ * The parent WSDL-S element of this model reference
+ */
+ protected Object parent;
+
+ /**
+ * The NS Prefix of the model reference
+ */
+ protected String prefix;
+
+ /**
+ * The ontology concept of this model reference
+ */
+ protected String concept;
+
+ /**
+ * Get the concept of this modelReference.
+ * @return The concept of this modelReference.
+ */
+ public String getConcept(){
+ return this.concept;
+ }
+
+ /**
+ * Set the concept of this modelReference
+ * @param concept The desired concept of this modelReference
+ */
+ public void setConcept(String concept){
+ this.concept = concept;
+ }
+
+ /**
+ * Get the prefix of this modelReference
+ * @return The prefix of this modelReference
+ */
+ public String getPrefix(){
+ return this.prefix;
+ }
+
+ /**
+ * Set the prefix of the ontology used in this modelReference
+ * @param prefix The desired prefix of the ontology used in this modelReference
+ */
+ public void setPrefix(String prefix){
+ this.prefix = prefix;
+ }
+
+ /**
+ * Get the namespace of the ontology used in this modelReference
+ * @return The namespace of the ontology used in this modelReference
+ */
+ public URI getNamespace(){
+ return this.namespace;
+ }
+
+ /**
+ * Set the namespace of the ontology used in this modelReference
+ * @param nameSpace The desired namespace of the ontology used in this modelReference
+ */
+ public void setNamespace(String nameSpace)
+ throws URISyntaxException{
+ //System.out.println("namespace is "+nameSpace);
+ this.namespace = new URI(nameSpace);
+ }
+
+ /**
+ * Get the parent object of this modelReference
+ * @return The parent object of this modelReference
+ */
+ public Object getParent(){
+ return this.parent;
+ }
+
+ /**
+ * Set the parent object of this modelReference
+ * @param parent The desired parent object of this modelReference
+ */
+ public void setParent(Object parent){
+ this.parent = parent;
+ }
+
+ /**
+ * Return a formatted string representing this modelReference.
+ * @return A formatted string representing this modelReference.
+ */
+ public String value(){
+ if (this.concept == null || this.namespace == null)
+ return null;
+ return (this.namespace + "#" + this.concept);
+ }
+
+ public String toString(){
+ if (this.concept == null)
+ return null;
+ if (this.prefix != null){ //use the prefix
+ return (this.prefix + "#" + this.concept);
+ }
+ else if (this.namespace != null){ //use the namespace
+ return (this.namespace + "#" + this.concept);
+ }
+ else
+ return null;
+ }
+
+ public static List getModelReferences(String mrefs, Application app) throws URISyntaxException, WADLSException {
+ String[] refs = mrefs.split(" ");
+ List list = new ArrayList(refs.length);
+ for(String ref : refs) {
+ ModelReference mr = app.createModelReference();
+ mr.valueOf(ref, app);
+ list.add(mr);
+ }
+ return list;
+ }
+
+ public void valueOf(String modelReferenceAsString, Application app) throws URISyntaxException, WADLSException{
+ int index = modelReferenceAsString.indexOf('#');
+ String prefix = (index != -1)
+ ? modelReferenceAsString.substring(0, index)
+ : null;
+ String namespaceURI = prefix;
+ String localPart = null;
+
+ //System.out.println("Namespace URI:"+namespaceURI);
+ //assume the user give prefix#localName
+ if (prefix != null){
+ //try to find a namespaceURI for that prefix
+ String tmpNamespaceURI = app.getNamespace(prefix);
+ //System.out.println("Temp Namespace URI:"+tmpNamespaceURI);
+ if(tmpNamespaceURI != null) { //the user did give prefix
+ namespaceURI = tmpNamespaceURI.substring(0, tmpNamespaceURI.length());
+ }
+ else{ //the user gave namespaceURI instead of prefix
+ //try to find a prefix for that namespaceURI
+ prefix = app.getPrefix(namespaceURI);
+ if (prefix == null)
+ prefix = app.getPrefix(namespaceURI+"#");
+ }
+ localPart = modelReferenceAsString.substring(index + 1);
+ }
+ else if (!prefix.equals("")){ //no prefix or namespaceURI is given, but '#' is included
+ //use target namespace
+ namespaceURI = app.getTargetNamespace();
+ prefix = app.getPrefix(namespaceURI);
+ localPart = modelReferenceAsString.substring(1);
+ }
+ else{
+ throw new IllegalArgumentException(
+ "No Namespace URI is provided for this modelReference: " +
+ modelReferenceAsString
+ + ".");
+ }
+
+ if (namespaceURI != null){
+ System.out.println("namespaceURI is "+namespaceURI);
+ this.setNamespace(namespaceURI);
+ //System.out.println("Concept:"+localPart);
+ this.setConcept(localPart);
+ this.setPrefix(prefix);
+ }
+ else{
+ String faultCode = (prefix == null)
+ ? WADLSException.NO_PREFIX_SPECIFIED
+ : WADLSException.UNBOUND_PREFIX;
+
+ WADLSException wadlExc = new WADLSException(faultCode,
+ "Unable to determine " +
+ "namespace of '" +
+ modelReferenceAsString + "'.");
+
+ throw wadlExc;
+ }
+ }
+
+ /**
+ * Equals method overriden to compare two modelreferences.
+ * We campare the namespace and the concept name (literally)
+ * @param obj
+ */
+ public boolean equals(Object obj) {
+ if (!(obj instanceof ModelReference)){
+ return false;
+ }else{
+ ModelReference ref = (ModelReference)obj;
+ return (concept.equals(ref.getConcept()) &&
+ namespace.equals(ref.getNamespace()));
+ }
+ }
+
+ public int hashCode(){
+ return this.value().hashCode();
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/OperationAddOnImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/OperationAddOnImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/OperationAddOnImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/OperationAddOnImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,223 @@
+/*
+ * Created on Apr 4, 2005
+ *
+ */
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.util.*;
+
+import javax.wadls.*;
+import javax.xml.namespace.*;
+
+import org.w3c.dom.*;
+
+/**
+ * This class represents an instance of PreCondition or Effect,
+ *
+ * @author Zixin Wu
+ */
+public class OperationAddOnImpl implements PreCondition, Effect
+{
+ protected String name = null;
+ protected List modelReferences = null;
+ protected String expression = null;
+ protected Element docEl = null;
+ protected Map extensionAttributes = new HashMap();
+ protected List nativeAttributeNames =
+ Arrays.asList(Constants.OPADDON_ATTR_NAMES);
+
+ public static final long serialVersionUID = 1;
+
+ /**
+ * Set the name.
+ *
+ * @param name the desired name
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the name.
+ *
+ * @return the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Get the modelReference.
+ *
+ * @return The modelReference
+ */
+ public ModelReference getModelReference(){
+ if(modelReferences == null)
+ return null;
+ return modelReferences.get(0);
+ }
+
+ /**
+ * Set the modelReference.
+ *
+ * @param modelReference The desired modelReference.
+ */
+ public void addModelReference(ModelReference modelReference){
+ if(modelReferences == null)
+ modelReferences = new ArrayList();
+ modelReferences.add(0, modelReference);
+ }
+
+ /**
+ * Set the expression.
+ *
+ * @param expression The desired expression.
+ */
+ public void setExpression(String expression){
+ this.expression = expression;
+ }
+
+ /**
+ * Get the expression.
+ *
+ * @return The expression.
+ */
+ public String getExpression(){
+ return this.expression;
+ }
+
+ /**
+ * Set the documentation element for this document. This dependency
+ * on org.w3c.dom.Element should eventually be removed when a more
+ * appropriate way of representing this information is employed.
+ *
+ * @param docEl the documentation element
+ */
+ public void setDocumentationElement(Element docEl)
+ {
+ this.docEl = docEl;
+ }
+
+ /**
+ * Get the documentation element. This dependency on org.w3c.dom.Element
+ * should eventually be removed when a more appropriate way of
+ * representing this information is employed.
+ *
+ * @return the documentation element
+ */
+ public Element getDocumentationElement()
+ {
+ return docEl;
+ }
+
+ /**
+ * Set an extension attribute on this element. Pass in a null value to remove
+ * an extension attribute.
+ *
+ * @param name the extension attribute name
+ * @param value the extension attribute value. Can be a String, a QName, a
+ * List of Strings, or a List of QNames.
+ *
+ * @see #getExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public void setExtensionAttribute(QName name, Object value)
+ {
+ if (value != null)
+ {
+ extensionAttributes.put(name, value);
+ }
+ else
+ {
+ extensionAttributes.remove(name);
+ }
+ }
+
+ /**
+ * Retrieve an extension attribute from this element. If the extension
+ * attribute is not defined, null is returned.
+ *
+ * @param name the extension attribute name
+ *
+ * @return the value of the extension attribute, or null if
+ * it is not defined. Can be a String, a QName, a List of Strings, or a List
+ * of QNames.
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public Object getExtensionAttribute(QName name)
+ {
+ return extensionAttributes.get(name);
+ }
+
+ /**
+ * Get the map containing all the extension attributes defined
+ * on this element. The keys are the qnames of the attributes.
+ *
+ * @return a map containing all the extension attributes defined
+ * on this element
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttribute
+ */
+ public Map getExtensionAttributes()
+ {
+ return extensionAttributes;
+ }
+
+ /**
+ * Get the list of local attribute names defined for this element in
+ * the WSDLS specification.
+ *
+ * @return a List of Strings, one for each local attribute name
+ */
+ public List getNativeAttributeNames()
+ {
+ return nativeAttributeNames;
+ }
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("name=" + name);
+
+ strBuf.append("\nmodelReference=");
+ for(ModelReference ref : modelReferences) {
+ strBuf.append(ref.toString());
+ strBuf.append('\n');
+ }
+
+ if (expression != null)
+ {
+ strBuf.append("\nexpression=" + expression);
+ }
+
+// Iterator keys = extensionAttributes.keySet().iterator();
+//
+// while (keys.hasNext())
+// {
+// QName name = (QName)keys.next();
+//
+// strBuf.append("\nextension attribute: " + name + "=" +
+// extensionAttributes.get(name));
+// }
+
+ return strBuf.toString();
+ }
+
+ public List getModelReferences() {
+ return modelReferences;
+ }
+
+ public void setModelReferences(List refs) {
+ modelReferences = refs;
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ParamImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ParamImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ParamImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ParamImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,212 @@
+/*
+ * Copyright (c) 2009 Srikalyan Swayampakula.. All rights reserved.
+ *
+ * Author : Srikalyan Swayampakula. .
+ * Name of the File : Param.java .
+ * Created on : Nov 22, 2009 at 4:03:57 PM .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ * 3. Neither the name of the University of Georgia nor the names
+ * of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Vector;
+
+import javax.wadls.Param;
+
+/**
+ *
+ * @author Srikalyan Swayampakula.
+ */
+public class ParamImpl implements Param
+{
+
+ List optionvalue = new Vector();
+ protected String name;
+ protected String style;
+ protected String id;
+ protected String type;
+ protected String default1;
+ protected String required = "false";
+ protected boolean repeation = false;
+ protected String fixed;
+ protected String path;
+ protected String modelreference =null;
+ protected String liftingschemamapping=null;
+ protected String loweringschemamapping=null;
+
+
+
+ public String getModelreference() {
+ return modelreference;
+ }
+
+ public void setModelreference(String modelreference) {
+ this.modelreference = modelreference;
+ }
+
+ public String getLiftingschemamapping() {
+ return liftingschemamapping;
+ }
+
+ public void setLiftingschemamapping(String liftingschemamapping) {
+ this.liftingschemamapping = liftingschemamapping;
+ }
+
+ public String getLoweringschemamapping() {
+ return loweringschemamapping;
+ }
+
+ public void setLoweringschemamapping(String loweringschemamapping) {
+ this.loweringschemamapping = loweringschemamapping;
+ }
+
+ public List getOptionvalue() {
+ return optionvalue;
+ }
+
+ public void setOptionvalue(List optionvalue) {
+ this.optionvalue = optionvalue;
+ }
+
+ public ParamImpl()
+ {
+ }
+
+ public ParamImpl(URI href, String name, String style, String id, String type, String default1, String fixed, String path)
+ {
+
+
+ this.name = name;
+ this.style = style;
+ this.id = id;
+ this.type = type;
+ this.default1 = default1;
+ this.fixed = fixed;
+ this.path = path;
+ }
+
+ public String getDefault1()
+ {
+ return default1;
+ }
+
+ public void setDefault1(String default1)
+ {
+ this.default1 = default1;
+ }
+
+
+
+ public String getFixed()
+ {
+ return fixed;
+ }
+
+ public void setFixed(String fixed)
+ {
+ this.fixed = fixed;
+ }
+
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+
+ public String getPath()
+ {
+ return path;
+ }
+
+ public void setPath(String path)
+ {
+ this.path = path;
+ }
+
+ public boolean isRepeation()
+ {
+ return repeation;
+ }
+
+ public void setRepeation(boolean repeation)
+ {
+ this.repeation = repeation;
+ }
+
+ public String getRequired()
+ {
+ return required;
+ }
+
+ public void setRequired(String required)
+ {
+ this.required = required;
+ }
+
+ public String getStyle()
+ {
+ return style;
+ }
+
+ public void setStyle(String style)
+ {
+ this.style = style;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ParamsImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ParamsImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ParamsImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ParamsImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,347 @@
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.wadls.Application;
+import javax.wadls.ModelReference;
+import javax.wadls.Params;
+import javax.wadls.WADLSException;
+import javax.wadls.extensions.schema.Schema;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+
+import edu.uga.cs.lsdis.meteors.wadls.util.SchemaUtils;
+
+/**
+ * This class represents the <types> section of a WSDL document.
+ *
+ * @author Zixin Wu (wuzixin@uga.edu)
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ */
+public class ParamsImpl implements Params
+{
+ protected List modelRefs = null;
+ protected Application app = null; //WSDLS Definition
+ protected Element docEl = null;
+ protected List extElements = new Vector();
+ protected Map allSchemas = null;
+
+ public static final long serialVersionUID = 1;
+
+ public ParamsImpl(Application app){
+ this.app = app;
+ }
+
+ public List getTopLevelSchemas(){
+ return SchemaUtils.getSchemas(this.extElements);
+ }
+
+ /**
+ * Get the DOM elements of all the schemas in this Types.
+ * @return A list of DOM elements of all the schemas in this Types.
+ */
+ public Map getSchemas(){
+ return this.allSchemas;
+ }
+
+ public void setSchemas(Map allSchemas){
+ this.allSchemas = allSchemas;
+ }
+
+
+
+ public void addModelReference (ModelReference modelReference){
+ if (this.modelRefs == null)
+ modelRefs= new ArrayList ();
+ modelRefs.add(modelReference);
+ }
+
+
+ /**
+ * Get the modelReference of this operation.
+ *
+ * @return the modelReference value
+ */
+
+ public ModelReference getModelReference(){
+ if(modelRefs == null)
+ return null;
+ return modelRefs.get(0);
+ }
+ /**
+ * Get the DOM element of the first schema in this Types.
+ * @return The DOM element of the first schema in this Types.
+ */
+ public Schema getFirstSchema(){
+ return SchemaUtils.getFirstSchema(this.extElements);
+ }
+ public List getModelReferences() {
+ return modelRefs;
+ }
+ public void setModelReferences(List refs) {
+ modelRefs = refs;
+ }
+ /**
+ * Get the XSD simpleType with the given name.
+ * @param name The QName of the type
+ * @return A DOM Element representing the simpleType
+ * @throws WADLSException
+ */
+
+ public Element getXSDElement(String xpath) throws WADLSException{
+ Element returnElt = null;
+ Map schemas = this.getSchemas();
+ Iterator it = schemas.values().iterator();
+ while(it.hasNext()){
+ Schema schema = (Schema)(it.next());
+ Element schemaEle = schema.getElement();
+ returnElt = this.getXSDElement(schemaEle, xpath);
+ if (returnElt != null)
+ return returnElt;
+ }
+ return null;
+ }
+
+ /**
+ * Get the modelReference on the element located by the given path.
+ * @param startElement The starting element of the path
+ * @param path
+ * @return The modelReference
+ */
+ public ModelReference getModelReference(Element startElement, String path, Application app) throws WADLSException, URISyntaxException{
+ List mrefs = getModelReferences(startElement, path, app);
+ return mrefs.get(0);
+ }
+
+ /**
+ * Set the modelReference on the element located by the given path.
+ * @param startElement The starting element of the path
+ * @param path
+ * @param modelReference The desired modelReference
+ */
+ public void addModelReference(Element startElement, String path, ModelReference modelReference) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+
+ if (modelReference != null){
+ String strModelReference = modelReference.value();
+ Attr attr = el.getAttributeNodeNS(
+ Constants.NS_URI_WADLS, Constants.ATTR_MODELREF);
+ if(attr == null) {
+ attr = el.getOwnerDocument().createAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_MODELREF);
+ attr.setPrefix(Constants.PREFIX_WSDLS);
+ el.setAttributeNodeNS(attr);
+ }
+ String value = attr.getValue();
+ if(value != null) {
+ value += " " + strModelReference;
+ } else {
+ value = strModelReference;
+ }
+ attr.setValue(value);
+ modelReference.setParent(el);
+ }
+ else
+ el.removeAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_MODELREF);
+ }
+
+ /**
+ * Get the liftingSchemaMapping on the element located by the given path.
+ * @param startElement The starting element of the path
+ * @param path
+ * @return The schemaMapping value
+ */
+ public String getLiftingSchemaMapping(Element startElement, String path) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+ if (el == null)
+ return null;
+ String attrSchemaMapping = el.getAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LIFTINGSCHEMAMAPPING);
+ if (attrSchemaMapping == "")
+ return null;
+ return attrSchemaMapping;
+ }
+
+ /**
+ * Get the loweringSchemaMapping on the element located by the given path.
+ * @param startElement The starting element of the path
+ * @param path
+ * @return The schemaMapping value
+ */
+ public String getLoweringSchemaMapping(Element startElement, String path) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+ if (el == null)
+ return null;
+ String attrSchemaMapping = el.getAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LOWERINGSCHEMAMAPPING);
+ if (attrSchemaMapping == "")
+ return null;
+ return attrSchemaMapping;
+ }
+
+ /**
+ * Set the liftingSchemaMapping on the element located by the given path.
+ * @param startElement The starting element of the path
+ * @param path
+ * @param schemaMapping The desired schemaMapping
+ */
+ public void setLiftingSchemaMapping(Element startElement, String path, String schemaMapping) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+ if (schemaMapping != null){
+ Attr attr = el.getOwnerDocument().createAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LIFTINGSCHEMAMAPPING);
+ attr.setPrefix(Constants.PREFIX_WSDLS);
+ attr.setValue(schemaMapping);
+ el.setAttributeNodeNS(attr);
+ }
+ else
+ el.removeAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LIFTINGSCHEMAMAPPING);
+ }
+
+ /**
+ * Set the loweringSchemaMapping on the element located by the given path.
+ * @param startElement The starting element of the path
+ * @param path
+ * @param schemaMapping The desired schemaMapping
+ */
+ public void setLoweringSchemaMapping(Element startElement, String path, String schemaMapping) throws WADLSException{
+ Element el = getXSDEle(startElement, path);
+ if (schemaMapping != null){
+ Attr attr = el.getOwnerDocument().createAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LOWERINGSCHEMAMAPPING);
+ attr.setPrefix(Constants.PREFIX_WSDLS);
+ attr.setValue(schemaMapping);
+ el.setAttributeNodeNS(attr);
+ }
+ else
+ el.removeAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_LOWERINGSCHEMAMAPPING);
+ }
+
+ private Element getXSDEle(Element startElement, String path) throws WADLSException{
+ if (path == null || path == "")
+ return startElement;
+ String eleName = startElement.getLocalName();
+ if (eleName.equals("element")){ //search the target from getModelReferences(Element startElement, String path, Application app) throws WADLSException, URISyntaxException {
+ Element el = getXSDEle(startElement, path);
+ if (el == null)
+ return null;
+ String attrModelReference = el.getAttributeNS(Constants.NS_URI_WADLS, Constants.ATTR_MODELREF);
+ if (attrModelReference.equals(""))
+ return null;
+ List mrefs = ModelReferenceImpl.getModelReferences(attrModelReference, app);
+ if(mrefs.size() == 0)
+ return null;
+ return mrefs;
+ }
+ public void setModelReferences(Element startElement, String path, List refs) throws WADLSException {
+ for(ModelReference ref : refs) {
+ addModelReference(startElement, path, ref);
+ }
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/RequestImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/RequestImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/RequestImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/RequestImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,205 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.util.*;
+
+import javax.wadls.*;
+import javax.wadls.ModelReference;
+import javax.xml.namespace.*;
+import org.w3c.dom.*;
+
+/**
+ * This class represents an input message, and contains the name
+ * of the input and the message itself.
+ *
+ * @author Matthew J. Duftler
+ */
+public class RequestImpl implements Request
+{
+ protected String name = null;
+ List inputXSDList = new Vector();
+ List paramList = new Vector();
+ protected List modelReferences = null;
+ protected Element docEl = null;
+ protected Map extensionAttributes = new HashMap();
+ protected List nativeAttributeNames =
+ Arrays.asList(Constants.INPUT_ATTR_NAMES);
+
+ public static final long serialVersionUID = 1;
+
+ /**
+ * Set the name of this input message.
+ *
+ * @param name the desired name
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ public List getModelReferences() {
+ return modelReferences;
+ }
+
+ public void setModelReferences(List refs) {
+ modelReferences = refs;
+ }
+ public ModelReference getModelReference(){
+ if(modelReferences == null)
+ return null;
+ return modelReferences.get(0);
+ }
+
+ /**
+ * Set the modelReference.
+ *
+ * @param modelReference The desired modelReference.
+ */
+ public void addModelReference(ModelReference modelReference){
+ if(modelReferences == null)
+ modelReferences = new ArrayList();
+ modelReferences.add(0, modelReference);
+ }
+ /**
+ * Get the name of this input message.
+ *
+ * @return the input message name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setInputXSDList(List inputXSDList){
+ this.inputXSDList=inputXSDList;
+ }
+ public List getInputXSDList(){
+
+ return this.inputXSDList;
+ }
+
+
+ public void setParamList(List paramList){
+ this.paramList=paramList;
+ }
+ public List getParamList(){
+
+ return this.paramList;
+ }
+
+ /**
+ * Set the documentation element for this document. This dependency
+ * on org.w3c.dom.Element should eventually be removed when a more
+ * appropriate way of representing this information is employed.
+ *
+ * @param docEl the documentation element
+ */
+ public void setDocumentationElement(Element docEl)
+ {
+ this.docEl = docEl;
+ }
+
+ /**
+ * Get the documentation element. This dependency on org.w3c.dom.Element
+ * should eventually be removed when a more appropriate way of
+ * representing this information is employed.
+ *
+ * @return the documentation element
+ */
+ public Element getDocumentationElement()
+ {
+ return docEl;
+ }
+
+ /**
+ * Set an extension attribute on this element. Pass in a null value to remove
+ * an extension attribute.
+ *
+ * @param name the extension attribute name
+ * @param value the extension attribute value. Can be a String, a QName, a
+ * List of Strings, or a List of QNames.
+ *
+ * @see #getExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public void setExtensionAttribute(QName name, Object value)
+ {
+ if (value != null)
+ {
+ extensionAttributes.put(name, value);
+ }
+ else
+ {
+ extensionAttributes.remove(name);
+ }
+ }
+
+ /**
+ * Retrieve an extension attribute from this element. If the extension
+ * attribute is not defined, null is returned.
+ *
+ * @param name the extension attribute name
+ *
+ * @return the value of the extension attribute, or null if
+ * it is not defined. Can be a String, a QName, a List of Strings, or a List
+ * of QNames.
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public Object getExtensionAttribute(QName name)
+ {
+ return extensionAttributes.get(name);
+ }
+
+ /**
+ * Get the map containing all the extension attributes defined
+ * on this element. The keys are the qnames of the attributes.
+ *
+ * @return a map containing all the extension attributes defined
+ * on this element
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttribute
+ */
+ public Map getExtensionAttributes()
+ {
+ return extensionAttributes;
+ }
+
+ /**
+ * Get the list of local attribute names defined for this element in
+ * the WSDL specification.
+ *
+ * @return a List of Strings, one for each local attribute name
+ */
+ public List getNativeAttributeNames()
+ {
+ return nativeAttributeNames;
+ }
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("Input: name=" + name);
+
+ Iterator keys = extensionAttributes.keySet().iterator();
+
+ while (keys.hasNext())
+ {
+ QName name = (QName)keys.next();
+
+ strBuf.append("\nextension attribute: " + name + "=" +
+ extensionAttributes.get(name));
+ }
+
+ return strBuf.toString();
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ResourceImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ResourceImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ResourceImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ResourceImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,364 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.util.*;
+
+import javax.wadls.*;
+import javax.wadls.ModelReference;
+import javax.xml.namespace.*;
+import org.w3c.dom.*;
+
+/**
+ * This class represents a port type. It contains information about
+ * operations associated with this port type.
+ *
+ * @author Paul Fremantle
+ * @author Nirmal Mukhi
+ * @author Matthew J. Duftler
+ * @author Zixin Wu
+ */
+public class ResourceImpl implements Resource
+{
+ protected QName name = null;
+ protected List modelReferences = null;
+ protected List methods = new Vector();
+ protected List categories = new Vector();
+ protected Element docEl = null;
+ protected Map extensionAttributes = new HashMap();
+ protected List nativeAttributeNames =
+ Arrays.asList(Constants.PORT_TYPE_ATTR_NAMES);
+ protected boolean isUndefined = true;
+
+ public static final long serialVersionUID = 1;
+
+
+ /**
+ * Get the category specifications in this portType.
+ * @return All the categories in this portType.
+ */
+ public List getCategories()
+ {
+ return this.categories;
+ }
+
+ /**
+ * Set the name of this port type.
+ *
+ * @param name the desired name
+ */
+ public void setQName(QName name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the name of this port type.
+ *
+ * @return the port type name
+ */
+ public QName getQName()
+ {
+ return name;
+ }
+
+ /**
+ * Add an operation to this port type.
+ *
+ * @param operation the operation to be added
+ */
+ public void addMethod(Method operation)
+ {
+ methods.add(operation);
+ }
+
+ /**
+ * Get the specified operation. Note that operation names can
+ * be overloaded within a PortType. In case of overloading, the
+ * names of the input and output messages can be used to further
+ * refine the search.
+ *
+ * @param name the name of the desired operation.
+ * @param inputName the name of the input message; if this is null
+ * it will be ignored.
+ * @param outputName the name of the output message; if this is null
+ * it will be ignored.
+ * @return the corresponding operation, or null if there wasn't
+ * any matching operation
+ */
+ public Method getMethod(String name,
+ String inputName,
+ String outputName)
+ {
+ boolean found = false;
+ Method ret = null;
+ Iterator opIterator = methods.iterator();
+
+ while (opIterator.hasNext())
+ {
+ Method op = (Method)opIterator.next();
+ String opName = op.getName();
+
+ if (name != null && opName != null)
+ {
+ if (!name.equals(opName))
+ {
+ op = null;
+ }
+ }
+ else if (name != null || opName != null)
+ {
+ op = null;
+ }
+
+ if (op != null && inputName != null)
+ {
+
+ String defaultInputName = opName;
+ defaultInputName = opName + "Request";
+ boolean specifiedDefault = inputName.equals(defaultInputName);
+ Request input = op.getRequest();
+
+ if (input != null)
+ {
+ String opInputName = input.getName();
+
+ if (opInputName == null)
+ {
+ if (!specifiedDefault)
+ {
+ op = null;
+ }
+ }
+ else if (!opInputName.equals(inputName))
+ {
+ op = null;
+ }
+ }
+ else
+ {
+ op = null;
+ }
+ }
+
+ if (op != null && outputName != null)
+ {
+ String defaultOutputName = opName;
+ defaultOutputName = opName + "Response";
+ boolean specifiedDefault = outputName.equals(defaultOutputName);
+ Response output = op.getResponse();
+
+ if (output != null)
+ {
+ String opOutputName = output.getName();
+
+ if (opOutputName == null)
+ {
+ if (!specifiedDefault)
+ {
+ op = null;
+ }
+ }
+ else if (!opOutputName.equals(outputName))
+ {
+ op = null;
+ }
+ }
+ else
+ {
+ op = null;
+ }
+ }
+
+ if (op != null)
+ {
+ if (found)
+ {
+ throw new IllegalArgumentException("Duplicate operation with " +
+ "name=" + name +
+ (inputName != null
+ ? ", inputName=" + inputName
+ : "") +
+ (outputName != null
+ ? ", outputName=" + outputName
+ : "") +
+ ", found in portType '" +
+ getQName() + "'.");
+ }
+ else
+ {
+ found = true;
+ ret = op;
+ }
+ }
+ }
+
+ return ret;
+ }
+ public ModelReference getModelReference(){
+ if(modelReferences == null)
+ return null;
+ return modelReferences.get(0);
+ }
+
+ /**
+ * Set the modelReference.
+ *
+ * @param modelReference The desired modelReference.
+ */
+ public void addModelReference(ModelReference modelReference){
+ if(modelReferences == null)
+ modelReferences = new ArrayList();
+ modelReferences.add(0, modelReference);
+ }
+ public List getModelReferences() {
+ return modelReferences;
+ }
+
+ public void setModelReferences(List refs) {
+ modelReferences = refs;
+ }
+ /**
+ * Get all the operations defined here.
+ */
+ public List getMethods()
+ {
+ return methods;
+ }
+
+ /**
+ * Set the documentation element for this document. This dependency
+ * on org.w3c.dom.Element should eventually be removed when a more
+ * appropriate way of representing this information is employed.
+ *
+ * @param docEl the documentation element
+ */
+ public void setDocumentationElement(Element docEl)
+ {
+ this.docEl = docEl;
+ }
+
+ /**
+ * Get the documentation element. This dependency on org.w3c.dom.Element
+ * should eventually be removed when a more appropriate way of
+ * representing this information is employed.
+ *
+ * @return the documentation element
+ */
+ public Element getDocumentationElement()
+ {
+ return docEl;
+ }
+
+ public void setUndefined(boolean isUndefined)
+ {
+ this.isUndefined = isUndefined;
+ }
+
+ public boolean isUndefined()
+ {
+ return isUndefined;
+ }
+
+ /**
+ * Set an extension attribute on this element. Pass in a null value to remove
+ * an extension attribute.
+ *
+ * @param name the extension attribute name
+ * @param value the extension attribute value. Can be a String, a QName, a
+ * List of Strings, or a List of QNames.
+ *
+ * @see #getExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public void setExtensionAttribute(QName name, Object value)
+ {
+ if (value != null)
+ {
+ extensionAttributes.put(name, value);
+ }
+ else
+ {
+ extensionAttributes.remove(name);
+ }
+ }
+
+ /**
+ * Retrieve an extension attribute from this element. If the extension
+ * attribute is not defined, null is returned.
+ *
+ * @param name the extension attribute name
+ *
+ * @return the value of the extension attribute, or null if
+ * it is not defined. Can be a String, a QName, a List of Strings, or a List
+ * of QNames.
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public Object getExtensionAttribute(QName name)
+ {
+ return extensionAttributes.get(name);
+ }
+
+ /**
+ * Get the map containing all the extension attributes defined
+ * on this element. The keys are the qnames of the attributes.
+ *
+ * @return a map containing all the extension attributes defined
+ * on this element
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttribute
+ */
+ public Map getExtensionAttributes()
+ {
+ return extensionAttributes;
+ }
+
+ /**
+ * Get the list of local attribute names defined for this element in
+ * the WSDL specification.
+ *
+ * @return a List of Strings, one for each local attribute name
+ */
+ public List getNativeAttributeNames()
+ {
+ return nativeAttributeNames;
+ }
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("PortType: name=" + name);
+
+ if (methods != null)
+ {
+ Iterator opIterator = methods.iterator();
+
+ while (opIterator.hasNext())
+ {
+ strBuf.append("\n" + opIterator.next());
+ }
+ }
+
+ Iterator keys = extensionAttributes.keySet().iterator();
+
+ while (keys.hasNext())
+ {
+ QName name = (QName)keys.next();
+
+ strBuf.append("\nextension attribute: " + name + "=" +
+ extensionAttributes.get(name));
+ }
+
+ return strBuf.toString();
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ResponseImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ResponseImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ResponseImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/ResponseImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,205 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.util.*;
+
+import javax.wadls.*;
+import javax.xml.namespace.*;
+import org.w3c.dom.*;
+
+/**
+ * This class represents an output message, and contains the name
+ * of the output and the message itself.
+ *
+ * @author Matthew J. Duftler
+ */
+public class ResponseImpl implements Response
+{
+ protected String name = null;
+ List inputXSDList = new Vector();
+ List paramList = new Vector();
+ protected List modelReferences = null;
+ protected Element docEl = null;
+ protected Map extensionAttributes = new HashMap();
+ protected List nativeAttributeNames =
+ Arrays.asList(Constants.OUTPUT_ATTR_NAMES);
+
+ public static final long serialVersionUID = 1;
+
+ /**
+ * Set the name of this output message.
+ *
+ * @param name the desired name
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void setInputXSDList(List inputXSDList){
+ this.inputXSDList=inputXSDList;
+ }
+ public List getInputXSDList(){
+
+ return this.inputXSDList;
+ }
+
+
+ public void setParamList(List paramList){
+ this.paramList=paramList;
+ }
+ public List getParamList(){
+
+ return this.paramList;
+ }
+ /**
+ * Get the name of this output message.
+ *
+ * @return the output message name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Set the documentation element for this document. This dependency
+ * on org.w3c.dom.Element should eventually be removed when a more
+ * appropriate way of representing this information is employed.
+ *
+ * @param docEl the documentation element
+ */
+ public void setDocumentationElement(Element docEl)
+ {
+ this.docEl = docEl;
+ }
+ public ModelReference getModelReference(){
+ if(modelReferences == null)
+ return null;
+ return modelReferences.get(0);
+ }
+
+ /**
+ * Set the modelReference.
+ *
+ * @param modelReference The desired modelReference.
+ */
+ public void addModelReference(ModelReference modelReference){
+ if(modelReferences == null)
+ modelReferences = new ArrayList();
+ modelReferences.add(0, modelReference);
+ }
+ public List getModelReferences() {
+ return modelReferences;
+ }
+
+ public void setModelReferences(List refs) {
+ modelReferences = refs;
+ }
+ /**
+ * Get the documentation element. This dependency on org.w3c.dom.Element
+ * should eventually be removed when a more appropriate way of
+ * representing this information is employed.
+ *
+ * @return the documentation element
+ */
+ public Element getDocumentationElement()
+ {
+ return docEl;
+ }
+
+ /**
+ * Set an extension attribute on this element. Pass in a null value to remove
+ * an extension attribute.
+ *
+ * @param name the extension attribute name
+ * @param value the extension attribute value. Can be a String, a QName, a
+ * List of Strings, or a List of QNames.
+ *
+ * @see #getExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public void setExtensionAttribute(QName name, Object value)
+ {
+ if (value != null)
+ {
+ extensionAttributes.put(name, value);
+ }
+ else
+ {
+ extensionAttributes.remove(name);
+ }
+ }
+
+ /**
+ * Retrieve an extension attribute from this element. If the extension
+ * attribute is not defined, null is returned.
+ *
+ * @param name the extension attribute name
+ *
+ * @return the value of the extension attribute, or null if
+ * it is not defined. Can be a String, a QName, a List of Strings, or a List
+ * of QNames.
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttributes
+ * @see ExtensionRegistry#registerExtensionAttributeType
+ * @see ExtensionRegistry#queryExtensionAttributeType
+ */
+ public Object getExtensionAttribute(QName name)
+ {
+ return extensionAttributes.get(name);
+ }
+
+ /**
+ * Get the map containing all the extension attributes defined
+ * on this element. The keys are the qnames of the attributes.
+ *
+ * @return a map containing all the extension attributes defined
+ * on this element
+ *
+ * @see #setExtensionAttribute
+ * @see #getExtensionAttribute
+ */
+ public Map getExtensionAttributes()
+ {
+ return extensionAttributes;
+ }
+
+ /**
+ * Get the list of local attribute names defined for this element in
+ * the WSDL specification.
+ *
+ * @return a List of Strings, one for each local attribute name
+ */
+ public List getNativeAttributeNames()
+ {
+ return nativeAttributeNames;
+ }
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("Output: name=" + name);
+
+
+ Iterator keys = extensionAttributes.keySet().iterator();
+
+ while (keys.hasNext())
+ {
+ QName name = (QName)keys.next();
+
+ strBuf.append("\nextension attribute: " + name + "=" +
+ extensionAttributes.get(name));
+ }
+
+ return strBuf.toString();
+ }
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/SAWADLParserDriver.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/SAWADLParserDriver.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/SAWADLParserDriver.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/SAWADLParserDriver.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,153 @@
+package edu.uga.cs.lsdis.meteors.wadls;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.wadls.Application;
+import javax.wadls.Method;
+import javax.wadls.Param;
+import javax.wadls.Request;
+import javax.wadls.Resource;
+import javax.wadls.WADLSException;
+import javax.wadls.factory.WADLFactory;
+import javax.wadls.xml.WADLReader;
+import javax.xml.namespace.QName;
+
+
+public class SAWADLParserDriver {
+
+
+ private List completeMethodList = new ArrayList();
+ private List url = new ArrayList();
+ private List paramList = new ArrayList();
+ private List paramTypeList = new ArrayList();
+ private List paramModelRef = new ArrayList();
+ private Application application;
+
+
+ public List getCompleteMethodList() {
+ return completeMethodList;
+ }
+
+ public List getUrl() {
+ return url;
+ }
+
+ public List getParamList() {
+ return paramList;
+ }
+ public List getParamTypeList() {
+ return paramTypeList;
+ }
+
+
+
+
+ public static void main(String[] args) throws Exception {
+
+ //WADLParserDriver mpw = new WADLParserDriver();
+ //mpw.parse(new URL(args[0]));
+ SAWADLParserDriver spd = new SAWADLParserDriver();
+ //String fileURL = "/home/ganjoo/parser/SAWADLParser/Files/sample.wadl";
+ String fileURL = "/home/ganjoo/parser/SAWADLParser/euPathWADL/GenesByTextSearch.sawadl";
+ //String fileURL = "http://cs.uga.edu/~ganjoo/galaxy/GenesByTextSearch.sawadl";
+ spd.parse(fileURL);
+ }
+
+ public void parse(String fileURL) throws Exception {
+ int i=0;
+ Map resources = new HashMap();
+ List methods = new Vector();
+ List paramList = new Vector();
+
+ //URL fileURL = new URL("http://www.eupathdb.org/webservices/GeneQuestions/GenesByMolecularWeight.wadl");
+ WADLReader wadlReader;
+ try {
+ wadlReader = WADLFactory.newInstance().newWADLReader();
+ wadlReader.setFeature(Constants.FEATURE_PARSE_SAWADL,true);
+ //wadlReader.setExtensionRegistry(new PopulatedExtensionRegistry());
+ Application app = wadlReader.readWADL(fileURL);
+ this.application = app;
+
+
+ String temp = "";
+ String tempHref="";
+ int count =0;
+ Map resourceMap = app.getResources();
+ for(Map.Entry entry : resourceMap.entrySet() ){
+ count++;
+ Resource resource = (Resource) entry.getValue();
+ // System.out.println("Resource " + count + "is " + resource.getQName().getNamespaceURI());
+
+ methods = resource.getMethods();
+
+ for(int j =0;j
+ */
+public class SchemaConstants {
+
+ //Schema attribute names
+ public static final String ATTR_ID = "id";
+ public static final String ATTR_SCHEMA_LOCATION = "schemaLocation";
+ public static final String ATTR_HREF = "href";
+ public static final String ATTR_NAME = "name";
+ public static final String ATTR_TYPE = "type";
+ public static final String ATTR_REF = "ref";
+ public static final String ATTR_BASE = "base";
+ public static final String ATTR_MAXOCCURS = "maxOccurs";
+ public static final String ATTR_MINOCCURS = "minOccurs";
+
+ //Schema element names
+ public static final String ELEM_SCHEMA = "schema";
+ public static final String ELEM_INCLUDE = "include";
+ public static final String ELEM_REDEFINE = "redefine";
+ public static final String ELEM_ELEMENT = "element";
+ public static final String ELEM_SIMPLETYPE = "simpleType";
+ public static final String ELEM_COMPLEXTYPE = "complexType";
+ public static final String ELEM_ALL = "all";
+ public static final String ELEM_SEQUENCE = "sequence";
+ public static final String ELEM_CHOICE = "choice";
+ public static final String ELEM_COMPLEXCONTENT = "complexContent";
+ public static final String ELEM_RESTRICTION = "restriction";
+ public static final String ELEM_EXTENSION = "extension";
+ public static final String ELEM_GROUP = "group";
+
+ //Schema uri
+ public static final String NS_URI_XSD_1998 =
+ "http://www.w3.org/XML/1998/namespace";
+ public static final String NS_URI_WADL =
+ "http://wadl.dev.java.net/2009/02";
+ public static final String NS_URI_XSD_1999 =
+ "http://www.w3.org/1999/XMLSchema";
+ public static final String NS_URI_XSD_2000 =
+ "http://www.w3.org/2000/10/XMLSchema";
+ public static final String NS_URI_XSD_2001 =
+ "http://www.w3.org/2001/XMLSchema";
+ public static final List XSD_STR_LIST = Arrays.asList(new String[]
+ {NS_URI_XSD_1998, NS_URI_XSD_1999, NS_URI_XSD_2000, NS_URI_XSD_2001});
+
+ //Schema qnames
+ public static final QName Q_ELEM_XSD_1999 =
+ new QName(NS_URI_XSD_1999, ELEM_SCHEMA);
+ public static final QName Q_ELEM_XSD_2000 =
+ new QName(NS_URI_XSD_2000, ELEM_SCHEMA);
+ public static final QName Q_ELEM_XSD_2001 =
+ new QName(NS_URI_XSD_2001, ELEM_SCHEMA);
+ public static final List XSD_QNAME_LIST = Arrays.asList(new QName[]
+ {Q_ELEM_XSD_1999, Q_ELEM_XSD_2000, Q_ELEM_XSD_2001});
+
+ //Schema import qnames
+ public static final QName Q_ELEM_IMPORT_XSD_1999 = new QName(
+ NS_URI_XSD_1999, Constants.ELEM_IMPORT);
+ public static final QName Q_ELEM_IMPORT_XSD_2000 = new QName(
+ NS_URI_XSD_2000, Constants.ELEM_IMPORT);
+ public static final QName Q_ELEM_IMPORT_XSD_2001 = new QName(
+ NS_URI_XSD_2001, Constants.ELEM_IMPORT);
+ public static final List XSD_IMPORT_QNAME_LIST = Arrays.asList(new QName[]
+ { Q_ELEM_IMPORT_XSD_1999, Q_ELEM_IMPORT_XSD_2000, Q_ELEM_IMPORT_XSD_2001 });
+
+
+ //Schema include qnames
+ public static final QName Q_ELEM_INCLUDE_XSD_1999 = new QName(
+ NS_URI_XSD_1999, ELEM_INCLUDE);
+ public static final QName Q_ELEM_INCLUDE_XSD_2000 = new QName(
+ NS_URI_XSD_2000, ELEM_INCLUDE);
+ public static final QName Q_ELEM_INCLUDE_XSD_2001 = new QName(
+ NS_URI_XSD_2001, ELEM_INCLUDE);
+ public static final QName Q_ELEM_INCLUDE_WADL = new QName(
+ NS_URI_WADL, ELEM_INCLUDE);
+
+ public static final List XSD_INCLUDE_QNAME_LIST = Arrays.asList(new QName[]
+ { Q_ELEM_INCLUDE_XSD_1999, Q_ELEM_INCLUDE_XSD_2000, Q_ELEM_INCLUDE_XSD_2001,Q_ELEM_INCLUDE_WADL });
+
+ //Schema redefine qnames
+ public static final QName Q_ELEM_REDEFINE_XSD_1999 = new QName(
+ NS_URI_XSD_1999, ELEM_REDEFINE);
+ public static final QName Q_ELEM_REDEFINE_XSD_2000 = new QName(
+ NS_URI_XSD_2000, ELEM_REDEFINE);
+ public static final QName Q_ELEM_REDEFINE_XSD_2001 = new QName(
+ NS_URI_XSD_2001, ELEM_REDEFINE);
+ public static final List XSD_REDEFINE_QNAME_LIST = Arrays.asList(new QName[]
+ { Q_ELEM_REDEFINE_XSD_1999, Q_ELEM_REDEFINE_XSD_2000, Q_ELEM_REDEFINE_XSD_2001 });
+
+
+}
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaDeserializer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaDeserializer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaDeserializer.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaDeserializer.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,196 @@
+/*
+ * (c) Copyright IBM Corp 2004, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls.extensions.schema;
+
+import java.io.Serializable;
+import java.util.Hashtable;
+import java.util.Map;
+
+import javax.wadls.Application;
+import javax.wadls.WADLSException;
+import javax.wadls.extensions.ExtensionDeserializer;
+import javax.wadls.extensions.schema.Schema;
+import javax.wadls.extensions.schema.SchemaImport;
+import javax.wadls.extensions.schema.SchemaReference;
+import javax.wadls.xml.WADLLocator;
+import javax.wadls.WADLSException;
+import javax.wadls.extensions.ExtensibilityElement;
+import javax.wadls.extensions.ExtensionRegistry;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+
+import edu.uga.cs.lsdis.meteors.wadls.extensions.schema.SchemaConstants;
+import edu.uga.cs.lsdis.meteors.wadls.Constants;
+import edu.uga.cs.lsdis.meteors.wadls.util.xml.DOMUtils;
+import edu.uga.cs.lsdis.meteors.wadls.util.xml.QNameUtils;
+
+/**
+ * This class is used to deserialize <schema>
elements into
+ * Schema instances.
+ *
+ * @see SchemaImpl
+ * @see SchemaSerializer
+ *
+ * @author Jeremy Hughes
+ */
+public class SchemaDeserializer implements Serializable
+{
+
+ // Need to set this since a Definition is serializable and it contains an
+ // extension registry which contains one of these
+ public static final long serialVersionUID = 1;
+
+ private final Map allReferencedSchemas = new Hashtable();
+
+ private static ThreadLocal wsdlLocator = new ThreadLocal();
+
+ /**
+ * Set the WSDLLocator to be used by the deserializer on this thread.
+ *
+ * @param loc The WSDLLocator to be used.
+ *
+ * @see WSDLLocator
+ */
+ public static void setLocator(WADLLocator loc)
+ {
+ wsdlLocator.set(loc);
+ }
+ public Schema unmarshall(QName elementType,
+ Element el,
+ Application def)
+throws WADLSException
+{
+
+Schema schema = new SchemaImpl();
+
+schema.setElementType(elementType);
+schema.setElement(el);
+schema.setDocumentBaseURI(def.getDocumentBaseURI());
+
+//TODO: check if the 'required' attribute needs to be set
+
+// Go through the schema Element looking for child schemas
+if(elementType.getLocalPart().equalsIgnoreCase("include")){
+
+ Element tempEl = el;
+
+ QName tempElType = QNameUtils.newQName(tempEl);
+
+ // Create the appropriate SchemaReference subclass to represent
+ // an , an or a
+
+ SchemaReference sr = null;
+ String locationURI = null;
+
+
+ if (SchemaConstants.XSD_INCLUDE_QNAME_LIST.contains(tempElType))
+ {
+
+ // Create a new include. Don't use the
+ // ExtensionRegistry.createExtension()
+ // method as a Schema include is not a WSDL import.
+ sr = schema.createInclude();
+
+ sr.setId(DOMUtils.getAttribute(tempEl, SchemaConstants.ATTR_ID));
+
+ locationURI = DOMUtils.getAttribute(tempEl, SchemaConstants.ATTR_HREF);
+
+ sr.setSchemaLocationURI(locationURI);
+
+ // Now the include is set up except for the pointer to the
+ // referenced LWS, add the include to the LightWeightSchema.
+ schema.addInclude(sr);
+ }
+
+}
+else{
+Element tempEl = DOMUtils.getFirstChildElement(el);
+
+
+for (; tempEl != null; tempEl = DOMUtils.getNextSiblingElement(tempEl))
+{
+
+QName tempElType = QNameUtils.newQName(tempEl);
+
+// Create the appropriate SchemaReference subclass to represent
+// an , an or a
+
+SchemaReference sr = null;
+String locationURI = null;
+
+if (SchemaConstants.XSD_IMPORT_QNAME_LIST.contains(tempElType))
+{
+
+
+// Create a new import. Don't use the
+// ExtensionRegistry.createExtension()
+// method as a Schema import is not a WSDL import.
+SchemaImport im = schema.createImport();
+
+
+im.setId(DOMUtils.getAttribute(tempEl, SchemaConstants.ATTR_ID));
+im.setNamespaceURI(DOMUtils.getAttribute(tempEl, Constants.ATTR_NAMESPACE));
+
+locationURI = DOMUtils.getAttribute(tempEl, SchemaConstants.ATTR_SCHEMA_LOCATION);
+im.setSchemaLocationURI(locationURI);
+
+// Now the import is set up except for the point to the
+// referenced LWS, add the import to the LightWeightSchema.
+schema.addImport(im);
+}
+else
+if (SchemaConstants.XSD_INCLUDE_QNAME_LIST.contains(tempElType))
+{
+
+// Create a new include. Don't use the
+// ExtensionRegistry.createExtension()
+// method as a Schema include is not a WSDL import.
+sr = schema.createInclude();
+
+sr.setId(DOMUtils.getAttribute(tempEl, SchemaConstants.ATTR_ID));
+
+locationURI = DOMUtils.getAttribute(tempEl, SchemaConstants.ATTR_SCHEMA_LOCATION);
+
+sr.setSchemaLocationURI(locationURI);
+
+// Now the include is set up except for the pointer to the
+// referenced LWS, add the include to the LightWeightSchema.
+schema.addInclude(sr);
+}
+else
+if (SchemaConstants.XSD_REDEFINE_QNAME_LIST.contains(tempElType))
+{
+// Create a new redefine. Don't use the
+// ExtensionRegistry.createExtension() method as a Schema redefine
+// is not a WSDL import.
+sr = schema.createRedefine();
+
+sr.setId(DOMUtils.getAttribute(tempEl, SchemaConstants.ATTR_ID));
+
+locationURI = DOMUtils.getAttribute(tempEl, SchemaConstants.ATTR_SCHEMA_LOCATION);
+
+sr.setSchemaLocationURI(locationURI);
+
+// Now the redefine is set up except for the pointer to the
+// referenced LWS, add the redefine to the LightWeightSchema.
+schema.addRedefine(sr);
+}
+else
+{
+// The element isn't one we're interested in so look at the next
+// one
+continue;
+}
+
+} //end for
+}
+
+return schema;
+}
+
+
+}
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,235 @@
+/*
+ * (c) Copyright IBM Corp 2004, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls.extensions.schema;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.wadls.extensions.schema.Schema;
+import javax.wadls.extensions.schema.SchemaImport;
+import javax.wadls.extensions.schema.SchemaReference;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+/**
+ * This class is used to wrap schema elements. It holds the DOM Element to the
+ * <schema>
element.
+ *
+ * @see SchemaSerializer
+ * @see SchemaDeserializer
+ *
+ * @author Jeremy Hughes
+ */
+public class SchemaImpl implements Schema
+{
+ protected QName elementType = null;
+ // Uses the wrapper type so we can tell if it was set or not.
+ protected Boolean required = null;
+ protected Element element = null;
+
+ public static final long serialVersionUID = 1;
+
+ /*
+ * imports is a Map of Lists with key of the import's namespace URI. Each List
+ * contains the SchemaImport objects for that namespace. There can be more
+ * than one SchemaImport in a List - one for each schemaLocation attribute
+ * setting.
+ */
+ private Map imports = new HashMap();
+
+ /*
+ * includes is a List of Include objects for the targetNamespace of the
+ * enclosing schema. There is one Include in the List for each
+ * element in the XML Schema.
+ */
+ private List includes = new Vector();
+
+ /*
+ * redefines is a list of Redefine obejcts for the targetNamespace of the
+ * enclosing schema. There is one Redefine in the List for each
+ * element in the XML Schema.
+ */
+ private List redefines = new Vector();
+
+ private String documentBaseURI = null;
+
+ /**
+ * Get a map of lists containing all the imports defined here. The map's keys
+ * are Strings representing the namespace URIs, and the map's values are
+ * lists. There is one list for each namespace URI for which imports have been
+ * defined.
+ *
+ * @return a Map of Lists of Import instances keyed off the import's namespace
+ */
+ public Map getImports()
+ {
+ return this.imports;
+ }
+
+ /**
+ * Create a new schema import.
+ *
+ * @return the newly created schema import
+ */
+ public SchemaImport createImport()
+ {
+ return new SchemaImportImpl();
+ }
+
+ /**
+ * Add an import to this LightWeightSchema
+ *
+ * @param importSchema the import to be added
+ */
+ public void addImport(SchemaImport importSchema)
+ {
+ String namespaceURI = importSchema.getNamespaceURI();
+ List importList = (List) this.imports.get(namespaceURI);
+
+ if (importList == null)
+ {
+ importList = new Vector();
+
+ this.imports.put(namespaceURI, importList);
+ }
+
+ importList.add(importSchema);
+ }
+
+ /**
+ * Get list of includes defined here.
+ *
+ * @return a List of SchemaReference instances representing the schema
+ * includes.
+ */
+
+ public List getIncludes()
+ {
+ return this.includes;
+ }
+
+ public SchemaReference createInclude()
+ {
+ return new SchemaReferenceImpl();
+ }
+
+ public void addInclude(SchemaReference includeSchema)
+ {
+ this.includes.add(includeSchema);
+ }
+
+ public List getRedefines()
+ {
+ return this.redefines;
+ }
+
+ public SchemaReference createRedefine()
+ {
+ return new SchemaReferenceImpl();
+ }
+
+ public void addRedefine(SchemaReference redefineSchema)
+ {
+ this.redefines.add(redefineSchema);
+ }
+
+ public String toString()
+ {
+ StringBuffer strBuf = new StringBuffer();
+
+ strBuf.append("SchemaExtensibilityElement (" + this.elementType + "):");
+ strBuf.append("\nrequired=" + this.required);
+
+ if (this.element != null)
+ {
+ strBuf.append("\nelement=" + this.element);
+ }
+
+ return strBuf.toString();
+ }
+
+ /**
+ * Set the type of this extensibility element.
+ *
+ * @param elementType the type
+ */
+ public void setElementType(QName elementType)
+ {
+ this.elementType = elementType;
+ }
+
+ /**
+ * Get the type of this extensibility element.
+ *
+ * @return the extensibility element's type
+ */
+ public QName getElementType()
+ {
+ return elementType;
+ }
+
+ /**
+ * Set whether or not the semantics of this extension
+ * are required. Relates to the wsdl:required attribute.
+ */
+ public void setRequired(Boolean required)
+ {
+ this.required = required;
+ }
+
+ /**
+ * Get whether or not the semantics of this extension
+ * are required. Relates to the wsdl:required attribute.
+ */
+ public Boolean getRequired()
+ {
+ return required;
+ }
+
+ /**
+ * Set the DOM Element that represents this schema element.
+ *
+ * @param element the DOM element representing this schema
+ */
+ public void setElement(Element element)
+ {
+ this.element = element;
+ }
+
+ /**
+ * Get the DOM Element that represents this schema element.
+ *
+ * @return the DOM element representing this schema
+ */
+ public Element getElement()
+ {
+ return element;
+ }
+
+ /**
+ * Set the document base URI of this schema definition. Can be used to
+ * represent the origin of the schema, and can be exploited when resolving
+ * relative URIs (e.g. in <import>s).
+ *
+ * @param documentBaseURI the document base URI of this schema
+ */
+ public void setDocumentBaseURI(String documentBaseURI)
+ {
+ this.documentBaseURI = documentBaseURI;
+ }
+
+ /**
+ * Get the document base URI of this schema
+ *
+ * @return the document base URI
+ */
+ public String getDocumentBaseURI()
+ {
+ return this.documentBaseURI;
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImportImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImportImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImportImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaImportImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,33 @@
+/*
+ * (c) Copyright IBM Corp 2004, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls.extensions.schema;
+
+import javax.wadls.extensions.schema.SchemaImport;
+
+/**
+ * @author Jeremy Hughes
+ */
+public class SchemaImportImpl extends SchemaReferenceImpl implements SchemaImport
+{
+ public static final long serialVersionUID = 1;
+
+ private String namespace = null;
+
+ /**
+ * @return Returns the namespace.
+ */
+ public String getNamespaceURI()
+ {
+ return this.namespace;
+ }
+
+ /**
+ * @param namespace The namespace to set.
+ */
+ public void setNamespaceURI(String namespace)
+ {
+ this.namespace = namespace;
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaReferenceImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaReferenceImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaReferenceImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaReferenceImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,71 @@
+/*
+ * (c) Copyright IBM Corp 2004, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls.extensions.schema;
+
+import javax.wadls.extensions.schema.Schema;
+import javax.wadls.extensions.schema.SchemaReference;
+
+/**
+ * @author Jeremy Hughes
+ */
+public class SchemaReferenceImpl implements SchemaReference
+{
+
+ public static final long serialVersionUID = 1;
+
+ private String id = null;
+
+ private String schemaLocation = null;
+
+ private Schema referencedSchema = null;
+
+ /**
+ * @return Returns the id.
+ */
+ public String getId()
+ {
+ return this.id;
+ }
+
+ /**
+ * @param id The id to set.
+ */
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ /**
+ * @return Returns the schemaLocation.
+ */
+ public String getSchemaLocationURI()
+ {
+ return this.schemaLocation;
+ }
+
+ /**
+ * @param schemaLocation The schemaLocation to set.
+ */
+ public void setSchemaLocationURI(String schemaLocation)
+ {
+ this.schemaLocation = schemaLocation;
+ }
+
+ /**
+ * @return Returns the importedSchema.
+ */
+ public Schema getReferencedSchema()
+ {
+ return this.referencedSchema;
+ }
+
+ /**
+ * @param referencedSchema The importedSchema to set.
+ */
+ public void setReferencedSchema(Schema referencedSchema)
+ {
+ this.referencedSchema = referencedSchema;
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaSerializer.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaSerializer.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaSerializer.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/extensions/schema/SchemaSerializer.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,50 @@
+/*
+ * (c) Copyright IBM Corp 2004, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls.extensions.schema;
+
+import java.io.PrintWriter;
+import java.io.Serializable;
+
+import javax.wadls.Application;
+import javax.wadls.WADLSException;
+import javax.wadls.extensions.ExtensionDeserializer;
+import javax.wadls.extensions.schema.Schema;
+import javax.wadls.extensions.ExtensionSerializer;
+import javax.wadls.WADLSException;
+import javax.wadls.extensions.ExtensibilityElement;
+import javax.wadls.extensions.ExtensionRegistry;
+import javax.xml.namespace.QName;
+
+import edu.uga.cs.lsdis.meteors.wadls.util.xml.DOM2Writer;
+
+/**
+ * This class is used to serialize Schema instances
+ * into the PrintWriter.
+ *
+ * @see SchemaImpl
+ * @see SchemaDeserializer
+ *
+ * @author Jeremy Hughes
+ */
+public class SchemaSerializer implements ExtensionSerializer,Serializable
+{
+ public static final long serialVersionUID = 1;
+ public void marshall(Class parentType,
+ QName elementType,
+ ExtensibilityElement extension,
+ PrintWriter pw,
+ Application def,
+ ExtensionRegistry extReg)
+ throws WADLSException
+{
+Schema schema = (Schema)extension;
+
+pw.print(" ");
+
+DOM2Writer.serializeAsXML(schema.getElement(), pw);
+
+pw.println();
+}
+}
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/factory/WADLFactoryImpl.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/factory/WADLFactoryImpl.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/factory/WADLFactoryImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/factory/WADLFactoryImpl.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,52 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls.factory;
+
+import javax.wadls.*;
+import javax.wadls.extensions.*;
+import javax.wadls.factory.*;
+import javax.wadls.xml.*;
+
+import edu.uga.cs.lsdis.meteors.wadls.*;
+import edu.uga.cs.lsdis.meteors.wadls.xml.*;
+
+/**
+ * This class is a concrete implementation of the abstract class
+ * WSDLFactory. Some ideas used here have been shamelessly
+ * copied from the wonderful JAXP and Xerces work.
+ *
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ */
+public class WADLFactoryImpl extends WADLFactory
+{
+ /**
+ * Create a new instance of a Definition, with an instance
+ * of a PopulatedExtensionRegistry as its ExtensionRegistry.
+ *
+ * @see edu.uga.cs.lsdis.meteors.wadls.extensions.PopulatedExtensionRegistry
+ */
+ public Application newApplication()
+ {
+ Application app = new ApplicationImpl();
+ return app;
+ }
+
+ /**
+ * Create a new instance of a WSDLReader.
+ */
+ public WADLReader newWADLReader()
+ {
+ return new WADLReaderImpl();
+ }
+
+ /**
+ * Create a new instance of a WSDLWriter.
+ */
+ public WADLWriter newWADLWriter()
+ {
+ return new WADLWriterImpl();
+ }
+
+}
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/IOUtils.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/IOUtils.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/IOUtils.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/IOUtils.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,36 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls.util;
+
+import java.io.*;
+
+/**
+ * This file is a collection of input/output utilities.
+ *
+ * @author Sanjiva Weerawarana
+ * @author Matthew J. Duftler
+ */
+public class IOUtils {
+ // debug flag - generates debug stuff if true
+ static boolean debug = false;
+
+ //////////////////////////////////////////////////////////////////////////
+
+ public static String getStringFromReader (Reader reader) throws IOException {
+ BufferedReader bufIn = new BufferedReader(reader);
+ StringWriter swOut = new StringWriter();
+ PrintWriter pwOut = new PrintWriter(swOut);
+ String tempLine;
+
+ while ((tempLine = bufIn.readLine()) != null) {
+ pwOut.println(tempLine);
+ }
+
+ pwOut.flush();
+
+ return swOut.toString();
+ }
+}
+
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/ObjectRegistry.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/ObjectRegistry.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/ObjectRegistry.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/ObjectRegistry.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,55 @@
+/*
+ * (c) Copyright IBM Corp 2001, 2005
+ */
+
+package edu.uga.cs.lsdis.meteors.wadls.util;
+
+import java.util.*;
+
+/**
+ * The ObjectRegistry is used to do name-to-object reference lookups.
+ * If an ObjectRegistry is passed as a constructor argument, then this
+ * ObjectRegistry will be a cascading registry: when a lookup is
+ * invoked, it will first look in its own table for a name, and if it's not
+ * there, it will cascade to the parent ObjectRegistry .
+ * All registration is always local. [??]
+ *
+ * @author Sanjiva Weerawarana
+ * @author Matthew J. Duftler
+ */
+public class ObjectRegistry {
+ Hashtable reg = new Hashtable ();
+ ObjectRegistry parent = null;
+
+ public ObjectRegistry () {
+ }
+
+ public ObjectRegistry (ObjectRegistry parent) {
+ this.parent = parent;
+ }
+
+ // register an object
+ public void register (String name, Object obj) {
+ reg.put (name, obj);
+ }
+
+ // unregister an object (silent if unknown name)
+ public void unregister (String name) {
+ reg.remove (name);
+ }
+
+ // lookup an object: cascade up if needed
+ public Object lookup (String name) throws IllegalArgumentException {
+ Object obj = reg.get (name);
+
+ if (obj == null && parent != null) {
+ obj = parent.lookup (name);
+ }
+
+ if (obj == null) {
+ throw new IllegalArgumentException ("object '" + name + "' not in registry");
+ }
+
+ return obj;
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/SchemaUtils.class
Binary file WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/SchemaUtils.class has changed
diff -r 000000000000 -r d5cd409b8a18 WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/SchemaUtils.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WebServiceToolWorkflow/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/SchemaUtils.java Tue Jun 07 18:00:50 2011 -0400
@@ -0,0 +1,543 @@
+/*
+ * Created on Apr 10, 2005
+ *
+ */
+package edu.uga.cs.lsdis.meteors.wadls.util;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.wadls.Grammars;
+import javax.wadls.Params;
+import javax.wadls.WADLSException;
+import javax.wadls.extensions.schema.Schema;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import edu.uga.cs.lsdis.meteors.wadls.Constants;
+import edu.uga.cs.lsdis.meteors.wadls.extensions.schema.SchemaConstants;
+import edu.uga.cs.lsdis.meteors.wadls.util.xml.QNameUtils;
+import edu.uga.cs.lsdis.meteors.wadls.util.xml.XPathUtils;
+
+/**
+ * This file is a collection of utilities which find the location of a XML/XSD Element by using the given path.
+ * @author Zixin Wu
+ *
+ */
+
+public class SchemaUtils {
+
+ /**
+ * Search an XML element in the schemas contained in the given Types.
+ * @param types Search in the schemas contained in this WSDLS Types.
+ * @param tagName XML Element name of the desired element.
+ * @param elementName The value of the attribute "name" of the desired element.
+ * @return An XML element whose XML Element name is "tagName" and whose attribute "name" is "elementName".
+ * @throws WADLSException
+ */
+ public static Element findXMLEleInSchemas(Grammars grammars, String tagName, QName elementName) throws WADLSException{
+ Map schemas = grammars.getSchemas();
+ Iterator it = schemas.values().iterator();
+ while(it.hasNext()){
+ Schema schema = (Schema)(it.next());
+ Element schemaEle = schema.getElement();
+ if (schemaEle.getAttribute(Constants.ATTR_TARGET_NAMESPACE).equals(elementName.getNamespaceURI())){
+ Element foundEle = findXMLEleByName(schemaEle, tagName, elementName);
+ if (foundEle != null)
+ return foundEle;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Search the element whose XML Element name is "tagName" and whose attribute "name" is "elementName",
+ * in the startElement, search in only one level depth.
+ * @param startElement Start searching from this XML Element.
+ * @param tagName XML Element name of the desired element.
+ * @param elementName The value of the attribute "name" of the desired element.
+ * @return An XML element whose XML Element name is "tagName" and whose attribute "name" is "elementName".
+ * @throws WADLSException
+ */
+ public static Element findXMLEleByName(Element startElement, String tagName, QName elementName) throws WADLSException{
+ NodeList nodeList = startElement.getChildNodes();
+ //find the element with the required name as an attribute
+ int listLength = nodeList.getLength();
+ for(int i=0;i
+ //get the QName of typeAttr
+ QName typeQName = QNameUtils.getQName(typeAttr, startElement);
+ if (SchemaConstants.XSD_STR_LIST.contains(typeQName.getNamespaceURI())){
+ //primitive data type
+ WADLSException wsdlsExc = new WADLSException(WADLSException.PATH_ERROR,
+ "Primitive type cannot has path");
+ wsdlsExc.setLocation(XPathUtils.getXPathExprFromNode(startElement));
+ throw wsdlsExc;
+ }
+ else{
+ //find the complexType with the given type QName
+ Element complexTypeElement = findXMLEleInSchemas(grammars, SchemaConstants.ELEM_COMPLEXTYPE, typeQName);
+ if (complexTypeElement != null)
+ return findXSDEleOnComplexType(complexTypeElement, path, grammars);
+ else
+ //cannot find in complexType
+ throw new DOMException(DOMException.NOT_FOUND_ERR, "cannot find complexType by the given path");
+ }
+ }
+ else{
+ //No type, look for complexType in the subNodes
+ Element complexElement = findXMLEleByName(startElement, SchemaConstants.ELEM_COMPLEXTYPE, null);
+ if (complexElement != null)
+ return findXSDEleOnComplexType(complexElement, path, grammars);
+ else{
+ WADLSException wsdlsExc = new WADLSException(WADLSException.NOT_FOUND_ELE_BY_PATH,
+ "cannot find complexType matching the path");
+ wsdlsExc.setLocation(XPathUtils.getXPathExprFromNode(startElement));
+ throw wsdlsExc;
+ }
+ }
+ }
+ }
+
+ public static Element findXSDEleOnEle(Element startElement, String path, Params params) throws WADLSException{
+ /*String refAttr = startElement.getAttribute(SchemaConstants.ATTR_REF);
+ if (refAttr != ""){
+ //look for the referenced element
+ QName elementQName = QNameUtils.getQName(refAttr, startElement);
+ Element refenecedElement = findXMLEleInSchemas(params, SchemaConstants.ELEM_ELEMENT, elementQName);
+ if (refenecedElement != null)
+ return findXSDEleOnEle(refenecedElement, path, grammars);
+ else{
+ throw new DOMException(DOMException.NOT_FOUND_ERR, "Cannot find referenced element");
+ }
+ }
+ else{
+ if (path == "")
+ return startElement;
+
+ String typeAttr = startElement.getAttribute(SchemaConstants.ATTR_TYPE);
+ if (typeAttr != ""){ //<... type="...">
+ //get the QName of typeAttr
+ QName typeQName = QNameUtils.getQName(typeAttr, startElement);
+ if (SchemaConstants.XSD_STR_LIST.contains(typeQName.getNamespaceURI())){
+ //primitive data type
+ WADLSException wsdlsExc = new WADLSException(WADLSException.PATH_ERROR,
+ "Primitive type cannot has path");
+ wsdlsExc.setLocation(XPathUtils.getXPathExprFromNode(startElement));
+ throw wsdlsExc;
+ }
+ else{
+ //find the complexType with the given type QName
+ Element complexTypeElement = findXMLEleInSchemas(grammars, SchemaConstants.ELEM_COMPLEXTYPE, typeQName);
+ if (complexTypeElement != null)
+ return findXSDEleOnComplexType(complexTypeElement, path, grammars);
+ else
+ //cannot find in complexType
+ throw new DOMException(DOMException.NOT_FOUND_ERR, "cannot find complexType by the given path");
+ }
+ }
+ else{
+ //No type, look for complexType in the subNodes
+ Element complexElement = findXMLEleByName(startElement, SchemaConstants.ELEM_COMPLEXTYPE, null);
+ if (complexElement != null)
+ return findXSDEleOnComplexType(complexElement, path, grammars);
+ else{
+ WADLSException wsdlsExc = new WADLSException(WADLSException.NOT_FOUND_ELE_BY_PATH,
+ "cannot find complexType matching the path");
+ wsdlsExc.setLocation(XPathUtils.getXPathExprFromNode(startElement));
+ throw wsdlsExc;
+ }
+ }
+ }*/
+ return startElement;
+ }
+
+ /**
+ * Search an XSD Element from the XSD complexType.
+ * @param complexTypeElement Start searching from this XSD ComplexType
+ * @param path
+ * @param types WSDLS Types
+ * @return An XSD Element
+ * @throws WADLSException
+ */
+ public static Element findXSDEleOnComplexType(Element complexTypeElement, String path, Grammars grammars) throws WADLSException{
+ if (path == null || path == "")
+ return null;
+ //look for the matching element.
+ String splitedPath[] = splitPath(path);
+ String elementName = splitedPath[0];
+ path = splitedPath[1];
+ Element targetElement = findXSDEleInComplexType(complexTypeElement, elementName, grammars);
+ if (targetElement != null)
+ return findXSDEleOnEle(targetElement, path, grammars);
+ else{
+ WADLSException wsdlsExc = new WADLSException(WADLSException.NOT_FOUND_ELE_BY_PATH,
+ "Cannot find the element matching the path");
+ wsdlsExc.setLocation(XPathUtils.getXPathExprFromNode(complexTypeElement));
+ throw wsdlsExc;
+ }
+ }
+
+ public static Element findXSDEleOnComplexType(Element complexTypeElement, String path, Params params) throws WADLSException{
+ /*if (path == null || path == "")
+ return null;
+ //look for the matching element.
+ String splitedPath[] = splitPath(path);
+ String elementName = splitedPath[0];
+ path = splitedPath[1];
+ Element targetElement = findXSDEleInComplexType(complexTypeElement, elementName, grammars);
+ if (targetElement != null)
+ return findXSDEleOnEle(targetElement, path, grammars);
+ else{
+ WADLSException wsdlsExc = new WADLSException(WADLSException.NOT_FOUND_ELE_BY_PATH,
+ "Cannot find the element matching the path");
+ wsdlsExc.setLocation(XPathUtils.getXPathExprFromNode(complexTypeElement));
+ throw wsdlsExc;
+ }*/
+ return complexTypeElement;
+ }
+
+ /**
+ * Search an XSD Element recursively inside of the complexType.
+ * @param startElement
+ * @param elementName The desired attribute "name"
+ * @param types WSDL Types
+ * @return A XSD Element
+ * @throws WADLSException
+ */
+ public static Element findXSDEleInComplexType(Element startElement, String elementName, Grammars grammars) throws WADLSException{
+ NodeList subNodes = startElement.getChildNodes();
+ int length = subNodes.getLength();
+ for(int i=0;i
+ Element returnElement = findXSDEleInComplexType(currentElement, elementName, grammars);
+ if (returnElement != null)
+ return returnElement;
+ else{
+ String baseAttr = currentElement.getAttribute(SchemaConstants.ATTR_BASE);
+ QName baseQName = QNameUtils.getQName(baseAttr, currentElement);
+ Element baseElement = findXMLEleInSchemas(grammars, SchemaConstants.ELEM_COMPLEXTYPE, baseQName);
+ return findXSDEleInComplexType(baseElement, elementName, grammars);
+ }
+ }
+ else if (localPart.equals(SchemaConstants.ELEM_GROUP)){
+ //find .
+ String refAttr = currentElement.getAttribute(SchemaConstants.ATTR_REF);
+ if (refAttr != ""){
+ //look for the referenced
+ QName groupQName = QNameUtils.getQName(refAttr, currentElement);
+ Element groupElement = findXMLEleInSchemas(grammars, SchemaConstants.ELEM_GROUP, groupQName);
+ if (groupElement != null){
+ //try to find it in the referenced