Changeset 1243


Ignore:
Timestamp:
27/06/06 11:04:01 (13 years ago)
Author:
astephen
Message:

Latest version - close to alpha release.

Location:
TI04-geosplat/trunk
Files:
7 added
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • TI04-geosplat/trunk/cgi/splatui

    r1210 r1243  
    256256        else:        
    257257            # Get the options (and make selections if appropriate) 
    258             if optionCategories==None: 
     258            if optionCategories in ("undefined", None): 
    259259                (optionCategories, options, optionStrings, secureToken)=self._getLatestOptions()                     
    260260            # Analyse the request 
  • TI04-geosplat/trunk/gsc/scripts/exampleGSCLClient1.py

    r798 r1243  
    11#!/usr/bin/env python 
     2import sys, os, re 
    23 
    3 import readline 
     4#import readline 
    45from ZSI.client import Binding 
    5 from clientConfig import SOAP_SERVER_PORT 
    6 from common import * 
     6from pygsc.clientConfig import SOAP_SERVER_URL 
     7from pygsc.common import * 
     8 
     9urlPattern=re.compile(r"(\w+)://([\w.]+):(\d+)/(.*)$") 
     10(transport, soap_server_host, soap_server_port, cmd)=urlPattern.match(SOAP_SERVER_URL).groups() 
     11print transport, soap_server_host, soap_server_port 
     12 
     13from ZSI.version import Version as zsiv 
     14zsiv=float("%s.%s" % zsiv[:2]) 
     15print zsiv 
     16         
    717# start session 
    818print "Start session..." 
    9 server = Binding(url="", host="localhost", port=SOAP_SERVER_PORT) 
     19if zsiv<2.0: 
     20    server=Binding(url="", host=soap_server_host, port=soap_server_port) 
     21else: 
     22    server = Binding(url=SOAP_SERVER_URL) 
    1023 
    11 (sessionID, secureToken)=server.startSession("jane", "jane1") 
     24resp=server.startSession("jane", "jane1") 
     25if zsiv>=2.0: 
     26    resp=resp[0] 
     27 
     28(sessionID, secureToken)=resp 
    1229print (sessionID, secureToken) 
    1330 
     31def unwrap(resp): 
     32        if zsiv>=2.0: 
     33                resp=resp[0] 
     34        return resp 
     35 
    1436print "\nProvide file URIs..." 
    15 (optionCategories, options, \ 
    16                optionStrings, secureToken)=server.provideFileURIs(sessionID, secureToken, ["/tmp/tmp.nc"]) 
     37(optionCategories, options, optionStrings, secureToken)=unwrap(server.provideFileURIs(sessionID, secureToken, ["/data/var1.nc"])) 
    1738                
    1839print (optionCategories, options, optionStrings, secureToken) 
     
    2041 
    2142print "\nSelecting variables from files..."             
    22 output=server.selectOptions(sessionID, [["secureToken", secureToken], ["fileVariable_1.1", "var1"]]) 
     43output=server.selectOptions(sessionID, [["secureToken", secureToken], ["fileVariable_1.1", "pqn"]]) 
    2344output=deUnicodeObject(output) 
    2445print output 
  • TI04-geosplat/trunk/gss/bin/GSWSInterface.py

    r1210 r1243  
    214214    optionsObject=controller.options 
    215215    print controller.options 
    216  
     216    print "OOOOOOOOOOOOOOOH", optionsObject[0] 
    217217    rtopts=[optionsObject[0], optionsObject[1], optionsObject[2], [secureToken]] 
    218  
     218    print "AAAAAAAAAAAAAAAAAAAAAAAH", rtopts 
    219219    return rtopts 
    220220     
  • TI04-geosplat/trunk/pygsc/clientConfig.py

    r1210 r1243  
    119119# WEB_EXTRAS_URL_PATH: 
    120120# HTTP location of the web extras directory. 
    121 WEB_EXTRAS_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "dx_extras") 
     121WEB_EXTRAS_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "gs/extras") 
    122122 
    123123# WEB_EXTRAS_LOCAL_PATH: 
    124124# Local location of the web extras directory. 
    125 WEB_EXTRAS_LOCAL_PATH=os.path.join(STATIC_WEBSERVER_LOCAL_PATH, "dx_extras") 
     125WEB_EXTRAS_LOCAL_PATH=os.path.join(STATIC_WEBSERVER_LOCAL_PATH, "gs/extras") 
    126126 
    127127# CGI_SCRIPT_URL_PATH: 
     
    166166# Location of logos for the header section, this should be a 
    167167# full or relative URL and NOT a directory path on your machine. 
    168 LOGO_DIR=os.path.join(STATIC_WEBSERVER_URL_PATH, "dx_extras/logos") 
     168LOGO_DIR=os.path.join(WEB_EXTRAS_URL_PATH, "logos") 
    169169 
    170170# LEFT_LOGO: 
  • TI04-geosplat/trunk/pygss/OptionHandler.py

    r798 r1243  
    8484             
    8585        elif keyPatternMatch(self.bag, "plotType")==0: 
    86             if self.bag["graphicalOutputType"]=="PointValueAndMetadata": 
     86            if self.bag["graphicalOutputType"].find("PointValueAndMetadata")>-1: 
    8787                self.options=[[[]],[[]],[[]]]  
    8888            else: 
     
    315315if __name__=="__main__": 
    316316    a=OptionHandler("jane", ["dset1", "dset2"], {"sessionID":"324242", 
    317                     "fileURIList":["/tmp/tmp.nc"], "fileVariable_1.2":"var1", 
     317                    "fileURIList":["/data/var1.nc"], "fileVariable_1.2":"pqn", 
    318318                    "graphicalOutputType":"Animation_1.2"}) 
     319    print a.options 
    319320 
    320321    o=OptionHandler("jane", ["dset1", "dset2"], {"sessionID":"324242", 
    321                        "fileURIList":["/tmp/tmp.nc"], "fileVariable_1.2":"var1", 
     322                       "fileURIList":["/data/var1.nc"], "fileVariable_1.2":"pqn", 
    322323                       "graphicalOutputType":"2DPlot_1.2"}) 
    323324    print o.options 
    324325 
    325     p=OptionHandler("jane", ["dset1", "dset2"], {'continentsSwitch':'on', 'status': 'constructing', 'username': 'jane', 'accessTime': 1142324428.122052, 'projection': 'standard', 'fileVariable_1.2': 'var1', 'fileURIList': ['/tmp/tmp.nc'], 'userRoles': [], 'sessionID': 'session_20060314082027136', 'plotType': 'boxfill', 'fileFormat': 'GIF', 'getOutput': 'getOutput', 'imageSize': '800x600'}) 
     326    p=OptionHandler("jane", ["dset1", "dset2"], {'continentsSwitch':'on', 'status': 'constructing', 'username': 'jane', 'accessTime': 1142324428.122052, 'projection': 'standard', 'fileVariable_1.2': 'pqn', 'fileURIList': ['/data/var1.nc'], 'userRoles': [], 'sessionID': 'session_20060314082027136', 'plotType': 'boxfill', 'fileFormat': 'GIF', 'getOutput': 'getOutput', 'imageSize': '800x600'}) 
    326327    print p.options 
     328     
     329    point=OptionHandler("jane", ["dset1", "dset2"], {'sessionID':"423432", 
     330        'fileURIList':["/data/dx/0d.nc"], "fileVariable_1.1":"t"}) 
     331    print point.options 
     332     
     333    point=OptionHandler("jane", ["dset1", "dset2"], {'sessionID':"423432", 
     334        'fileURIList':["/data/dx/0d.nc"], "fileVariable_1.1":"t", 
     335        "graphicalOutputType":"PointValueAndMetadata"}) 
     336    print point.options     
  • TI04-geosplat/trunk/pygss/OutputManager.py

    r798 r1243  
    354354if __name__=="__main__": 
    355355 
    356     b=OutputManager({'fileVariable_1.1':'t', 'status': 'constructing', 'username': 'jane', 'accessTime': 1142557842.2275701, 'fileURIList': ['/dxd/0d.nc'], 'userRoles': [], 'sessionID': 'session_20060317011041792', 'graphicalOutputType': 'PointValueAndMetadata_1.1', 'getOutput': 'getOutput'}) 
     356    b=OutputManager({'fileVariable_1.1':'t', 'status': 'constructing', 'username': 'jane', 'accessTime': 1142557842.2275701, 'fileURIList': ['/data/dx/0d.nc'], 'userRoles': [], 'sessionID': 'session_20060317011041792', 'graphicalOutputType': 'PointValueAndMetadata_1.1', 'getOutput': 'getOutput'}) 
    357357    sys.exit() 
    358358    b=OutputManager({'status': 'constructing', 'username': None, 'outputURLPath': 'http://localhost/output/test.gif', 'fileURIList': ['/srv/www/htdocs/output/jane/dx_output/output_20060316232539.nc'], 'imageSize': '300x200', 'confirm': 'Confirm', 'accessTime': 1142551623.3794341, 'userRoles': [], 'sessionID': 'session_20060316232622350', 'graphicalOutputType': 'YvsXGraph_1.1', 'plotType': 'YvsXGraph', 'proceed': 'Proceed', 'action': 'createOutput', 'outputFilePath': '/srv/www/htdocs/output/test.gif', 'fileFormat': 'postscript', 'getOutput': 'getOutput', 'fileVariable_1.1': 'var1'}) 
Note: See TracChangeset for help on using the changeset viewer.