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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/xml/__init__.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 and creates cows objects.
14
15This package is written in a functional rather than object orientated
16style.  Each function expects an ElementTree node as it's first
17argument and returns an cows object.
18
19@author: Stephen Pascoe
20"""
21
22from cows.xml.service_identification import *
23from cows.xml.service_provider import *
24from cows.xml import ns
25from cows.xml.util import *
26from cows.model import ServiceMetadata
27
28def service_metadata(node):
29    sm = ServiceMetadata(
30           serviceIdentification=find_with(node, './{%s}ServiceIdentification'
31                                           % ns.ows, service_identification),
32           serviceProvider=find_with(node, './{%s}ServiceProvider' % ns.ows,
33                                     service_provider)
34           )
35    return sm
36       
Note: See TracBrowser for help on using the repository browser.