source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/wms_service_metadata.kid @ 2501

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/wms_service_metadata.kid@2501
Revision 2501, 1.9 KB 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<?xml version="1.0"?>
2<?python
3"""Convert a OWS common 1.1.0 compliant ServiceMetadata XML tree into
4WMS 1.3.0 compliant wms:Service XML.
5
6@var c.ows_c: A ows:Capabilities XML tree node containing
7    ServiceIdentification and ServiceProvider children.
8"""
9
10from ows_server.lib.wms_capabilities import WmsOwsAdapter
11?>
12<WMS_Capabilities xmlns:py="http://purl.org/kid/ns#"
13                  version="1.3.0"
14                  xmlns="http://www.opengis.net/wms"
15                  xmlns:xlink="http://www.w3.org/1999/xlink"
16                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17                  xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_2_0.xsd">
18  <Service py:def="wms_service">
19    <?python m = WmsOwsAdapter(c.ows_c) ?>
20
21    <Name>WMS</Name>
22    <Title py:if="m.title" py:content="m.title"/>
23    <Abstract py:for="a in m.abstracts" py:content="a"/>
24    <KeywordList py:if="m.keywords">
25      <Keyword py:for="k in m.keywords" py:content="k"/>
26    </KeywordList>
27    <OnlineResource py:if="m.onlineResource"
28                    xlink:type="simple"
29                    xlink:href="${m.onlineResource}"/>
30    <ContactInformation>
31      <?python ci = m.contactInformation ?>
32      <ContactPersonPrimary>
33        <ContactPerson py:content="ci['person']"/>
34        <ContactOrganization py:content="ci['organization']"/>
35      </ContactPersonPrimary>
36      <ContactAddress>
37        <Address py:for="a in ci['address']" py:content="a"/>
38        <City py:content="ci['city']"/>
39        <StateOrProvince py:content="ci['state_or_province']"/>
40        <PostCode py:content="ci['postcode']"/>
41        <Country py:content="ci['country']"/>
42      </ContactAddress>
43      <ContactVoiceTelephone py:content="ci['telephone']"/>
44      <ContactFacsimile py:content="ci['fax']"/>
45      <ContactElectronicMailAddress py:content="ci['email']"/>
46    </ContactInformation>
47    <Fees py:content="m.fees"/>
48    <AccessConstraints py:content="m.accessConstraints"/>
49  </Service>
50</WMS_Capabilities>
Note: See TracBrowser for help on using the repository browser.