source: TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/model/contents.py @ 3561

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/model/contents.py@3561
Revision 3561, 1.9 KB checked in by spascoe, 12 years ago (diff)

Several bugs that were making the Capabilities document invalid.

The DDP test WMS server is now viewable through Cadcorp's Map Browser.

Line 
1# Copyright (C) 2007 STFC & NERC (Science and Technology Facilities Council).
2# This software may be distributed under the terms of the
3# Q Public License, version 1.0 or later.
4# http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
5"""
6Classes modelling the OWS Contents package v1.1.0.
7
8@author: Stephen Pascoe
9"""
10
11from ows_common.model.iso19115_subset import Keywords
12from ows_common.model.data_identification import Description
13
14class Contents(object):
15    """
16    @ivar datasetSummaries
17    @type datasetSummaries: Iterable of DatasetSummary objects
18    @ivar otherSources: URLs
19    @type otherSource: iterable of str
20
21    """
22    def __init__(self, datasetSummaries=None, otherSources=None):
23        if datasetSummaries is None:
24            self.datasetSummaries = []
25        else:
26            self.datasetSummaries = datasetSummaries
27        if otherSources is None:
28            self.otherSources = []
29        else:
30            self.otherSources = otherSources
31
32class DatasetSummary(Description):
33    """
34    @ivar identifier
35    @type identifier: None, str or Code
36    @ivar datasetSummaries
37    @type datasetSummaries: Iterable of DatasetSummary objects
38    @ivar metadata
39    @type metadata: iterable of Metadata objects
40    @ivar boundingBoxes
41    @type boundingBoxes: iterable of BoundingBox objects
42    @ivar wgs84BoundingBoxes
43    @type wgs84BoundingBoxes: iterable of WSG84BoundingBox objects
44    """
45
46    def __init__(self, titles=[], abstracts=[], keywords=Keywords(),
47                 identifier=None, datasetSummaries=[], metadata=[], boundingBoxes=[],
48                 wgs84BoundingBoxes=[]):
49        super(DatasetSummary, self).__init__(titles, abstracts, keywords)
50
51        self.identifier = identifier
52        self.datasetSummaries = datasetSummaries
53        self.metadata = metadata
54        self.boundingBoxes = boundingBoxes
55        self.wgs84BoundingBoxes = wgs84BoundingBoxes
Note: See TracBrowser for help on using the repository browser.