source: cows/trunk/cows/xml/service_provider.py @ 4912

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/xml/service_provider.py@4912
Revision 4912, 1.2 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"""
13Reads XML fragments from the OWS ServiceProvider package v1.1.0 and
14creates cows objects.
15
16Each function expects an ElementTree node as it's first argument and returns
17an cows object.
18
19@author: Stephen Pascoe
20"""
21
22from cows.xml import ns
23from cows.xml.util import *
24from cows.xml.iso19115_subset import *
25from cows.model.service_provider import *
26
27def service_provider(node):
28    sp = ServiceProvider(
29           providerName=find_text(node, './{%s}ProviderName' % ns.ows),
30           serviceContact=find_with(node, './{%s}ServiceContact' % ns.ows,
31                                     responsible_party),
32           providerSite=find_with(node, './{%s}ProviderSite' % ns.ows,
33                                   online_resource)
34           )
35    return sp
Note: See TracBrowser for help on using the repository browser.