Changeset 4412 for cows


Ignore:
Timestamp:
06/11/08 14:56:17 (11 years ago)
Author:
domlowe
Message:

Validated output of describestoredqueries and liststoredqueries

Location:
cows/trunk/cows
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/templates/wfs_describestoredqueries.xml

    r4408 r4412  
    55?> 
    66 
    7 <DescribeStoredQueriesResponse xmlns:py="http://genshi.edgewall.org/" xmlns="http://www.opengis.net/wfs"   
    8                   xmlns:gml="http://www.opengis.net/gml">        
    9         <query py:for="query in c.storedqueries" 
    10              py:content="query"/> 
     7<DescribeStoredQueriesResponse xmlns:py="http://genshi.edgewall.org/"  xmlns:ows="http://www.opengis.net/ows/1.1" xmlns="http://www.opengis.net/wfs/2.0"  xmlns:gml="http://www.opengis.net/gml">        
     8        <StoredQueryDescription py:for="queryid in c.storedqueries" id="queryOne"> 
     9                <?python  
     10                querydesc=c.storedqueries[queryid][0]  
     11                ?> 
     12            <Abstract py:content="querydesc.abstract"/> 
     13            <ows:Metadata  py:content="querydesc.metadata"></ows:Metadata> 
     14            <Parameter name="${querydesc.parameter.name}" type="${querydesc.parameter.name}"></Parameter> 
     15            <QueryExpressionText returnFeatureTypes="" language=""></QueryExpressionText>            
     16        </StoredQueryDescription>        
    1117</DescribeStoredQueriesResponse> 
  • cows/trunk/cows/pylons/templates/wfs_liststoredqueries.xml

    r4408 r4412  
    55?> 
    66 
    7  
    8 <wfs:ListStoredQueriesResponse xmlns:py="http://genshi.edgewall.org/" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml"> 
     7<!--! TODO, featuretype specific xml namespace declaration -e.g. csml: must be done on the fly. Must be present to qualify Qnames in returnFeatureType--> 
     8<ListStoredQueriesResponse xmlns="http://www.opengis.net/wfs/2.0" xmlns:py="http://genshi.edgewall.org/" xmlns:csml="http://ndg.nerc.ac.uk/csml"> 
    99        <py:for each="queryid in c.storedqueries"> 
    10           <wfs:StoredQuery id="queryid"> 
    11                           <wfs:Title py:content="c.storedqueries[queryid][0].title"/> 
    12                           <wfs:ReturnFeatureType py:content="c.storedqueries[queryid][0].queryExpressionText.returnFeatureType"/>  
    13  
    14                   </wfs:StoredQuery> 
     10                <?python  
     11                querydesc=c.storedqueries[queryid][0]  
     12                ?> 
     13          <StoredQuery id="queryid"> 
     14                          <Title py:content="querydesc.title"/> 
     15                          <ReturnFeatureType py:content="querydesc.queryExpressionText.returnFeatureType"/>  
     16                  </StoredQuery> 
    1517    </py:for>  
    16 </wfs:ListStoredQueriesResponse> 
     18</ListStoredQueriesResponse> 
  • cows/trunk/cows/pylons/wfs_controller.py

    r4408 r4412  
    202202        c.storedqueries = self.layerMapper.queryDescriptions.queries 
    203203        t = ows_controller.templateLoader.load('wfs_liststoredqueries.xml') 
     204        temp=t.generate(c=c) 
    204205        return t.generate(c=c).render()  
  • cows/trunk/cows/service/imps/csmlbackend/wfs_csmllayer.py

    r4408 r4412  
    9191        qid='queryOne'         
    9292        qet=QueryExpressionText('csml:PointSeriesFeature') #TODO, possibly this could differ for different features... 
    93         query=StoredQuery(qid, queryExpressionText = qet) 
     93        pex=ParameterExpression('nameblah1', 'typeblah1') 
     94        query=StoredQuery(qid, title='blah1', abstract = 'my blah1 query', queryExpressionText = qet, parameter=pex) 
    9495        self.queries[qid]=(query, CSMLQueries.query_one_func) 
    9596         
    9697        qid='queryTwo' 
    9798        qet=QueryExpressionText('csml:GridSeriesFeature') #TODO, possibly this could differ for different features... 
    98         query=StoredQuery(qid,queryExpressionText = qet) 
     99        pex=ParameterExpression('nameblah2', 'typeblah2') 
     100        query=StoredQuery(qid, title='blah2', abstract = 'my blah2 query', queryExpressionText = qet, parameter=pex) 
    99101        self.queries[qid]=(query, CSMLQueries.query_two_func)       
     102 
     103         
     104 
     105 
     106 
     107 
    100108 
    101109class CSMLFeatureSet(IFeatureSet): 
Note: See TracChangeset for help on using the changeset viewer.