source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_api.py @ 2501

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_api.py@2501
Revision 2501, 618 bytes checked in by spascoe, 12 years ago (diff)

Many new ideas in this commit. It's still in a state of flux.
I'm exploring using decorators and class attributes with the prefix "_ows"
to declare properties that need to be in the OWS capabilities document.

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"""
6Basic CSML controller.
7
8@author: Stephen Pascoe
9"""
10
11from ows_server.lib.base import *
12import csml.parser
13import os
14from ows_server.lib.csml import get_csml_doc
15
16
17
18class CsmlApiController(BaseController):
19    def index(self, file):
20        d = get_csml_doc(file)
21        return Response('Dataset: %s\nFeatures: %s' % (file,
22                        ' '.join(d.getFeatureList())))
23
Note: See TracBrowser for help on using the repository browser.