source: cows/trunk/cows/service/wfs_iface.py @ 4292

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/service/wfs_iface.py@4292
Revision 4292, 1.4 KB checked in by domlowe, 11 years ago (diff)

Creating FeatureSet? class to provide query methods on collection of FeatureInstances?.

Line 
1"""
2The classes in this module define an interface between the OWS Pylons
3server and components that provide Web Feature Server layers. They extend the interfaces
4defined in wxs_iface.py.
5
6
7"""
8
9from wxs_iface import ILayer
10
11       
12
13class IwfsLayer(ILayer):
14    """
15    An interface representing a WFS FeatureType, based on ILayer.
16    @ivar keywords: describing this feature type.
17    @ivar outputformats: list of output formats available for this feature type.
18    """
19    keywords=outputformats=NotImplemented
20
21class IFeatureSet(object):
22    """ A set of features available via a WFS. Supports querying methods as used by OGG filters
23    @ivar featureinstances: feature instances available in this feature set"""
24
25    def getFeatureByGMLid(self, gmlid):
26        """ return a feature specified by gmlid
27        @return: IFeatureInstance
28        """
29        raise NotImplementedError
30   
31    #TODO: Define other types of filter query that can be done on the FeatureSet
32   
33       
34class IFeatureInstance(object):
35    """     An interface representing a feature (as defined in a GML application schema)
36    @ivar title: title of feature instance
37    @ivar abstract: abstract of feature instance
38    @ivar feature: feature instance
39    """ 
40   
41    type=title=abstract=NotImplemented
42   
43    def toGML(self):
44        """ return a GML representation of the feature as a string
45        @return: string of GML
46        """
47        raise NotImplementedError
Note: See TracBrowser for help on using the repository browser.