Ignore:
Timestamp:
30/10/08 15:35:08 (11 years ago)
Author:
domlowe
Message:

Adding stub code for WFS 2.0 stored query implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/service/imps/csmlbackend/wfs_csmllayer.py

    r4394 r4398  
    66from cows.service.imps.csmlbackend.csmlcommon import CSMLLayerMapper, CSMLConnector 
    77from cows.service.wfs_iface import * 
     8from cows.model.storedquery import * 
    89import csml 
    910from xml.etree import ElementTree as etree 
     
    2930        super(CSMLwfsLayerMapper, self).__init__() 
    3031        self.featureinstancecache={} 
     32        self.queryDescriptions=CSMLStoredQueries() 
    3133     
    3234 
     
    8082        else: 
    8183            raise ValueError 
     84 
     85class CSMLStoredQueries(object): 
     86    """ Holds definitions of supported WFS stored queries and mappings to functional implementations""" 
     87    def __init__(self): 
     88        #self.queries is a dictionary of form: {id:(StoredQuery, func)} 
     89        #where fun is the name of the implementation of the stored query (typically) in wfs_csmlstoredqueries 
     90        self.queries={} 
     91        qid='queryOne' 
     92        query=StoredQuery(qid) 
     93        self.queries[qid]=(query, 'query_one_func') 
     94        qid='queryTwo' 
     95        query=StoredQuery(qid) 
     96        self.queries[qid]=(query, 'query_two_func')       
     97         
    8298 
    8399class CSMLFeatureSet(IFeatureSet): 
Note: See TracChangeset for help on using the changeset viewer.