Ignore:
Timestamp:
17/05/07 14:48:29 (12 years ago)
Author:
spascoe
Message:

Implemented all metadata fields in WMS_Capabilities/Service.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/wms_service_metadata.kid

    r2486 r2493  
    88""" 
    99 
    10 # Namespaces 
    11 ows_ns = 'http://www.opengis.net/ows/1.1' 
    12  
    13 # ElementTree utilities 
    14 def qname(ns, tag): 
    15     return '{%s}%s' % (ns, tag) 
    16 def path(items): 
    17     return '/'.join(path) 
     10from ows_server.lib.wms_capabilities import WmsOwsAdapter 
    1811?> 
    1912<WMS_Capabilities version="1.3.0" 
     
    2417                  xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_2_0.xsd"> 
    2518 
    26 <?python 
    27 # Data extracted from ows_c 
    28 title_e = ows_c.find(path([qname(ows_ns, 'ServiceIdentification'), 
    29                            qname(ows_ns, 'Title')])) 
    30 abstrat_es = ows_c.findall(path([qname(ows_ns, 'ServiceIdentification'), 
    31                                  qname(ows_ns, 'Abstract')])) 
    32 ?> 
     19<?python m = WmsOwsAdapter(ows_c) ?> 
    3320 
    3421  <Service> 
    3522    <Name>WMS</Name> 
    36     <Title py:if="title_e" py:content="title.text"/> 
    37     <Abstract py:for="e in abstract_e" py:content="e.text"/> 
     23    <Title py:if="m.title" py:content="m.title"/> 
     24    <Abstract py:for="a in m.abstracts" py:content="a"/> 
     25    <KeywordList py:if="m.keywords"> 
     26      <Keyword py:for="k in m.keywords" py:content="k"/> 
     27    </KeywordList> 
     28    <OnlineResource py:if="m.onlineResource" 
     29                    xlink:type="simple" 
     30                    xlink:href="${m.onlineResource}"/> 
     31    <ContactInformation> 
     32      <?python ci = m.contactInformation ?> 
     33      <ContactPersonPrimary> 
     34        <ContactPerson py:content="ci['person']"/> 
     35        <ContactOrganization py:content="ci['organization']"/> 
     36      </ContactPersonPrimary> 
     37      <ContactAddress> 
     38        <Address py:for="a in ci['address']" py:content="a"/> 
     39        <City py:content="ci['city']"/> 
     40        <StateOrProvince py:content="ci['state_or_province']"/> 
     41        <PostCode py:content="ci['postcode']"/> 
     42        <Country py:content="ci['country']"/> 
     43      </ContactAddress> 
     44      <ContactVoiceTelephone py:content="ci['telephone']"/> 
     45      <ContactFacsimile py:content="ci['fax']"/> 
     46      <ContactElectronicMailAddress py:content="ci['email']"/> 
     47    </ContactInformation> 
     48    <Fees py:content="m.fees"/> 
     49    <AccessConstraints py:content="m.accessConstraints"/> 
    3850  </Service> 
    3951</WMS_Capabilities> 
Note: See TracChangeset for help on using the changeset viewer.