oarepo-runtime 1.10.3__py3-none-any.whl → 2.0.0.dev3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oarepo_runtime/__init__.py +24 -0
- oarepo_runtime/api.py +111 -0
- oarepo_runtime/cli/__init__.py +10 -21
- oarepo_runtime/cli/search.py +34 -0
- oarepo_runtime/config.py +86 -13
- oarepo_runtime/ext.py +64 -82
- oarepo_runtime/proxies.py +21 -5
- oarepo_runtime/records/__init__.py +11 -50
- oarepo_runtime/records/drafts.py +24 -18
- oarepo_runtime/records/mapping.py +84 -0
- oarepo_runtime/records/pid_providers.py +43 -7
- oarepo_runtime/records/systemfields/__init__.py +15 -33
- oarepo_runtime/records/systemfields/mapping.py +41 -24
- oarepo_runtime/records/systemfields/publication_status.py +59 -0
- oarepo_runtime/services/__init__.py +12 -0
- oarepo_runtime/services/config/__init__.py +15 -21
- oarepo_runtime/services/config/link_conditions.py +69 -75
- oarepo_runtime/services/config/permissions.py +62 -0
- oarepo_runtime/services/records/__init__.py +14 -1
- oarepo_runtime/services/records/links.py +21 -11
- oarepo_runtime/services/records/mapping.py +42 -0
- oarepo_runtime/services/results.py +98 -109
- oarepo_runtime/services/schema/__init__.py +12 -44
- oarepo_runtime/services/schema/i18n.py +47 -22
- oarepo_runtime/services/schema/i18n_ui.py +61 -24
- {oarepo_runtime-1.10.3.dist-info → oarepo_runtime-2.0.0.dev3.dist-info}/METADATA +9 -21
- oarepo_runtime-2.0.0.dev3.dist-info/RECORD +30 -0
- {oarepo_runtime-1.10.3.dist-info → oarepo_runtime-2.0.0.dev3.dist-info}/WHEEL +1 -2
- oarepo_runtime-2.0.0.dev3.dist-info/entry_points.txt +5 -0
- oarepo_runtime/cli/assets.py +0 -145
- oarepo_runtime/cli/base.py +0 -25
- oarepo_runtime/cli/cf.py +0 -15
- oarepo_runtime/cli/check.py +0 -167
- oarepo_runtime/cli/configuration.py +0 -51
- oarepo_runtime/cli/fixtures.py +0 -167
- oarepo_runtime/cli/index.py +0 -272
- oarepo_runtime/cli/permissions/__init__.py +0 -6
- oarepo_runtime/cli/permissions/base.py +0 -26
- oarepo_runtime/cli/permissions/evaluate.py +0 -63
- oarepo_runtime/cli/permissions/list.py +0 -239
- oarepo_runtime/cli/permissions/search.py +0 -121
- oarepo_runtime/cli/validate.py +0 -150
- oarepo_runtime/datastreams/__init__.py +0 -38
- oarepo_runtime/datastreams/asynchronous.py +0 -247
- oarepo_runtime/datastreams/catalogue.py +0 -150
- oarepo_runtime/datastreams/datastreams.py +0 -152
- oarepo_runtime/datastreams/errors.py +0 -54
- oarepo_runtime/datastreams/ext.py +0 -41
- oarepo_runtime/datastreams/fixtures.py +0 -265
- oarepo_runtime/datastreams/json.py +0 -4
- oarepo_runtime/datastreams/readers/__init__.py +0 -39
- oarepo_runtime/datastreams/readers/attachments.py +0 -51
- oarepo_runtime/datastreams/readers/excel.py +0 -123
- oarepo_runtime/datastreams/readers/json.py +0 -27
- oarepo_runtime/datastreams/readers/service.py +0 -54
- oarepo_runtime/datastreams/readers/yaml.py +0 -14
- oarepo_runtime/datastreams/semi_asynchronous.py +0 -91
- oarepo_runtime/datastreams/synchronous.py +0 -70
- oarepo_runtime/datastreams/transformers.py +0 -18
- oarepo_runtime/datastreams/types.py +0 -323
- oarepo_runtime/datastreams/utils.py +0 -131
- oarepo_runtime/datastreams/writers/__init__.py +0 -21
- oarepo_runtime/datastreams/writers/attachments_file.py +0 -92
- oarepo_runtime/datastreams/writers/attachments_service.py +0 -118
- oarepo_runtime/datastreams/writers/publish.py +0 -70
- oarepo_runtime/datastreams/writers/service.py +0 -175
- oarepo_runtime/datastreams/writers/utils.py +0 -30
- oarepo_runtime/datastreams/writers/validation_errors.py +0 -20
- oarepo_runtime/datastreams/writers/yaml.py +0 -56
- oarepo_runtime/ext_config.py +0 -67
- oarepo_runtime/i18n/__init__.py +0 -3
- oarepo_runtime/info/__init__.py +0 -0
- oarepo_runtime/info/check.py +0 -95
- oarepo_runtime/info/permissions/__init__.py +0 -0
- oarepo_runtime/info/permissions/debug.py +0 -191
- oarepo_runtime/info/views.py +0 -586
- oarepo_runtime/profile.py +0 -60
- oarepo_runtime/records/dumpers/__init__.py +0 -8
- oarepo_runtime/records/dumpers/edtf_interval.py +0 -38
- oarepo_runtime/records/dumpers/multilingual_dumper.py +0 -34
- oarepo_runtime/records/entity_resolvers/__init__.py +0 -13
- oarepo_runtime/records/entity_resolvers/proxies.py +0 -57
- oarepo_runtime/records/mappings/__init__.py +0 -0
- oarepo_runtime/records/mappings/rdm_parent_mapping.json +0 -483
- oarepo_runtime/records/owners/__init__.py +0 -3
- oarepo_runtime/records/owners/registry.py +0 -22
- oarepo_runtime/records/relations/__init__.py +0 -22
- oarepo_runtime/records/relations/base.py +0 -296
- oarepo_runtime/records/relations/internal.py +0 -46
- oarepo_runtime/records/relations/lookup.py +0 -28
- oarepo_runtime/records/relations/pid_relation.py +0 -102
- oarepo_runtime/records/systemfields/featured_file.py +0 -45
- oarepo_runtime/records/systemfields/has_draftcheck.py +0 -47
- oarepo_runtime/records/systemfields/icu.py +0 -371
- oarepo_runtime/records/systemfields/owner.py +0 -115
- oarepo_runtime/records/systemfields/record_status.py +0 -35
- oarepo_runtime/records/systemfields/selectors.py +0 -98
- oarepo_runtime/records/systemfields/synthetic.py +0 -130
- oarepo_runtime/resources/__init__.py +0 -4
- oarepo_runtime/resources/config.py +0 -12
- oarepo_runtime/resources/file_resource.py +0 -15
- oarepo_runtime/resources/json_serializer.py +0 -27
- oarepo_runtime/resources/localized_ui_json_serializer.py +0 -54
- oarepo_runtime/resources/resource.py +0 -53
- oarepo_runtime/resources/responses.py +0 -20
- oarepo_runtime/services/components.py +0 -429
- oarepo_runtime/services/config/draft_link.py +0 -23
- oarepo_runtime/services/config/permissions_presets.py +0 -174
- oarepo_runtime/services/config/service.py +0 -117
- oarepo_runtime/services/custom_fields/__init__.py +0 -80
- oarepo_runtime/services/custom_fields/mappings.py +0 -188
- oarepo_runtime/services/entity/__init__.py +0 -0
- oarepo_runtime/services/entity/config.py +0 -14
- oarepo_runtime/services/entity/schema.py +0 -9
- oarepo_runtime/services/entity/service.py +0 -48
- oarepo_runtime/services/expansions/__init__.py +0 -0
- oarepo_runtime/services/expansions/expandable_fields.py +0 -21
- oarepo_runtime/services/expansions/service.py +0 -4
- oarepo_runtime/services/facets/__init__.py +0 -33
- oarepo_runtime/services/facets/base.py +0 -12
- oarepo_runtime/services/facets/date.py +0 -72
- oarepo_runtime/services/facets/enum.py +0 -11
- oarepo_runtime/services/facets/facet_groups_names.py +0 -17
- oarepo_runtime/services/facets/max_facet.py +0 -13
- oarepo_runtime/services/facets/multilingual_facet.py +0 -33
- oarepo_runtime/services/facets/nested_facet.py +0 -32
- oarepo_runtime/services/facets/params.py +0 -192
- oarepo_runtime/services/facets/year_histogram.py +0 -200
- oarepo_runtime/services/files/__init__.py +0 -8
- oarepo_runtime/services/files/components.py +0 -62
- oarepo_runtime/services/files/service.py +0 -16
- oarepo_runtime/services/generators.py +0 -10
- oarepo_runtime/services/permissions/__init__.py +0 -3
- oarepo_runtime/services/permissions/generators.py +0 -103
- oarepo_runtime/services/relations/__init__.py +0 -0
- oarepo_runtime/services/relations/components.py +0 -15
- oarepo_runtime/services/relations/errors.py +0 -18
- oarepo_runtime/services/relations/mapping.py +0 -38
- oarepo_runtime/services/schema/cf.py +0 -13
- oarepo_runtime/services/schema/i18n_validation.py +0 -7
- oarepo_runtime/services/schema/marshmallow.py +0 -44
- oarepo_runtime/services/schema/marshmallow_to_json_schema.py +0 -72
- oarepo_runtime/services/schema/oneofschema.py +0 -192
- oarepo_runtime/services/schema/polymorphic.py +0 -21
- oarepo_runtime/services/schema/rdm.py +0 -146
- oarepo_runtime/services/schema/rdm_ui.py +0 -156
- oarepo_runtime/services/schema/ui.py +0 -251
- oarepo_runtime/services/schema/validation.py +0 -70
- oarepo_runtime/services/search.py +0 -282
- oarepo_runtime/services/service.py +0 -61
- oarepo_runtime/tasks.py +0 -6
- oarepo_runtime/translations/cs/LC_MESSAGES/messages.mo +0 -0
- oarepo_runtime/translations/cs/LC_MESSAGES/messages.po +0 -95
- oarepo_runtime/translations/default_translations.py +0 -6
- oarepo_runtime/translations/en/LC_MESSAGES/messages.mo +0 -0
- oarepo_runtime/translations/en/LC_MESSAGES/messages.po +0 -97
- oarepo_runtime/translations/messages.pot +0 -100
- oarepo_runtime/uow.py +0 -146
- oarepo_runtime/utils/__init__.py +0 -0
- oarepo_runtime/utils/functools.py +0 -37
- oarepo_runtime/utils/identity_utils.py +0 -35
- oarepo_runtime/utils/index.py +0 -11
- oarepo_runtime/utils/path.py +0 -97
- oarepo_runtime-1.10.3.dist-info/RECORD +0 -163
- oarepo_runtime-1.10.3.dist-info/entry_points.txt +0 -16
- oarepo_runtime-1.10.3.dist-info/top_level.txt +0 -2
- tests/marshmallow_to_json/__init__.py +0 -0
- tests/marshmallow_to_json/test_datacite_ui_schema.py +0 -1410
- tests/marshmallow_to_json/test_simple_schema.py +0 -52
- tests/pkg_data/__init__.py +0 -0
- {oarepo_runtime-1.10.3.dist-info → oarepo_runtime-2.0.0.dev3.dist-info}/licenses/LICENSE +0 -0
@@ -1,34 +0,0 @@
|
|
1
|
-
from invenio_records.dumpers import SearchDumperExt
|
2
|
-
from sqlalchemy.util import classproperty
|
3
|
-
|
4
|
-
from oarepo_runtime.utils.path import PathTraversal
|
5
|
-
|
6
|
-
|
7
|
-
class MultilingualDumper(SearchDumperExt):
|
8
|
-
paths = []
|
9
|
-
SUPPORTED_LANGS = []
|
10
|
-
_path_traversal = None
|
11
|
-
|
12
|
-
@classproperty
|
13
|
-
def path_traversal(cls):
|
14
|
-
if cls._path_traversal is None:
|
15
|
-
cls._path_traversal = PathTraversal(cls.paths)
|
16
|
-
return cls._path_traversal
|
17
|
-
|
18
|
-
def dump(self, record, data):
|
19
|
-
for path in self.path_traversal.iter(data):
|
20
|
-
rec = path[-1].current
|
21
|
-
lang = rec.get("lang", None)
|
22
|
-
if lang and lang in self.SUPPORTED_LANGS:
|
23
|
-
el_name = path[-1].key + "_" + lang
|
24
|
-
path[-1].parent_data.setdefault(el_name, []).append(rec["value"])
|
25
|
-
return data
|
26
|
-
|
27
|
-
def load(self, data, record_cls):
|
28
|
-
for path in self.path_traversal.iter(data):
|
29
|
-
rec = path[-1].current
|
30
|
-
lang = rec.get("lang", None)
|
31
|
-
if lang and lang in self.SUPPORTED_LANGS:
|
32
|
-
el_name = path[-1].key + "_" + lang
|
33
|
-
path[-1].parent_data.pop(el_name, None)
|
34
|
-
return data
|
@@ -1,13 +0,0 @@
|
|
1
|
-
from invenio_records_resources.references import EntityResolver, RecordResolver
|
2
|
-
from invenio_users_resources.entity_resolvers import GroupResolver, UserResolver
|
3
|
-
|
4
|
-
from oarepo_runtime.records.entity_resolvers.proxies import DraftProxy, RecordProxy
|
5
|
-
|
6
|
-
__all__ = [
|
7
|
-
"DraftProxy",
|
8
|
-
"UserResolver",
|
9
|
-
"GroupResolver",
|
10
|
-
"RecordResolver",
|
11
|
-
"EntityResolver",
|
12
|
-
"RecordProxy",
|
13
|
-
]
|
@@ -1,57 +0,0 @@
|
|
1
|
-
from invenio_pidstore.errors import PIDUnregistered, PIDDoesNotExistError
|
2
|
-
from invenio_records_resources.references.entity_resolvers.records import (
|
3
|
-
RecordProxy as InvenioRecordProxy,
|
4
|
-
)
|
5
|
-
from sqlalchemy.exc import NoResultFound
|
6
|
-
from invenio_access.permissions import system_identity
|
7
|
-
from invenio_records_resources.references.entity_resolvers.results import ServiceResultProxy as InvenioServiceResultProxy
|
8
|
-
|
9
|
-
|
10
|
-
def set_field(result, resolved_dict, field_name):
|
11
|
-
from_metadata = resolved_dict.get("metadata", {}).get(field_name)
|
12
|
-
from_data = resolved_dict.get(field_name)
|
13
|
-
|
14
|
-
if from_metadata:
|
15
|
-
result.setdefault("metadata", {})[field_name] = from_metadata
|
16
|
-
if from_data:
|
17
|
-
result[field_name] = from_data
|
18
|
-
|
19
|
-
|
20
|
-
class RecordProxy(InvenioRecordProxy):
|
21
|
-
picked_fields = ["title", "creators", "contributors"]
|
22
|
-
|
23
|
-
def pick_resolved_fields(self, identity, resolved_dict):
|
24
|
-
"""Select which fields to return when resolving the reference."""
|
25
|
-
resolved_fields = super().pick_resolved_fields(identity, resolved_dict)
|
26
|
-
|
27
|
-
for fld in self.picked_fields:
|
28
|
-
set_field(resolved_fields, resolved_dict, fld)
|
29
|
-
|
30
|
-
return resolved_fields
|
31
|
-
|
32
|
-
def ghost_record(self, value):
|
33
|
-
return {
|
34
|
-
**value,
|
35
|
-
"metadata": {
|
36
|
-
"title": "Deleted record",
|
37
|
-
},
|
38
|
-
}
|
39
|
-
|
40
|
-
class WithDeletedServiceResultProxy(InvenioServiceResultProxy):
|
41
|
-
"""Resolver proxy for a result item entity."""
|
42
|
-
|
43
|
-
def _resolve(self):
|
44
|
-
"""Resolve the result item from the proxy's reference dict."""
|
45
|
-
id_ = self._parse_ref_dict_id()
|
46
|
-
# TODO: Make identity customizable
|
47
|
-
return self.service.read(system_identity, id_, include_deleted=True).to_dict()
|
48
|
-
|
49
|
-
|
50
|
-
class DraftProxy(RecordProxy):
|
51
|
-
def _resolve(self):
|
52
|
-
pid_value = self._parse_ref_dict_id()
|
53
|
-
try:
|
54
|
-
return self.record_cls.pid.resolve(pid_value, registered_only=False)
|
55
|
-
except (PIDUnregistered, NoResultFound):
|
56
|
-
# try checking if it is a published record before failing
|
57
|
-
return self.record_cls.pid.resolve(pid_value)
|
File without changes
|
@@ -1,483 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"access": {
|
3
|
-
"properties": {
|
4
|
-
"owned_by": {
|
5
|
-
"properties": {
|
6
|
-
"user": {
|
7
|
-
"type": "keyword"
|
8
|
-
}
|
9
|
-
}
|
10
|
-
},
|
11
|
-
"grants": {
|
12
|
-
"properties": {
|
13
|
-
"subject": {
|
14
|
-
"properties": {
|
15
|
-
"type": {
|
16
|
-
"type": "keyword"
|
17
|
-
},
|
18
|
-
"id": {
|
19
|
-
"type": "keyword"
|
20
|
-
}
|
21
|
-
}
|
22
|
-
},
|
23
|
-
"permission": {
|
24
|
-
"type": "keyword"
|
25
|
-
},
|
26
|
-
"origin": {
|
27
|
-
"type": "keyword"
|
28
|
-
}
|
29
|
-
}
|
30
|
-
},
|
31
|
-
"grant_tokens": {
|
32
|
-
"type": "keyword"
|
33
|
-
},
|
34
|
-
"links": {
|
35
|
-
"properties": {
|
36
|
-
"id": {
|
37
|
-
"type": "keyword"
|
38
|
-
}
|
39
|
-
}
|
40
|
-
},
|
41
|
-
"settings": {
|
42
|
-
"properties": {
|
43
|
-
"allow_user_requests": {
|
44
|
-
"type": "boolean"
|
45
|
-
},
|
46
|
-
"allow_guest_requests": {
|
47
|
-
"type": "boolean"
|
48
|
-
},
|
49
|
-
"accept_conditions_text": {
|
50
|
-
"type": "text"
|
51
|
-
},
|
52
|
-
"secret_link_expiration": {
|
53
|
-
"type": "integer"
|
54
|
-
}
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
},
|
59
|
-
"is_verified": {
|
60
|
-
"type": "boolean"
|
61
|
-
},
|
62
|
-
"communities": {
|
63
|
-
"properties": {
|
64
|
-
"ids": {
|
65
|
-
"type": "keyword"
|
66
|
-
},
|
67
|
-
"default": {
|
68
|
-
"type": "keyword"
|
69
|
-
},
|
70
|
-
"entries": {
|
71
|
-
"type": "object",
|
72
|
-
"properties": {
|
73
|
-
"uuid": {
|
74
|
-
"type": "keyword"
|
75
|
-
},
|
76
|
-
"created": {
|
77
|
-
"type": "date"
|
78
|
-
},
|
79
|
-
"updated": {
|
80
|
-
"type": "date"
|
81
|
-
},
|
82
|
-
"version_id": {
|
83
|
-
"type": "long"
|
84
|
-
},
|
85
|
-
"id": {
|
86
|
-
"type": "keyword"
|
87
|
-
},
|
88
|
-
"is_verified": {
|
89
|
-
"type": "boolean"
|
90
|
-
},
|
91
|
-
"@v": {
|
92
|
-
"type": "keyword"
|
93
|
-
},
|
94
|
-
"slug": {
|
95
|
-
"type": "keyword"
|
96
|
-
},
|
97
|
-
"children": {
|
98
|
-
"properties": {
|
99
|
-
"allow": {
|
100
|
-
"type": "boolean"
|
101
|
-
}
|
102
|
-
}
|
103
|
-
},
|
104
|
-
"metadata": {
|
105
|
-
"properties": {
|
106
|
-
"title": {
|
107
|
-
"type": "text"
|
108
|
-
},
|
109
|
-
"type": {
|
110
|
-
"type": "object",
|
111
|
-
"properties": {
|
112
|
-
"@v": {
|
113
|
-
"type": "keyword"
|
114
|
-
},
|
115
|
-
"id": {
|
116
|
-
"type": "keyword"
|
117
|
-
},
|
118
|
-
"title": {
|
119
|
-
"type": "object",
|
120
|
-
"dynamic": "true",
|
121
|
-
"properties": {
|
122
|
-
"en": {
|
123
|
-
"type": "text"
|
124
|
-
}
|
125
|
-
}
|
126
|
-
}
|
127
|
-
}
|
128
|
-
},
|
129
|
-
"organizations": {
|
130
|
-
"type": "object",
|
131
|
-
"properties": {
|
132
|
-
"@v": {
|
133
|
-
"type": "keyword"
|
134
|
-
},
|
135
|
-
"id": {
|
136
|
-
"type": "keyword"
|
137
|
-
},
|
138
|
-
"name": {
|
139
|
-
"type": "text"
|
140
|
-
},
|
141
|
-
"identifiers": {
|
142
|
-
"properties": {
|
143
|
-
"identifier": {
|
144
|
-
"type": "text",
|
145
|
-
"fields": {
|
146
|
-
"keyword": {
|
147
|
-
"type": "keyword"
|
148
|
-
}
|
149
|
-
}
|
150
|
-
},
|
151
|
-
"scheme": {
|
152
|
-
"type": "keyword"
|
153
|
-
}
|
154
|
-
}
|
155
|
-
}
|
156
|
-
}
|
157
|
-
},
|
158
|
-
"funding": {
|
159
|
-
"properties": {
|
160
|
-
"award": {
|
161
|
-
"type": "object",
|
162
|
-
"properties": {
|
163
|
-
"@v": {
|
164
|
-
"type": "keyword"
|
165
|
-
},
|
166
|
-
"id": {
|
167
|
-
"type": "keyword"
|
168
|
-
},
|
169
|
-
"title": {
|
170
|
-
"type": "object",
|
171
|
-
"dynamic": "true"
|
172
|
-
},
|
173
|
-
"number": {
|
174
|
-
"type": "text",
|
175
|
-
"fields": {
|
176
|
-
"keyword": {
|
177
|
-
"type": "keyword"
|
178
|
-
}
|
179
|
-
}
|
180
|
-
},
|
181
|
-
"program": {
|
182
|
-
"type": "keyword"
|
183
|
-
},
|
184
|
-
"acronym": {
|
185
|
-
"type": "keyword",
|
186
|
-
"fields": {
|
187
|
-
"text": {
|
188
|
-
"type": "text"
|
189
|
-
}
|
190
|
-
}
|
191
|
-
},
|
192
|
-
"identifiers": {
|
193
|
-
"properties": {
|
194
|
-
"identifier": {
|
195
|
-
"type": "keyword"
|
196
|
-
},
|
197
|
-
"scheme": {
|
198
|
-
"type": "keyword"
|
199
|
-
}
|
200
|
-
}
|
201
|
-
},
|
202
|
-
"subjects": {
|
203
|
-
"properties": {
|
204
|
-
"@v": {
|
205
|
-
"type": "keyword"
|
206
|
-
},
|
207
|
-
"id": {
|
208
|
-
"type": "keyword"
|
209
|
-
},
|
210
|
-
"subject": {
|
211
|
-
"type": "keyword"
|
212
|
-
},
|
213
|
-
"scheme": {
|
214
|
-
"type": "keyword"
|
215
|
-
},
|
216
|
-
"props": {
|
217
|
-
"type": "object",
|
218
|
-
"dynamic": "true"
|
219
|
-
}
|
220
|
-
}
|
221
|
-
},
|
222
|
-
"organizations": {
|
223
|
-
"properties": {
|
224
|
-
"scheme": {
|
225
|
-
"type": "keyword"
|
226
|
-
},
|
227
|
-
"id": {
|
228
|
-
"type": "keyword"
|
229
|
-
},
|
230
|
-
"organization": {
|
231
|
-
"type": "keyword"
|
232
|
-
}
|
233
|
-
}
|
234
|
-
}
|
235
|
-
}
|
236
|
-
},
|
237
|
-
"funder": {
|
238
|
-
"type": "object",
|
239
|
-
"properties": {
|
240
|
-
"@v": {
|
241
|
-
"type": "keyword"
|
242
|
-
},
|
243
|
-
"id": {
|
244
|
-
"type": "keyword"
|
245
|
-
},
|
246
|
-
"name": {
|
247
|
-
"type": "text"
|
248
|
-
}
|
249
|
-
}
|
250
|
-
}
|
251
|
-
}
|
252
|
-
},
|
253
|
-
"website": {
|
254
|
-
"type": "keyword"
|
255
|
-
}
|
256
|
-
}
|
257
|
-
},
|
258
|
-
"theme": {
|
259
|
-
"type": "object",
|
260
|
-
"properties": {
|
261
|
-
"enabled": {
|
262
|
-
"type": "boolean"
|
263
|
-
},
|
264
|
-
"brand": {
|
265
|
-
"type": "keyword"
|
266
|
-
},
|
267
|
-
"style": {
|
268
|
-
"type": "object",
|
269
|
-
"enabled": false
|
270
|
-
}
|
271
|
-
}
|
272
|
-
},
|
273
|
-
"parent": {
|
274
|
-
"type": "object",
|
275
|
-
"properties": {
|
276
|
-
"uuid": {
|
277
|
-
"type": "keyword"
|
278
|
-
},
|
279
|
-
"created": {
|
280
|
-
"type": "date"
|
281
|
-
},
|
282
|
-
"updated": {
|
283
|
-
"type": "date"
|
284
|
-
},
|
285
|
-
"version_id": {
|
286
|
-
"type": "long"
|
287
|
-
},
|
288
|
-
"id": {
|
289
|
-
"type": "keyword"
|
290
|
-
},
|
291
|
-
"@v": {
|
292
|
-
"type": "keyword"
|
293
|
-
},
|
294
|
-
"is_verified": {
|
295
|
-
"type": "boolean"
|
296
|
-
},
|
297
|
-
"slug": {
|
298
|
-
"type": "keyword"
|
299
|
-
},
|
300
|
-
"children": {
|
301
|
-
"properties": {
|
302
|
-
"allow": {
|
303
|
-
"type": "boolean"
|
304
|
-
}
|
305
|
-
}
|
306
|
-
},
|
307
|
-
"metadata": {
|
308
|
-
"type": "object",
|
309
|
-
"properties": {
|
310
|
-
"title": {
|
311
|
-
"type": "text"
|
312
|
-
},
|
313
|
-
"type": {
|
314
|
-
"type": "object",
|
315
|
-
"properties": {
|
316
|
-
"@v": {
|
317
|
-
"type": "keyword"
|
318
|
-
},
|
319
|
-
"id": {
|
320
|
-
"type": "keyword"
|
321
|
-
},
|
322
|
-
"title": {
|
323
|
-
"type": "object",
|
324
|
-
"dynamic": "true",
|
325
|
-
"properties": {
|
326
|
-
"en": {
|
327
|
-
"type": "text"
|
328
|
-
}
|
329
|
-
}
|
330
|
-
}
|
331
|
-
}
|
332
|
-
},
|
333
|
-
"website": {
|
334
|
-
"type": "keyword"
|
335
|
-
},
|
336
|
-
"organizations": {
|
337
|
-
"type": "object",
|
338
|
-
"properties": {
|
339
|
-
"@v": {
|
340
|
-
"type": "keyword"
|
341
|
-
},
|
342
|
-
"id": {
|
343
|
-
"type": "keyword"
|
344
|
-
},
|
345
|
-
"name": {
|
346
|
-
"type": "text"
|
347
|
-
},
|
348
|
-
"identifiers": {
|
349
|
-
"properties": {
|
350
|
-
"identifier": {
|
351
|
-
"type": "text",
|
352
|
-
"fields": {
|
353
|
-
"keyword": {
|
354
|
-
"type": "keyword"
|
355
|
-
}
|
356
|
-
}
|
357
|
-
},
|
358
|
-
"scheme": {
|
359
|
-
"type": "keyword"
|
360
|
-
}
|
361
|
-
}
|
362
|
-
}
|
363
|
-
}
|
364
|
-
},
|
365
|
-
"funding": {
|
366
|
-
"properties": {
|
367
|
-
"award": {
|
368
|
-
"type": "object",
|
369
|
-
"properties": {
|
370
|
-
"@v": {
|
371
|
-
"type": "keyword"
|
372
|
-
},
|
373
|
-
"id": {
|
374
|
-
"type": "keyword"
|
375
|
-
},
|
376
|
-
"title": {
|
377
|
-
"type": "object",
|
378
|
-
"dynamic": "true"
|
379
|
-
},
|
380
|
-
"number": {
|
381
|
-
"type": "text",
|
382
|
-
"fields": {
|
383
|
-
"keyword": {
|
384
|
-
"type": "keyword"
|
385
|
-
}
|
386
|
-
}
|
387
|
-
},
|
388
|
-
"program": {
|
389
|
-
"type": "keyword"
|
390
|
-
},
|
391
|
-
"acronym": {
|
392
|
-
"type": "keyword",
|
393
|
-
"fields": {
|
394
|
-
"text": {
|
395
|
-
"type": "text"
|
396
|
-
}
|
397
|
-
}
|
398
|
-
},
|
399
|
-
"identifiers": {
|
400
|
-
"properties": {
|
401
|
-
"identifier": {
|
402
|
-
"type": "keyword"
|
403
|
-
},
|
404
|
-
"scheme": {
|
405
|
-
"type": "keyword"
|
406
|
-
}
|
407
|
-
}
|
408
|
-
},
|
409
|
-
"subjects": {
|
410
|
-
"properties": {
|
411
|
-
"@v": {
|
412
|
-
"type": "keyword"
|
413
|
-
},
|
414
|
-
"id": {
|
415
|
-
"type": "keyword"
|
416
|
-
},
|
417
|
-
"subject": {
|
418
|
-
"type": "keyword"
|
419
|
-
},
|
420
|
-
"scheme": {
|
421
|
-
"type": "keyword"
|
422
|
-
},
|
423
|
-
"props": {
|
424
|
-
"type": "object",
|
425
|
-
"dynamic": "true"
|
426
|
-
}
|
427
|
-
}
|
428
|
-
},
|
429
|
-
"organizations": {
|
430
|
-
"properties": {
|
431
|
-
"scheme": {
|
432
|
-
"type": "keyword"
|
433
|
-
},
|
434
|
-
"id": {
|
435
|
-
"type": "keyword"
|
436
|
-
},
|
437
|
-
"organization": {
|
438
|
-
"type": "keyword"
|
439
|
-
}
|
440
|
-
}
|
441
|
-
}
|
442
|
-
}
|
443
|
-
},
|
444
|
-
"funder": {
|
445
|
-
"type": "object",
|
446
|
-
"properties": {
|
447
|
-
"@v": {
|
448
|
-
"type": "keyword"
|
449
|
-
},
|
450
|
-
"id": {
|
451
|
-
"type": "keyword"
|
452
|
-
},
|
453
|
-
"name": {
|
454
|
-
"type": "text"
|
455
|
-
}
|
456
|
-
}
|
457
|
-
}
|
458
|
-
}
|
459
|
-
}
|
460
|
-
}
|
461
|
-
},
|
462
|
-
"theme": {
|
463
|
-
"type": "object",
|
464
|
-
"properties": {
|
465
|
-
"enabled": {
|
466
|
-
"type": "boolean"
|
467
|
-
},
|
468
|
-
"brand": {
|
469
|
-
"type": "keyword"
|
470
|
-
},
|
471
|
-
"style": {
|
472
|
-
"type": "object",
|
473
|
-
"enabled": false
|
474
|
-
}
|
475
|
-
}
|
476
|
-
}
|
477
|
-
}
|
478
|
-
}
|
479
|
-
}
|
480
|
-
}
|
481
|
-
}
|
482
|
-
}
|
483
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
from invenio_records_resources.references.registry import ResolverRegistryBase
|
2
|
-
|
3
|
-
from oarepo_runtime.proxies import current_oarepo
|
4
|
-
|
5
|
-
|
6
|
-
class OwnerEntityResolverRegistry(ResolverRegistryBase):
|
7
|
-
"""Entity Resolver registry for owners."""
|
8
|
-
|
9
|
-
@classmethod
|
10
|
-
def get_registered_resolvers(cls):
|
11
|
-
"""Get all currently registered resolvers."""
|
12
|
-
return iter(current_oarepo.owner_entity_resolvers)
|
13
|
-
|
14
|
-
@classmethod
|
15
|
-
def resolve_reference(cls, reference):
|
16
|
-
for resolver in cls.get_registered_resolvers():
|
17
|
-
try:
|
18
|
-
if resolver.matches_reference_dict(reference):
|
19
|
-
return resolver.get_entity_proxy(reference).resolve()
|
20
|
-
except ValueError:
|
21
|
-
# Value error ignored from matches_reference_dict
|
22
|
-
pass
|
@@ -1,22 +0,0 @@
|
|
1
|
-
from .base import (
|
2
|
-
InvalidCheckValue,
|
3
|
-
InvalidRelationValue,
|
4
|
-
Relation,
|
5
|
-
RelationResult,
|
6
|
-
RelationsField,
|
7
|
-
UnstrictRelationResult
|
8
|
-
)
|
9
|
-
from .internal import InternalRelation
|
10
|
-
from .pid_relation import PIDRelation, UnstrictPIDRelation
|
11
|
-
|
12
|
-
__all__ = (
|
13
|
-
"Relation",
|
14
|
-
"RelationResult",
|
15
|
-
"InvalidRelationValue",
|
16
|
-
"InvalidCheckValue",
|
17
|
-
"RelationsField",
|
18
|
-
"InternalRelation",
|
19
|
-
"PIDRelation",
|
20
|
-
"UnstrictPIDRelation",
|
21
|
-
"UnstrictRelationResult"
|
22
|
-
)
|