source: cows/trunk/cows/model/contents.py @ 4912

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/model/contents.py@4912
Revision 4912, 2.0 KB checked in by spascoe, 11 years ago (diff)

Added LICENSE file and a short banner at the top of each python file.
Use add_license.py to add a license to new files.

NOTE: also contains a couple of files missed at last commit.

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