root/tags/rel0_62/templates/node_rdf.tt

Revision 1133, 3.1 kB (checked in by earle, 12 months ago)

Add map link to RDF output. Closes #26.

Line 
1<?xml version="1.0"?>
2<rdf:RDF
3  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4  xmlns:dc="http://purl.org/dc/elements/1.1/"
5  xmlns:dcterms="http://purl.org/dc/terms/"
6  xmlns:foaf="http://xmlns.com/foaf/0.1/"
7  xmlns:wiki="http://purl.org/rss/1.0/modules/wiki/"
8  xmlns:chefmoz="http://chefmoz.org/rdf/elements/1.0/"
9  xmlns:wn="http://xmlns.com/wordnet/1.6/"
10  xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
11  xmlns:os="http://downlode.org/Code/RDF/Ordnance_Survey/schema/1#"
12  xmlns:owl="http://www.w3.org/2002/07/owl#"
13  xmlns:map="http://www.daml.org/2001/06/map/map-ont#"
14  xmlns="http://www.w3.org/2000/10/swap/pim/contact#"
15>
16
17  <rdf:Description rdf:about="">
18    <dc:title>[% site_name %]: [% node_name %]</dc:title>
19    <dc:date>[% timestamp %]</dc:date>
20    <dcterms:modified>[% timestamp %]</dcterms:modified>
21
22    [% FOREACH contributor = contributors.values %]
23    <dc:contributor>
24      <foaf:Person rdf:ID="[% contributor.user_id %]">
25        <foaf:nick>[% contributor.username %]</foaf:nick>
26      </foaf:Person>
27    </dc:contributor>
28    [% END %]
29
30    <dc:source rdf:resource="[% node_uri %]" />
31    <wiki:version>[% version %]</wiki:version>
32    <foaf:topic rdf:resource="#obj" />
33  </rdf:Description>
34
35  <[% obj_type %] rdf:ID="obj" dc:title="[% node_name %]">
36
37    [% IF summary %]
38      <dc:description>[% summary %]</dc:description>
39    [% END %]
40
41    [% IF categories %]
42      <!-- categories -->
43
44      [% FOREACH category = categories %]
45        <dc:subject>[% category.name %]</dc:subject>
46      [% END %]
47    [% END %]
48
49    [% IF is_geospatial %]
50      <!-- address and geospatial data -->
51
52      [% IF address %]
53        <address>[% address %]</address>
54      [% END %]
55      [% IF city %]
56        <city>[% city %]</city>
57      [% END %]
58      [% IF postcode %]
59        <postalCode>[% postcode %]</postalCode>
60      [% END %]
61      [% IF country %]
62        <country>[% country %]</country>
63      [% END %]
64
65      [% IF map_link %]
66        <foaf:page>
67          <map:Map rdf:about="[% map_link %]" />
68        </foaf:page>
69      [% END %]
70
71      [% FOREACH locale = locales %]
72        <foaf:based_near>
73          <wn:Neighborhood rdf:ID="[% locale.id %]">
74            <dc:title>[% locale.name %]</dc:title>
75          </wn:Neighborhood>
76        </foaf:based_near>
77      [% END %]
78
79      [% IF wgs84_lat AND wgs84_long %]
80        <geo:lat>[% wgs84_lat %]</geo:lat>
81        <geo:long>[% wgs84_long %]</geo:long>
82      [% END %]
83
84      [% IF os_x AND os_y %]
85        <os:x>[% os_x %]</os:x>
86        <os:y>[% os_y %]</os:y>
87      [% END %]
88
89    [% END %]
90
91    [% IF phone OR fax OR website OR opening_hours_text %]
92      <!-- contact information -->
93      [% IF phone %]
94        <phone>[% phone %]</phone>
95      [% END %]
96      [% IF fax %]
97        <fax>[% fax %]</fax>
98      [% END %]
99      [% IF website %]
100        <foaf:homepage rdf:resource="[% website %]" />
101      [% END %]
102      [% IF opening_hours_text %]
103        <chefmoz:Hours>[% opening_hours_text %]</chefmoz:Hours>
104      [% END %]
105    [% END %]
106
107    [% IF redirect %]
108      <owl:sameAs rdf:resource="[% redirect %]" />
109    [% END %]
110
111  </[% obj_type %]>
112</rdf:RDF>
Note: See TracBrowser for help on using the browser.