1use crate::model::{
6 annotations::{AnnotationOnlyBody, HasAnnotations},
7 modules::Module,
8 HasBody,
9};
10use std::str::FromStr;
11
12pub const MODULE_NAME: &str = "dc";
17pub const MODULE_URL: &str = "http://purl.org/dc/elements/1.1/";
18
19pub const CONTRIBUTOR: &str = "contributor";
20pub const COVERAGE: &str = "coverage";
21pub const CREATOR: &str = "creator";
22pub const DATE: &str = "date";
23pub const DESCRIPTION: &str = "description";
24pub const FORMAT: &str = "format";
25pub const IDENTIFIER: &str = "identifier";
26pub const LANGUAGE: &str = "language";
27pub const PUBLISHER: &str = "publisher";
28pub const RELATION: &str = "relation";
29pub const RIGHTS: &str = "rights";
30pub const SOURCE: &str = "source";
31pub const SUBJECT: &str = "subject";
32pub const TITLE: &str = "title";
33pub const TYPE: &str = "type";
34
35module_function!(|| {
40 let module_uri: url::Url = url::Url::parse(MODULE_URL).unwrap();
41
42 module!(
43 id!(unchecked dc), module_uri ; call |module: Module|
44 module.with_imports([import_statement!(
45 id!(unchecked dct),
46 id!(unchecked rdf),
47 id!(unchecked rdfs),
48 id!(unchecked skos)
49 )])
50 .with_annotations([
51 annotation!(id!(unchecked dct:modified), v!(id!(unchecked xsd:date), "2012-06-14")),
52 annotation!(id!(unchecked publisher), url!("http://purl.org/dc/aboutdcmi#DCMI")),
53 annotation!(id!(unchecked title), v!("Dublin Core Metadata Element Set, Version 1.1")),
54 ])
55 .with_definitions([
56 rdf!(
57 id!(unchecked contributor) ;
58 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
59 call |body: AnnotationOnlyBody|
60 body.with_annotations([
61 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
62 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Contributor"@en)),
63 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
64 annotation!(id!(unchecked rdfs:comment), rdf_str!("An entity responsible for making contributions to the resource."@en)),
65 annotation!(id!(unchecked description), rdf_str!("The guidelines for using names of persons or organizations as creators also apply to contributors. Typically, the name of a Contributor should be used to indicate the entity."@en)),
66 ])).into(),
67 rdf!(
68 id!(unchecked coverage) ;
69 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
70 call |body: AnnotationOnlyBody|
71 body.with_annotations([
72 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
73 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Coverage"@en)),
74 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
75 annotation!(id!(unchecked rdfs:comment), rdf_str!("The spatial or temporal topic of the resource, spatial applicability of the resource, or jurisdiction under which the resource is relevant."@en)),
76 annotation!(id!(unchecked description), rdf_str!("Spatial topic and spatial applicability may be a named place or a location specified by its geographic coordinates. Temporal topic may be a named period, date, or date range. A jurisdiction may be a named administrative entity or a geographic place to which the resource applies. Recommended practice is to use a controlled vocabulary such as the Getty Thesaurus of Geographic Names [[TGN](https://www.getty.edu/research/tools/vocabulary/tgn/index.html)]. Where appropriate, named places or time periods may be used in preference to numeric identifiers such as sets of coordinates or date ranges."@en)),
77 ])).into(),
78 rdf!(
79 id!(unchecked creator) ;
80 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
81 call |body: AnnotationOnlyBody|
82 body.with_annotations([
83 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
84 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Creator"@en)),
85 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
86 annotation!(id!(unchecked rdfs:comment), rdf_str!("An entity primarily responsible for making the resource."@en)),
87 annotation!(id!(unchecked description), rdf_str!("Examples o tor include a person, an organization, or a service. Typically, the name of a Creator should to indicate the entity."@en)),
88 ])).into(),
89 rdf!(
90 id!(unchecked date) ;
91 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
92 call |body: AnnotationOnlyBody|
93 body.with_annotations([
94 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
95 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Date"@en)),
96 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
97 annotation!(id!(unchecked rdfs:comment), rdf_str!("A point or period of time associated with an event in the lifecycle of the resource."@en)),
98 annotation!(id!(unchecked description), rdf_str!("Date may be used to express temporal information at any level of granularity. Recommended practice is to express the date, date/time, or period of time according to ISO 8601-1 [[ISO 8601-1](https://www.iso.org/iso-8601-date-and-time-format.html)] or a published profile of the ISO standard, such as the W3C Note on Date and Time Formats [[W3CDTF](https://www.w3.org/TR/NOTE-datetime)] or the Extended Date/Time Format Specification [[EDTF](http://www.loc.gov/standards/datetime/)]. If the full date is unknown, month and year (YYYY-MM) or just year (YYYY) may be used. Date ranges may be specified using ISO 8601 period of time specification in which start and end dates are separated by a '/' (slash) character. Either the start or end date may be missing."@en)),
99 ])).into(),
100 rdf!(
101 id!(unchecked description) ;
102 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
103 call |body: AnnotationOnlyBody|
104 body.with_annotations([
105 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
106 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Description"@en)),
107 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
108 annotation!(id!(unchecked rdfs:comment), rdf_str!("An account of the resource."@en)),
109 annotation!(id!(unchecked description), rdf_str!("Description may include but is not limited to: an abstract, a table of contents, a graphical representation, or a free-text account of the resource."@en)),
110 ])).into(),
111 rdf!(
112 id!(unchecked format) ;
113 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
114 call |body: AnnotationOnlyBody|
115 body.with_annotations([
116 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
117 annotation!(id!(unchecked skos:prefLabel), rdf_str!("format"@en)),
118 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
119 annotation!(id!(unchecked rdfs:comment), rdf_str!("The file format, physical medium, or dimensions of the resource."@en)),
120 annotation!(id!(unchecked description), rdf_str!("Recommended practice is to use a controlled vocabulary where available. For example, for file formats one could use the list of Internet Media Types [[MIME](https://www.iana.org/assignments/media-types/media-types.xhtml)]."@en)),
121 ])).into(),
122 rdf!(
123 id!(unchecked identifier) ;
124 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
125 call |body: AnnotationOnlyBody|
126 body.with_annotations([
127 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
128 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Identifier"@en)),
129 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
130 annotation!(id!(unchecked rdfs:comment), rdf_str!("An unambiguous reference to the resource within a given context."@en)),
131 annotation!(id!(unchecked description), rdf_str!("Recommended practice is to identify the resource by means of a string conforming to an identification system."@en)),
132 ])).into(),
133 rdf!(
134 id!(unchecked language) ;
135 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
136 call |body: AnnotationOnlyBody|
137 body.with_annotations([
138 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
139 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Language"@en)),
140 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
141 annotation!(id!(unchecked rdfs:comment), rdf_str!("A language of the resource."@en)),
142 annotation!(id!(unchecked description), rdf_str!("Recommended practice is to use either a non-literal value representing a language from a controlled vocabulary such as ISO 639-2 or ISO 639-3, or a literal value consisting of an IETF Best Current Practice 47 [[IETF-BCP47](https://tools.ietf.org/html/bcp47)] language tag."@en)),
143 ])).into(),
144 rdf!(
145 id!(unchecked publisher) ;
146 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
147 call |body: AnnotationOnlyBody|
148 body.with_annotations([
149 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
150 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Publisher"@en)),
151 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
152 annotation!(id!(unchecked rdfs:comment), rdf_str!("An entity responsible for making the resource available."@en)),
153 annotation!(id!(unchecked description), rdf_str!("Examples of a Publisher include a person, an organization, or a service. Typically, the name of a Publisher should be used to indicate the entity."@en)),
154 ])).into(),
155 rdf!(
156 id!(unchecked relation) ;
157 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
158 call |body: AnnotationOnlyBody|
159 body.with_annotations([
160 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
161 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Relation"@en)),
162 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
163 annotation!(id!(unchecked rdfs:comment), rdf_str!("A related resource."@en)),
164 annotation!(id!(unchecked description), rdf_str!("Recommended practice is to identify the related resource by means of a URI. If this is not possible or feasible, a string conforming to a formal identification system may be provided."@en)),
165 ])).into(),
166 rdf!(
167 id!(unchecked rights) ;
168 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
169 call |body: AnnotationOnlyBody|
170 body.with_annotations([
171 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
172 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Rights"@en)),
173 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
174 annotation!(id!(unchecked rdfs:comment), rdf_str!("Information about rights held in and over the resource."@en)),
175 annotation!(id!(unchecked description), rdf_str!("Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights."@en)),
176 ])).into(),
177 rdf!(
178 id!(unchecked source) ;
179 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
180 call |body: AnnotationOnlyBody|
181 body.with_annotations([
182 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
183 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Source"@en)),
184 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
185 annotation!(id!(unchecked rdfs:comment), rdf_str!("A related resource from which the described resource is derived."@en)),
186 annotation!(id!(unchecked description), rdf_str!("The described resource may be derived from the related resource in whole or in part. Recommended best practice is to identify the related resource by means of a string conforming to a formal identification system."@en)),
187 ])).into(),
188 rdf!(
189 id!(unchecked subject) ;
190 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
191 call |body: AnnotationOnlyBody|
192 body.with_annotations([
193 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
194 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Subject"@en)),
195 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
196 annotation!(id!(unchecked rdfs:comment), rdf_str!("The topic of the resource."@en)),
197 annotation!(id!(unchecked description), rdf_str!("Typically, the subject will be represented using keywords, key phrases, or classification codes. Recommended best practice is to use a controlled vocabulary."@en)),
198 ])).into(),
199 rdf!(
200 id!(unchecked title) ;
201 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
202 call |body: AnnotationOnlyBody|
203 body.with_annotations([
204 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
205 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Title"@en)),
206 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
207 annotation!(id!(unchecked rdfs:comment), rdf_str!("A name given to the resource."@en)),
208 ])).into(),
209 rdf!(
210 id!(unchecked type) ;
211 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
212 call |body: AnnotationOnlyBody|
213 body.with_annotations([
214 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dc)),
215 annotation!(id!(unchecked skos:prefLabel), rdf_str!("Type"@en)),
216 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "1999-07-02")),
217 annotation!(id!(unchecked rdfs:comment), rdf_str!("The nature or genre of the resource."@en)),
218 annotation!(id!(unchecked description), rdf_str!("Recommended practice is to use a controlled vocabulary such as the DCMI Type Vocabulary [[DCMI-TYPE](http://dublincore.org/documents/dcmi-type-vocabulary/)]. To describe the file format, physical medium, or dimensions of the resource, use the Format element."@en)),
219 ])).into(),
220 ])
221 )
222});