source: TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/xml/__init__.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/__init__.py@3553
Revision 3553, 1.1 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 and creates ows_common objects.
7
8This package is written in a functional rather than object orientated
9style.  Each function expects an ElementTree node as it's first
10argument and returns an ows_common object.
11
12@author: Stephen Pascoe
13"""
14
15from ows_common.xml.service_identification import *
16from ows_common.xml.service_provider import *
17from ows_common.xml import ns
18from ows_common.xml.util import *
19from ows_common.model import ServiceMetadata
20
21def service_metadata(node):
22    sm = ServiceMetadata(
23           serviceIdentification=find_with(node, './{%s}ServiceIdentification'
24                                           % ns.ows, service_identification),
25           serviceProvider=find_with(node, './{%s}ServiceProvider' % ns.ows,
26                                     service_provider)
27           )
28    return sm
29       
Note: See TracBrowser for help on using the repository browser.