source: TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/model/data_identification.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/data_identification.py@3553
Revision 3553, 1.7 KB checked in by spascoe, 12 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 Data Identification package v1.1.0.
7
8@author: Stephen Pascoe
9"""
10
11from ows_common.model.iso19115_subset import Keywords
12
13class Description(object):
14    """
15    @ivar titles
16    @type titles: iterable of str or LanguageString
17    @ivar abstracts
18    @type abstracts: iterable of str or LanguageString
19    @ivar keywords
20    @type keywords: iterable or Keywords
21
22    """
23    def __init__(self, titles=[], abstracts=[], keywords=Keywords()):
24        self.titles = titles
25        self.abstracts = abstracts
26        self.keywords = keywords
27
28class BasicIdentification(Description):
29    """
30    @ivar identifier
31    @type identifier: None or Code
32    @ivar metadata
33    @type metadata: iterable of Metadata
34
35    """
36    def __init__(self,  identifier=None, metadata=[], **kwargs):
37        super(BasicIdentification, self).__init__(**kwargs)
38
39        self.identifier = identifier
40        self.metadata = metadata
41
42   
43class Identification(BasicIdentification):
44    """
45    @ivar outputFormats
46    @type outputFormats: iterable of str
47    @ivar availableCRSs: URIs of available coordinate reference systems
48    @type availableCRSs: iterable of str
49
50    @ivar boundingBoxes
51    @type boundingBoxes: iterable of BoundingBox
52
53    """
54    def __init__(self, outputFormats=[],
55                 availableCRSs=[], boundingBoxes=[], **kwargs):
56        super(Identification, self).__init__(**kwargs)
57
58        self.outputFormats = outputFormats
59        self.availableCRSs = availableCRSs
60        self.boundingBoxes = boundingBoxes
61       
Note: See TracBrowser for help on using the repository browser.