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

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@3553
Revision 3553, 1.7 KB checked in by spascoe, 13 years ago (diff)

Moved all the model classes into their own sub-module.

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=[], otherSources=[]):
23        self.datasetSummaries = datasetSummaries
24        self.otherSources = otherSources
25
26class DatasetSummary(Description):
27    """
28    @ivar identifier
29    @type identifier: None, str or Code
30    @ivar datasetSummaries
31    @type datasetSummaries: Iterable of DatasetSummary objects
32    @ivar metadata
33    @type metadata: iterable of Metadata objects
34    @ivar boundingBoxes
35    @type boundingBoxes: iterable of BoundingBox objects
36    @ivar wgs84BoundingBoxes
37    @type wgs84BoundingBoxes: iterable of WSG84BoundingBox objects
38    """
39
40    def __init__(self, titles=[], abstracts=[], keywords=Keywords(),
41                 identifier=None, datasetSummaries=[], metadata=[], boundingBoxes=[],
42                 wgs84BoundingBoxes=[]):
43        super(DatasetSummary, self).__init__(titles, abstracts, keywords)
44
45        self.identifier = identifier
46        self.datasetSummaries = datasetSummaries
47        self.metadata = metadata
48        self.boundingBoxes = boundingBoxes
49        self.wgs84BoundingBoxes = wgs84BoundingBoxes
Note: See TracBrowser for help on using the repository browser.