Changeset 2938 for TI05-delivery


Ignore:
Timestamp:
09/10/07 13:29:37 (12 years ago)
Author:
lawrence
Message:

Provides a test harness for the getrelatedrecords option in
the BODC VocabServer?.

Location:
TI05-delivery/ows_framework/trunk/ows_server/ows_server/models
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/ndgVocab.py

    r2847 r2938  
    2323         
    2424    def getRelated (self, term, matchType='hasNarrowMatch'):  
    25         ''' Get a list of related terms to <term> where the relationshipo is given by matchType. 
    26         The underlying service is documented as follows: 
    27         Filter criteria 
    28             Target_text ="text to be located" 
    29             Target_field= " long or short or definition" 
    30                     long = entry long name 
    31                     short = entry short name 
    32                     definition = entry definition 
    33                     Default="long" 
    34             Search_type="case or noCase, part or whole" 
    35                     Default is "case,whole" 
    36             Search_List_ID="keys of lists to be included in search" 
    37             Version="valid version number or 'current'" 
    38             Default="current" 
    39                 Must be current if more than one list specified 
    40             Map_List_ID= "keys of lists to be included in mapping" 
    41                     Default= all lists 
    42             Relationships="relationship key" 
    43                     See Appendix for key definitions 
    44         Output controls 
    45             Start="start record pointer" 
    46                     Default = 1 
    47             Limit="number of records to output" 
    48                     Default = infinity 
    49             Sort_field="key or term or abbreviation or definition" 
    50                     Default="term" 
    51             Format ="DDO or SKOS or URI" 
    52                     Default is "DDO" 
    53         But the WSDL seems to support: 
    54         [ZSI.TC.String(pname=(ns,"targetText"), aname="_targetText", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")),  
    55         ZSI.TC.String(pname=(ns,"targetField"), aname="_targetField", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")),  
    56         ZSI.TC.String(pname=(ns,"searchType"), aname="_searchType", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")),  
    57         ZSI.TC.String(pname=(ns,"searchTarget"), aname="_searchTarget", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")),  
    58         ZSI.TC.String(pname=(ns,"mappingTarget"), aname="_mappingTarget", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")),  
    59         ZSI.TCnumbers.Iint(pname=(ns,"relationship"), aname="_relationship", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")),  
    60         ZSI.TC.String(pname=(ns,"inferences"), aname="_inferences", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    61         which corresponds to this from the schema: 
     25        ''' Here is the relevant bits of wsdl ... 
    6226        <xsd:complexType name="getRelatedRecordType"> 
    6327            <xsd:sequence> 
    64                 <xsd:element name="targetText" type="xsd:string" /> 
    65                 <xsd:element name="targetField" type="xsd:string"  
    66                         minOccurs="0"/> 
    67                 <xsd:element name="searchType" type="xsd:string" 
    68                         minOccurs="0" /> 
    69                 <xsd:element name="searchTarget" type="xsd:string" /> 
    70                 <xsd:element name="mappingTarget" type="xsd:string"  
    71                         minOccurs="0" /> 
    72                 <xsd:element name="relationship" type="xsd:int" 
    73                         minOccurs="0" /> 
    74                 <xsd:element name="inferences" type="xsd:string"  
    75                         minOccurs="0" /> 
     28                    <xsd:element name="recordSelection" type="types:recordSelection" /> 
     29                    <xsd:element name="predicate" type="xsd:int" /> 
     30                    <xsd:element name="objectList" type="xsd:string"  
     31                            minOccurs="0" maxOccurs="unbounded"/> 
     32                    <xsd:element name="inferences" type="xsd:string"/> 
    7633            </xsd:sequence> 
    7734        </xsd:complexType> 
     35        Which is kind of ugly, because it's a nested complex type, so we need to go  
     36        get the meaning of recordSelection ...which leads me to: 
     37        <xsd:complexType name="recordSelection"> 
     38            <xsd:choice> 
     39                    <xsd:element name="recordIdentifer" type="types:recordIdentifier" /> 
     40                    <xsd:element name="recordCriteria" type="types:recordCriteria" /> 
     41            </xsd:choice> 
     42        </xsd:complexType> 
     43 
     44        <xsd:complexType name="recordIdentifier"> 
     45            <xsd:sequence> 
     46                    <xsd:element name="subjectTerm" type="xsd:string"  
     47                            minOccurs="1" maxOccurs="unbounded" /> 
     48            </xsd:sequence> 
     49        </xsd:complexType> 
     50            <xsd:complexType name="recordCriteria"> 
     51                    <xsd:sequence> 
     52                            <xsd:element name="subjectList" type="xsd:string" 
     53                                    minOccurs="1" maxOccurs="unbounded" /> 
     54                            <xsd:element name="subjectField" type="xsd:string" 
     55                                    minOccurs="0" default="long"/> 
     56                            <xsd:element name="subjectText" type="xsd:string" /> 
     57                            <xsd:element name="caseSensitivity" type="xsd:boolean" 
     58                                    minOccurs="0" default="true" /> 
     59                            <xsd:element name="partialMatch" type="xsd:boolean" 
     60                                                minOccurs="0" default="false"/> 
     61                            </xsd:sequence> 
     62                      </xsd:complexType> 
     63        </xsd:complexType> 
     64         
     65         
     66         
    7867        Relationships are documented as: 
    7968 
     
    121110            '1F'        hasMajorMatch  + hasMinorMatch + hasExactMatch + hasNarrowMatch + hasBroadMatch 00011111 
    122111            'FF'        All relationships currently defined plus any added in the future        11111111 
     112             
     113        Roy's email specifies: 
     114        subjectText is your target string 
     115        subjectField - always set to 'long' 
     116        subjectList and objectList always 
     117            http://vocab.ndg.nerc.ac.uk/list/P211/27 or 
     118            http://vocab.ndg.nerc.ac.uk/list/P211/current 
     119        caseSensitivity and partialMatch - true or false (up to you) 
     120        inference set to true and don't worry about it (hook for the future - 
     121            the backend is currently limited to one end of the vocab tree) 
     122        The predicate is a number between 1 and 255 that controls the 
     123        predicates to be included (see the table at the end of the attached 
     124        document). 255 includes everything. 
     125             
    123126        ''' 
    124127 
    125128        request=getRelatedRecordRequest() 
    126         request.TargetText=term 
    127         request.SearchTarget='Unknown' 
     129        request.Inferences=True 
     130        request.ObjectList=['http://vocab.ndg.nerc.ac.uk/list/P211/current'] 
     131         
     132         
     133        selection=request.new_recordSelection() 
     134         
     135        criteria=selection.new_recordCriteria() 
     136         
     137        criteria.SubjectText=term 
     138        criteria.SubjectList=['http://vocab.ndg.nerc.ac.uk/list/P211/current'] 
     139        criteria.CaseSensitivity=False 
     140        criteria.PartialMatch=True 
     141         
     142        selection.RecordCriteria=criteria 
     143        request.RecordSelection=selection 
     144         
    128145        try: 
    129146            #Obviously we just add things from the list above to the dictionary as required 
    130             request.Relationship={'hasNarrowMatch':2, 
     147            request.Predicate={'hasNarrowMatch':2, 
    131148                                  'hasBroadMatch':4 
    132149                                    }[matchType] 
    133150        except KeyError,e: 
    134151            raise KeyError,e 
    135          
    136152         
    137153        if self.logger: itime=time.time() 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/vocabDefs_services.py

    r2847 r2938  
    1414# Locator 
    1515class vocabLocator: 
    16     vocabPortType_address = "http://localhost:8080/vocab/services/vocab" 
     16    vocabPortType_address = "http://vocab.ndg.nerc.ac.uk/vocab" 
    1717    def getvocabPortTypeAddress(self): 
    1818        return vocabLocator.vocabPortType_address 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/vocabDefs_services_types.py

    r2847 r2938  
    4343        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    4444            ns = ns0.whatListsResponseType_Def.schema 
    45             TClist = [GTD("urn:vocab/types","codeTableTypeType",lazy=False)(pname=(ns,"codeTableType"), aname="_codeTableType", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     45            TClist = [GTD("urn:vocab/types","codeTableTypeType",lazy=True)(pname=(ns,"codeTableType"), aname="_codeTableType", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    4646            self.attribute_typecode_dict = attributes or {} 
    4747            if extend: TClist += ofwhat 
     
    8888        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    8989            ns = ns0.getListType_Def.schema 
    90             TClist = [ZSI.TC.String(pname=(ns,"listKey"), aname="_listKey", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryKey"), aname="_entryKey", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCtimes.gDateTime(pname=(ns,"earliestRecord"), aname="_earliestRecord", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    91             self.attribute_typecode_dict = attributes or {} 
    92             if extend: TClist += ofwhat 
    93             if restrict: TClist = ofwhat 
    94             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    95             class Holder: 
    96                 __metaclass__ = pyclass_type 
    97                 typecode = self 
    98                 def __init__(self): 
    99                     # pyclass 
    100                     self._listKey = None 
    101                     self._entryKey = None 
     90            TClist = [ZSI.TC.String(pname=(ns,"recordKey"), aname="_recordKey", minOccurs=1, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCtimes.gDateTime(pname=(ns,"earliestRecord"), aname="_earliestRecord", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     91            self.attribute_typecode_dict = attributes or {} 
     92            if extend: TClist += ofwhat 
     93            if restrict: TClist = ofwhat 
     94            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     95            class Holder: 
     96                __metaclass__ = pyclass_type 
     97                typecode = self 
     98                def __init__(self): 
     99                    # pyclass 
     100                    self._recordKey = [] 
    102101                    self._earliestRecord = None 
    103102                    return 
     
    110109        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    111110            ns = ns0.getListResponseType_Def.schema 
    112             TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=False)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     111            TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    113112            self.attribute_typecode_dict = attributes or {} 
    114113            if extend: TClist += ofwhat 
     
    130129        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    131130            ns = ns0.codeTableRecordType_Def.schema 
    132             TClist = [ZSI.TC.String(pname=(ns,"listKey"), aname="_listKey", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryKey"), aname="_entryKey", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryTerm"), aname="_entryTerm", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryTermAbbr"), aname="_entryTermAbbr", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryTermDef"), aname="_entryTermDef", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCtimes.gDateTime(pname=(ns,"entryTermLastMod"), aname="_entryTermLastMod", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"exactMatch"), aname="_exactMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"narrowMatch"), aname="_narrowMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"broadMatch"), aname="_broadMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"minorMatch"), aname="_minorMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"majorMatch"), aname="_majorMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     131            TClist = [ZSI.TC.String(pname=(ns,"listKey"), aname="_listKey", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryKey"), aname="_entryKey", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryTerm"), aname="_entryTerm", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryTermAbbr"), aname="_entryTermAbbr", minOccurs=1, maxOccurs=1, nillable=True, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"entryTermDef"), aname="_entryTermDef", minOccurs=1, maxOccurs=1, nillable=True, typed=False, encoded=kw.get("encoded")), ZSI.TCtimes.gDateTime(pname=(ns,"entryTermLastMod"), aname="_entryTermLastMod", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"exactMatch"), aname="_exactMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"narrowMatch"), aname="_narrowMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"broadMatch"), aname="_broadMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"minorMatch"), aname="_minorMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"majorMatch"), aname="_majorMatch", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    133132            self.attribute_typecode_dict = attributes or {} 
    134133            if extend: TClist += ofwhat 
     
    221220        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    222221            ns = ns0.whatListsCatResponseType_Def.schema 
    223             TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=False)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     222            TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    224223            self.attribute_typecode_dict = attributes or {} 
    225224            if extend: TClist += ofwhat 
     
    263262        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    264263            ns = ns0.searchVocabResponseType_Def.schema 
    265             TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=False)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     264            TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    266265            self.attribute_typecode_dict = attributes or {} 
    267266            if extend: TClist += ofwhat 
     
    283282        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    284283            ns = ns0.getMapType_Def.schema 
    285             TClist = [ZSI.TC.String(pname=(ns,"subject"), aname="_subject", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"object"), aname="_object", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"relationship"), aname="_relationship", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"inference"), aname="_inference", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    286             self.attribute_typecode_dict = attributes or {} 
    287             if extend: TClist += ofwhat 
    288             if restrict: TClist = ofwhat 
    289             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    290             class Holder: 
    291                 __metaclass__ = pyclass_type 
    292                 typecode = self 
    293                 def __init__(self): 
    294                     # pyclass 
    295                     self._subject = None 
    296                     self._object = None 
    297                     self._relationship = None 
     284            TClist = [ZSI.TC.String(pname=(ns,"subjectList"), aname="_subjectList", minOccurs=1, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"predicate"), aname="_predicate", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"objectList"), aname="_objectList", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"inference"), aname="_inference", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     285            self.attribute_typecode_dict = attributes or {} 
     286            if extend: TClist += ofwhat 
     287            if restrict: TClist = ofwhat 
     288            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     289            class Holder: 
     290                __metaclass__ = pyclass_type 
     291                typecode = self 
     292                def __init__(self): 
     293                    # pyclass 
     294                    self._subjectList = [] 
     295                    self._predicate = None 
     296                    self._objectList = [] 
    298297                    self._inference = None 
    299298                    return 
     
    306305        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    307306            ns = ns0.getMapResponseType_Def.schema 
    308             TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=False)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     307            TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    309308            self.attribute_typecode_dict = attributes or {} 
    310309            if extend: TClist += ofwhat 
     
    321320            self.pyclass = Holder 
    322321 
     322    class recordSelection_Def(ZSI.TCcompound.ComplexType, TypeDefinition): 
     323        schema = "urn:vocab/types" 
     324        type = (schema, "recordSelection") 
     325        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
     326            ns = ns0.recordSelection_Def.schema 
     327            TClist = [GTD("urn:vocab/types","recordIdentifier",lazy=True)(pname=(ns,"recordIdentifer"), aname="_recordIdentifer", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:vocab/types","recordCriteria",lazy=True)(pname=(ns,"recordCriteria"), aname="_recordCriteria", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     328            self.attribute_typecode_dict = attributes or {} 
     329            if extend: TClist += ofwhat 
     330            if restrict: TClist = ofwhat 
     331            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     332            class Holder: 
     333                __metaclass__ = pyclass_type 
     334                typecode = self 
     335                def __init__(self): 
     336                    # pyclass 
     337                    self._recordIdentifer = None 
     338                    self._recordCriteria = None 
     339                    return 
     340            Holder.__name__ = "recordSelection_Holder" 
     341            self.pyclass = Holder 
     342 
     343    class recordIdentifier_Def(ZSI.TCcompound.ComplexType, TypeDefinition): 
     344        schema = "urn:vocab/types" 
     345        type = (schema, "recordIdentifier") 
     346        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
     347            ns = ns0.recordIdentifier_Def.schema 
     348            TClist = [ZSI.TC.String(pname=(ns,"subjectTerm"), aname="_subjectTerm", minOccurs=1, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     349            self.attribute_typecode_dict = attributes or {} 
     350            if extend: TClist += ofwhat 
     351            if restrict: TClist = ofwhat 
     352            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     353            class Holder: 
     354                __metaclass__ = pyclass_type 
     355                typecode = self 
     356                def __init__(self): 
     357                    # pyclass 
     358                    self._subjectTerm = [] 
     359                    return 
     360            Holder.__name__ = "recordIdentifier_Holder" 
     361            self.pyclass = Holder 
     362 
     363    class recordCriteria_Def(ZSI.TCcompound.ComplexType, TypeDefinition): 
     364        schema = "urn:vocab/types" 
     365        type = (schema, "recordCriteria") 
     366        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
     367            ns = ns0.recordCriteria_Def.schema 
     368            TClist = [ZSI.TC.String(pname=(ns,"subjectList"), aname="_subjectList", minOccurs=1, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"subjectField"), aname="_subjectField", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"subjectText"), aname="_subjectText", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.Boolean(pname=(ns,"caseSensitivity"), aname="_caseSensitivity", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.Boolean(pname=(ns,"partialMatch"), aname="_partialMatch", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     369            self.attribute_typecode_dict = attributes or {} 
     370            if extend: TClist += ofwhat 
     371            if restrict: TClist = ofwhat 
     372            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     373            class Holder: 
     374                __metaclass__ = pyclass_type 
     375                typecode = self 
     376                def __init__(self): 
     377                    # pyclass 
     378                    self._subjectList = [] 
     379                    self._subjectField = None 
     380                    self._subjectText = None 
     381                    self._caseSensitivity = None 
     382                    self._partialMatch = None 
     383                    return 
     384            Holder.__name__ = "recordCriteria_Holder" 
     385            self.pyclass = Holder 
     386 
    323387    class getRelatedRecordType_Def(ZSI.TCcompound.ComplexType, TypeDefinition): 
    324388        schema = "urn:vocab/types" 
     
    326390        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    327391            ns = ns0.getRelatedRecordType_Def.schema 
    328             TClist = [ZSI.TC.String(pname=(ns,"targetText"), aname="_targetText", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"targetField"), aname="_targetField", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"searchType"), aname="_searchType", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"searchTarget"), aname="_searchTarget", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"mappingTarget"), aname="_mappingTarget", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"relationship"), aname="_relationship", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"inferences"), aname="_inferences", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    329             self.attribute_typecode_dict = attributes or {} 
    330             if extend: TClist += ofwhat 
    331             if restrict: TClist = ofwhat 
    332             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    333             class Holder: 
    334                 __metaclass__ = pyclass_type 
    335                 typecode = self 
    336                 def __init__(self): 
    337                     # pyclass 
    338                     self._targetText = None 
    339                     self._targetField = None 
    340                     self._searchType = None 
    341                     self._searchTarget = None 
    342                     self._mappingTarget = None 
    343                     self._relationship = None 
     392            TClist = [GTD("urn:vocab/types","recordSelection",lazy=True)(pname=(ns,"recordSelection"), aname="_recordSelection", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"predicate"), aname="_predicate", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"objectList"), aname="_objectList", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"inferences"), aname="_inferences", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     393            self.attribute_typecode_dict = attributes or {} 
     394            if extend: TClist += ofwhat 
     395            if restrict: TClist = ofwhat 
     396            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     397            class Holder: 
     398                __metaclass__ = pyclass_type 
     399                typecode = self 
     400                def __init__(self): 
     401                    # pyclass 
     402                    self._recordSelection = None 
     403                    self._predicate = None 
     404                    self._objectList = [] 
    344405                    self._inferences = None 
    345406                    return 
     
    352413        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    353414            ns = ns0.getRelatedRecordResponseType_Def.schema 
    354             TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=False)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     415            TClist = [GTD("urn:vocab/types","codeTableRecordType",lazy=True)(pname=(ns,"codeTableRecord"), aname="_codeTableRecord", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    355416            self.attribute_typecode_dict = attributes or {} 
    356417            if extend: TClist += ofwhat 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/wsdlUse

    r2847 r2938  
    1 wsdl2py -b -f $1 
     1wsdl2py --lazy -b -f $1 
Note: See TracChangeset for help on using the changeset viewer.