1use crate::model::{
6 annotations::{AnnotationOnlyBody, HasAnnotations},
7 modules::Module,
8 HasBody,
9};
10use std::str::FromStr;
11
12pub const MODULE_NAME: &str = "dcam";
17pub const MODULE_URL: &str = "http://purl.org/dc/dcam/";
18
19pub const VOCABULARY_ENCODING_SCHEME: &str = "VocabularyEncodingScheme";
20pub const DOMAIN_INCLUDES: &str = "domainIncludes";
21pub const MEMBER_OF: &str = "memberOf";
22pub const RANGE_INCLUDES: &str = "rangeIncludes";
23
24module_function!(|| {
29 let module_uri: url::Url = url::Url::parse(MODULE_URL).unwrap();
30
31 module!(
32 id!(unchecked dcam), module_uri ; call |module: Module|
33 module.with_imports([import_statement!(
34 id!(unchecked dct),
35 id!(unchecked rdf),
36 id!(unchecked rdfs),
37 )])
38 .with_annotations([
39 annotation!(id!(unchecked dct:modified), v!(id!(unchecked xsd:date), "2012-06-14")),
40 annotation!(id!(unchecked publisher), url!("http://purl.org/dc/aboutdcmi#DCMI")),
41 annotation!(id!(unchecked title), v!("Metadata terms for vocabulary description")),
42 ])
43 .with_definitions([
44 rdf!(
45 id!(unchecked VocabularyEncodingScheme) ; class ;
46 call |body: AnnotationOnlyBody|
47 body.with_annotations([
48 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dcam)),
49 annotation!(id!(unchecked rdfs:label), rdf_str!("Vocabulary Encoding Scheme"@en)),
50 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "2008-01-14")),
51 annotation!(id!(unchecked rdfs:comment), rdf_str!("An enumerated set of resources."@en)),
52 annotation!(id!(unchecked rdfs:seeAlso), url!("https://www.dublincore.org/specifications/dublin-core/2007/06/04/abstract-model/")),
53 ])).into(),
54 rdf!(
55 id!(unchecked domainIncludes) ; property ;
56 call |body: AnnotationOnlyBody|
57 body.with_annotations([
58 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dcam)),
59 annotation!(id!(unchecked rdfs:label), rdf_str!("Domain Includes"@en)),
60 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "2020-01-20")),
61 annotation!(id!(unchecked rdfs:comment), rdf_str!("A suggested class for subjects of this property."@en)),
62 ])).into(),
63 rdf!(
64 id!(unchecked memberOf) ; property ;
65 call |body: AnnotationOnlyBody|
66 body.with_annotations([
67 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dcam)),
68 annotation!(id!(unchecked rdfs:label), rdf_str!("Member Of"@en)),
69 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "2008-01-14")),
70 annotation!(id!(unchecked rdfs:comment), rdf_str!("A relationship between a resource and a vocabulary encoding scheme which indicates that the resource is a member of a set."@en)),
71 annotation!(id!(unchecked rdfs:seeAlso), url!("https://www.dublincore.org/specifications/dublin-core/2007/06/04/abstract-model/")),
72 ])).into(),
73 rdf!(
74 id!(unchecked rangeIncludes) ;
75 property id!(unchecked rdf:Property), id!(unchecked owl:AnnotationProperty) ;
76 call |body: AnnotationOnlyBody|
77 body.with_annotations([
78 annotation!(id!(unchecked rdfs:isDefinedBy), id!(unchecked dcam)),
79 annotation!(id!(unchecked rdfs:label), rdf_str!("Range Includes"@en)),
80 annotation!(id!(unchecked dct:issued), v!(id!(unchecked xsd:date), "2020-01-20")),
81 annotation!(id!(unchecked rdfs:comment), rdf_str!("A suggested class for values of this property."@en)),
82 ])).into(),
83 ])
84 )
85});