Coverage for portality / models / v1 / shared_structs.py: 100%
3 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-04 09:41 +0100
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-04 09:41 +0100
1from portality import constants
3SHARED_BIBJSON = {
4 "objects" : [
5 "bibjson"
6 ],
7 "structs" : {
8 "bibjson" : {
9 "fields" : {
10 "title" : {"coerce" : "unicode"},
11 },
12 "lists" : {
13 "identifier" : {"contains" : "object"},
14 "keywords" : {"contains" : "field", "coerce" : "unicode"},
15 "link" : {"contains" : "object"},
16 "subject" : {"contains" : "object"},
17 },
18 "structs" : {
19 "identifier" : {
20 "fields" : {
21 "type" : {"coerce" : "unicode_lower", "allowed_values": constants.ALLOWED_ARTICLE_IDENT_TYPES},
22 "id" : {"coerce" : "unicode"}
23 }
24 },
25 "link" : {
26 "fields" : {
27 "type" : {"coerce" : "unicode"},
28 "url" : {"coerce" : "unicode"},
29 "content_type" : {"coerce" : "unicode"}
30 }
31 },
32 "subject" : {
33 "fields" : {
34 "scheme" : {"coerce" : "unicode"},
35 "term" : {"coerce" : "unicode"},
36 "code" : {"coerce" : "unicode"}
37 }
38 }
39 }
40 }
41 }
42}
44JOURNAL_BIBJSON_EXTENSION = {
45 "objects" : [
46 "bibjson"
47 ],
48 "structs" : {
49 "bibjson" : {
50 "fields" : {
51 "active" : {"coerce" : "bool"},
52 "alternative_title" : {"coerce" : "unicode"},
53 "country" : {"coerce" : "unicode"},
54 "publisher" : {"coerce" : "unicode"},
55 "provider" : {"coerce" : "unicode"},
56 "institution" : {"coerce" : "unicode"},
57 "apc_url" : {"coerce" : "unicode"},
58 "submission_charges_url" : {"coerce" : "unicode"},
59 "allows_fulltext_indexing" : {"coerce" : "bool"},
60 "publication_time" : {"coerce" : "integer"},
61 "author_pays" : {"coerce" : "unicode"},
62 "author_pays_url" : {"coerce" : "unicode"},
63 "discontinued_date" : {"coerce" : "bigenddate"}
64 },
65 "lists" : {
66 "language" : {"contains" : "field", "coerce" : "unicode_upper"},
67 "deposit_policy" : {"contains" : "field", "coerce" : "unicode"},
68 "persistent_identifier_scheme" : {"contains" : "field", "coerce" : "unicode"},
69 "format" : {"contains" : "field", "coerce" : "unicode"},
70 "license" : {"contains" : "object"},
71 "is_replaced_by" : {"contains" : "field", "coerce" : "unicode"},
72 "replaces" : {"contains" : "field", "coerce" : "unicode"}
73 },
74 "objects" : [
75 "oa_start",
76 "oa_end",
77 "apc",
78 "submission_charges",
79 "archiving_policy",
80 "editorial_review",
81 "plagiarism_detection",
82 "article_statistics",
83 "author_copyright",
84 "author_publishing_rights"
85 ],
87 "structs" : {
88 "oa_start" : {
89 "fields" : {
90 "year" : {"coerce" : "integer"},
91 "volume" : {"coerce" : "unicode"},
92 "number" : {"coerce" : "unicode"}
93 }
94 },
95 "oa_end" : {
96 "fields" : {
97 "year" : {"coerce" : "integer"},
98 "volume" : {"coerce" : "unicode"},
99 "number" : {"coerce" : "unicode"}
100 }
101 },
102 "apc" : {
103 "fields" : {
104 "currency" : {"coerce" : "unicode"},
105 "average_price" : {"coerce" : "integer"}
106 }
107 },
108 "submission_charges" : {
109 "fields" : {
110 "currency" : {"coerce" : "unicode"},
111 "average_price" : {"coerce" : "integer"}
112 }
113 },
114 "archiving_policy" : {
115 "fields" : {
116 "other" : {"coerce" : "unicode"},
117 "nat_lib" : {"coerce" : "unicode"},
118 "url" : {"coerce" : "unicode"}
119 },
120 "lists" : {
121 "known" : {"contains" : "field", "coerce" : "unicode"}
122 }
123 },
124 "editorial_review" : {
125 "fields" : {
126 "process" : {"coerce" : "unicode"},
127 "url" : {"coerce" : "unicode"}
128 }
129 },
130 "plagiarism_detection" : {
131 "fields" : {
132 "detection" : {"coerce" : "bool"},
133 "url" : {"coerce" : "unicode"}
134 }
135 },
136 "article_statistics" : {
137 "fields" : {
138 "statistics" : {"coerce" : "bool"},
139 "url" : {"coerce" : "unicode"}
140 }
141 },
142 "author_copyright" : {
143 "fields" : {
144 "copyright" : {"coerce" : "unicode"},
145 "url" : {"coerce" : "unicode"}
146 }
147 },
148 "author_publishing_rights" : {
149 "fields" : {
150 "publishing_rights" : {"coerce" : "unicode"},
151 "url" : {"coerce" : "unicode"}
152 }
153 },
154 "license" : {
155 "fields" : {
156 "title" : {"coerce" : "unicode"},
157 "type" : {"coerce" : "unicode"},
158 "url" : {"coerce" : "unicode"},
159 "version" : {"coerce" : "unicode"},
160 "open_access" : {"coerce" : "bool"},
161 "BY" : {"coerce" : "bool"},
162 "NC" : {"coerce" : "bool"},
163 "ND" : {"coerce" : "bool"},
164 "SA" : {"coerce" : "bool"},
165 "embedded" : {"coerce" : "bool"},
166 "embedded_example_url" : {"coerce" : "unicode"}
167 }
168 }
169 }
170 }
171 }
172}