Changeset 1853 for TI07-MOLES


Ignore:
Timestamp:
11/12/06 21:35:31 (12 years ago)
Author:
lawrence
Message:

discovery gui now back to working (without the ndgdoc,
but also without anything other than full text default
ordering)

Location:
TI07-MOLES/trunk/PythonCode/browse/portal/cgi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/ndgSearch.py

    r1850 r1853  
    9191        result=self.server.doPresent(request)     
    9292        if result._status: 
    93             docs=result._documents 
     93            docs=result._documents._document 
    9494         
    9595        if self.logger: 
    9696            etime=time.time()-itime 
    97             self.logger.info('Document Load [n=%s] took [%ss]'%(len(self.documents),etime)) 
     97            self.logger.info('Document Load [n=%s] took [%ss]'%(len(self.documents._document),etime)) 
    9898        self.docs=docs 
    9999        return self.docs 
     
    125125        for doc in docs:  
    126126            try: 
    127                 r=loadET(doc[1]) 
    128                 path=doc[0].rstrip('.xml') 
     127                r=loadET(doc) 
    129128                result.append(r)#result.append(r.find(path)) 
    130129            except: 
    131                 result.append(self.__xmlerror((path,doc[1]))) 
     130                result.append(self.__xmlerror(doc)) 
    132131        return result 
    133132             
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/discovery/DiscoveryService_services.py

    r1850 r1853  
    1010from ZSI import client 
    1111import ZSI 
     12from ZSI.generate.pyclass import pyclass_type 
    1213 
    1314# Locator 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/discovery/DiscoveryService_services_types.py

    r1850 r1853  
    88import ZSI.TCcompound 
    99from ZSI.schema import LocalElementDeclaration, ElementDeclaration, TypeDefinition, GTD, GED 
     10from ZSI.generate.pyclass import pyclass_type 
    1011 
    1112############################## 
     
    2223        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    2324            ns = ns0.PresentType_Def.schema 
    24             TClist = [GTD("urn:DiscoveryServiceAPI","DocumentsType",lazy=True)(pname=(ns,"documents"), aname="_documents", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","PresentFormatType",lazy=True)(pname=(ns,"format"), aname="_format", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    25             self.attribute_typecode_dict = attributes or {} 
    26             if extend: TClist += ofwhat 
    27             if restrict: TClist = ofwhat 
    28             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    29             class Holder: 
     25            TClist = [GTD("urn:DiscoveryServiceAPI","DocumentsType",lazy=False)(pname=(ns,"documents"), aname="_documents", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","PresentFormatType",lazy=False)(pname=(ns,"format"), aname="_format", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     26            self.attribute_typecode_dict = attributes or {} 
     27            if extend: TClist += ofwhat 
     28            if restrict: TClist = ofwhat 
     29            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     30            class Holder: 
     31                __metaclass__ = pyclass_type 
    3032                typecode = self 
    3133                def __init__(self): 
     
    4244        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    4345            ns = ns0.SearchType_Def.schema 
    44             TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByType",lazy=True)(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByDirectionType",lazy=True)(pname=(ns,"orderByDirection"), aname="_orderByDirection", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","scopeType",lazy=True)(pname=(ns,"scope"), aname="_scope", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","BoundingBoxType",lazy=True)(pname=(ns,"BoundingBox"), aname="_BoundingBox", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DateRangeType",lazy=True)(pname=(ns,"DateRange"), aname="_DateRange", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    45             self.attribute_typecode_dict = attributes or {} 
    46             if extend: TClist += ofwhat 
    47             if restrict: TClist = ofwhat 
    48             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    49             class Holder: 
     46            TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByType",lazy=False)(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByDirectionType",lazy=False)(pname=(ns,"orderByDirection"), aname="_orderByDirection", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","scopeType",lazy=False)(pname=(ns,"scope"), aname="_scope", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","BoundingBoxType",lazy=False)(pname=(ns,"BoundingBox"), aname="_BoundingBox", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DateRangeType",lazy=False)(pname=(ns,"DateRange"), aname="_DateRange", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     47            self.attribute_typecode_dict = attributes or {} 
     48            if extend: TClist += ofwhat 
     49            if restrict: TClist = ofwhat 
     50            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     51            class Holder: 
     52                __metaclass__ = pyclass_type 
    5053                typecode = self 
    5154                def __init__(self): 
     
    6871        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    6972            ns = ns0.PresentReturnType_Def.schema 
    70             TClist = [ZSI.TC.Boolean(pname=(ns,"status"), aname="_status", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"statusMessage"), aname="_statusMessage", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DocumentsType",lazy=True)(pname=(ns,"documents"), aname="_documents", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    71             self.attribute_typecode_dict = attributes or {} 
    72             if extend: TClist += ofwhat 
    73             if restrict: TClist = ofwhat 
    74             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    75             class Holder: 
     73            TClist = [ZSI.TC.Boolean(pname=(ns,"status"), aname="_status", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"statusMessage"), aname="_statusMessage", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DocumentsType",lazy=False)(pname=(ns,"documents"), aname="_documents", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     74            self.attribute_typecode_dict = attributes or {} 
     75            if extend: TClist += ofwhat 
     76            if restrict: TClist = ofwhat 
     77            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     78            class Holder: 
     79                __metaclass__ = pyclass_type 
    7680                typecode = self 
    7781                def __init__(self): 
     
    8993        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    9094            ns = ns0.SearchReturnType_Def.schema 
    91             TClist = [ZSI.TC.Boolean(pname=(ns,"status"), aname="_status", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"statusMessage"), aname="_statusMessage", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"resultId"), aname="_resultId", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"hits"), aname="_hits", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DocumentsType",lazy=True)(pname=(ns,"documents"), aname="_documents", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    92             self.attribute_typecode_dict = attributes or {} 
    93             if extend: TClist += ofwhat 
    94             if restrict: TClist = ofwhat 
    95             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    96             class Holder: 
     95            TClist = [ZSI.TC.Boolean(pname=(ns,"status"), aname="_status", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"statusMessage"), aname="_statusMessage", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"resultId"), aname="_resultId", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"hits"), aname="_hits", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DocumentsType",lazy=False)(pname=(ns,"documents"), aname="_documents", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     96            self.attribute_typecode_dict = attributes or {} 
     97            if extend: TClist += ofwhat 
     98            if restrict: TClist = ofwhat 
     99            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     100            class Holder: 
     101                __metaclass__ = pyclass_type 
    97102                typecode = self 
    98103                def __init__(self): 
     
    118123            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    119124            class Holder: 
     125                __metaclass__ = pyclass_type 
    120126                typecode = self 
    121127                def __init__(self): 
     
    140146            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    141147            class Holder: 
     148                __metaclass__ = pyclass_type 
    142149                typecode = self 
    143150                def __init__(self): 
     
    160167            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    161168            class Holder: 
     169                __metaclass__ = pyclass_type 
    162170                typecode = self 
    163171                def __init__(self): 
Note: See TracChangeset for help on using the changeset viewer.