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

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

New COWS distribution. See [4005] for description.

RevLine 
[2471]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
[4008]11from cows.model.iso19115_subset import Keywords
12from cows.model.data_identification import Description
[2471]13
14class Contents(object):
15    """
[2529]16    @ivar datasetSummaries
17    @type datasetSummaries: Iterable of DatasetSummary objects
18    @ivar otherSources: URLs
19    @type otherSource: iterable of str
[2471]20
21    """
[3561]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
[2471]31
32class DatasetSummary(Description):
33    """
34    @ivar identifier
35    @type identifier: None, str or Code
[2549]36    @ivar datasetSummaries
37    @type datasetSummaries: Iterable of DatasetSummary objects
[2471]38    @ivar metadata
39    @type metadata: iterable of Metadata objects
40    @ivar boundingBoxes
41    @type boundingBoxes: iterable of BoundingBox objects
[2529]42    @ivar wgs84BoundingBoxes
43    @type wgs84BoundingBoxes: iterable of WSG84BoundingBox objects
[2471]44    """
45
[2529]46    def __init__(self, titles=[], abstracts=[], keywords=Keywords(),
[2549]47                 identifier=None, datasetSummaries=[], metadata=[], boundingBoxes=[],
[2529]48                 wgs84BoundingBoxes=[]):
49        super(DatasetSummary, self).__init__(titles, abstracts, keywords)
[2471]50
51        self.identifier = identifier
[2549]52        self.datasetSummaries = datasetSummaries
[2471]53        self.metadata = metadata
54        self.boundingBoxes = boundingBoxes
[2529]55        self.wgs84BoundingBoxes = wgs84BoundingBoxes
Note: See TracBrowser for help on using the repository browser.