disable harvesting fields, fix spatial XML metadata link
[ckanext-agls.git] / ckanext / agls / templates / package / read.rdf
1 <?xml version="1.0" encoding="utf-8"?>
2 <rdf:RDF
3 xmlns:py="http://genshi.edgewall.org/"
4 xmlns:foaf="http://xmlns.com/foaf/0.1/"
5 xmlns:owl="http://www.w3.org/2002/07/owl#"
6 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:dcat="http://www.w3.org/ns/dcat#"
9 xmlns:dcam="http://purl.org/dc/dcam/"
10 xmlns:aglsterms="http://www.agls.gov.au/agls/terms/"
11 xmlns:agentterms="http://www.agls.gov.au/agls/agentterms/"
12 xmlns:availterms="http://www.agls.gov.au/agls/availterms/"
13 xmlns:adminterms="http://www.agls.gov.au/agls/adminterms/"
14 xmlns:dct="http://purl.org/dc/terms/"
15 >
16 <dcat:Dataset rdf:about="${ h.url_for(controller='package',action='read',id=c.pkg_dict['name'], qualified=True)}">
17 <dct:identifier>${c.pkg_dict['name']}</dct:identifier>
18 <dct:title>${c.pkg_dict['title']}</dct:title>
19 <dct:landingPage
20 rdf:resource="${ h.url_for(controller='package',action='read',id=c.pkg_dict['name'], qualified=True) }"/>
21 <owl:sameAs rdf:resource="urn:uuid:${c.pkg_dict['id']}"/>
22 <dct:type>Dataset</dct:type>
23 <dct:description>${c.pkg_dict['notes']}</dct:description>
24 <dct:issued>${c.pkg_dict['metadata_created']}</dct:issued>
25 <dct:modified>${c.pkg_dict['metadata_modified']}</dct:modified>
26
27 <py:choose>
28 <py:when test="c.pkg_dict.get('license_url',None)">
29 <dct:license rdf:resource="${c.pkg_dict['license_url']}"/>
30 <dct:rights rdf:resource="${c.pkg_dict['license_url']}"/>
31 </py:when>
32 <py:otherwise>
33 <dct:license>${c.pkg_dict['license_id']}</dct:license>
34 <dct:rights>"${c.pkg_dict['license_id']}"</dct:rights>
35 </py:otherwise>
36 </py:choose>
37 <py:for each="tag_dict in c.pkg_dict.get('tags',[])">
38 <dcat:keyword>${ tag_dict["name"] }</dcat:keyword>
39 </py:for>
40
41
42 <py:for each="rsc_dict in c.pkg_dict['resources']">
43 <dcat:distribution>
44 <dcat:Distribution>
45 <dct:title>${rsc_dict.get('name')}</dct:title>
46 <owl:sameAs rdf:resource="urn:uuid:${rsc_dict.get('id')}"/>
47 <dct:description>${rsc_dict.get('description')}</dct:description>
48 <dcat:accessURL rdf:resource="${ rsc_dict.get('url') }"/>
49 <dct:created>${rsc_dict.get('created')}</dct:created>
50 <dct:modified>${rsc_dict.get('revision_timestamp')}</dct:modified>
51 <dcat:byteSize py:if="rsc_dict.get('size')">${rsc_dict.get('size')}</dcat:byteSize>
52 <dcat:mediaType py:if="rsc_dict.get('mimetype')">${rsc_dict.get('mimetype')}</dcat:mediaType>
53 <dct:extent py:if="rsc_dict.get('size')">${rsc_dict.get('size')} bytes</dct:extent>
54 <dct:format py:if="rsc_dict.get('format')">
55 <dct:IMT>
56 <rdf:value>${rsc_dict.get('format')}</rdf:value>
57 <rdfs:label>${rsc_dict.get('format')}</rdfs:label>
58 </dct:IMT>
59 </dct:format>
60 <dct:title py:if="rsc_dict.get('name')">${rsc_dict.get('name')}</dct:title>
61 </dcat:Distribution>
62 </dcat:distribution>
63 </py:for>
64
65
66 <!-- data.gov.au specific stuff below this line -->
67 <dct:publisher py:if="c.pkg_dict.get('organization', None)">
68 <rdf:Description>
69 <foaf:name>${ c.pkg_dict['organization']['title'] }</foaf:name>
70 </rdf:Description>
71 </dct:publisher>
72 <dct:creator py:if="c.pkg_dict.get('organization', None)">
73 <rdf:Description>
74 <foaf:name>${ c.pkg_dict['organization']['title'] }</foaf:name>
75 </rdf:Description>
76 </dct:creator>
77 <dct:contributor>
78 <rdf:Description>
79 <foaf:name>${h.get_last_active_user(c.pkg_dict['id'])["display_name"]}</foaf:name>
80 <foaf:mbox py:if="h.get_last_active_user(c.pkg_dict['id']).get('email', None)"
81 rdf:resource="mailto:${h.get_last_active_user(c.pkg_dict['id'])['email']}"/>
82 </rdf:Description>
83 </dct:contributor>
84
85 <py:for each="extra_dict in c.pkg_dict.get('extras',[])">
86 <dct:relation>
87 <rdf:Description>
88 <rdfs:label>${extra_dict.get('key','')}</rdfs:label>
89 <rdf:value>${extra_dict.get('value','')}</rdf:value>
90 </rdf:Description>
91 </dct:relation>
92 </py:for>
93 <dct:language>en</dct:language>
94 <foaf:homepage
95 rdf:resource="${ h.url_for(controller='package',action='read',id=c.pkg_dict['name'], qualified=True)}"/>
96 <dcat:contactPoint py:if="c.pkg_dict.get('contact_point')">${c.pkg_dict.contact_point }</dcat:contactPoint>
97 <py:choose>
98 <py:when test="c.pkg_dict.get('spatial',None)">
99 <dct:spatial py:if="c.pkg_dict.get('spatial')">${ c.pkg_dict.spatial }</dct:spatial>
100 </py:when>
101 <py:otherwise>
102 <dct:spatial py:if="c.pkg_dict.get('spatial_coverage')">${ c.pkg_dict.spatial_coverage }</dct:spatial>
103 </py:otherwise>
104 </py:choose>
105 <aglsterms:AglsJuri py:if="c.pkg_dict.get('jurisdiction')">${ c.pkg_dict.jurisdiction }</aglsterms:AglsJuri>
106 <dct:temporal py:if="c.pkg_dict.get('temporal_coverage')">${ c.pkg_dict.get('temporal_coverage') }</dct:temporal>
107 <dct:relation py:if="c.pkg_dict.get('data_state')">
108 <rdf:Description>
109 <rdfs:label>Data State</rdfs:label>
110 <rdf:value>${ c.pkg_dict.get('data_state') }</rdf:value>
111 </rdf:Description>
112 </dct:relation>
113 <dct:relation py:if="c.pkg_dict.get('update_freq')">
114 <rdf:Description>
115 <rdfs:label>Update Frequency</rdfs:label>
116 <rdf:value>${ c.pkg_dict.get('update_freq') }</rdf:value>
117 </rdf:Description>
118 </dct:relation>
119 <dct:relation py:if="c.pkg_dict.get('agency_program')">
120 <rdf:Description>
121 <rdfs:label>Agency Program</rdfs:label>
122 <rdf:value>${ c.pkg_dict.get('agency_program') }</rdf:value>
123 </rdf:Description>
124 </dct:relation>
125 <dct:relation py:if="c.pkg_dict.get('granularity')">
126 <rdf:Description>
127 <rdfs:label>Data Granularity</rdfs:label>
128 <rdf:value>${ c.pkg_dict.get('granularity') }</rdf:value>
129 </rdf:Description>
130 </dct:relation>
131 </dcat:Dataset>
132 </rdf:RDF>
133