source: TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/xml/service_provider.py @ 3553

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