-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access rights and index dataset without file #2925
base: master
Are you sure you want to change the base?
Changes from all commits
743a840
40a21f6
442b72a
2d507d7
74937e6
c615d4f
1c5a48d
2cbcdc5
f7de3cc
d06f1ff
41d2e8b
954db57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,6 +200,7 @@ def dataset_to_rdf(dataset, graph=None): | |
d.set(DCT.description, Literal(dataset.description)) | ||
d.set(DCT.issued, Literal(dataset.created_at)) | ||
d.set(DCT.modified, Literal(dataset.last_modified)) | ||
d.set(DCT.accessRights, Literal(dataset.access_rights)) | ||
|
||
if dataset.acronym: | ||
d.set(SKOS.altLabel, Literal(dataset.acronym)) | ||
|
@@ -610,6 +611,7 @@ def dataset_from_rdf(graph: Graph, dataset=None, node=None): | |
default_license = dataset.license or License.default() | ||
dataset_license = rdf_value(d, DCT.license) | ||
dataset.license = License.guess(dataset_license, *licenses, default=default_license) | ||
dataset.access_rights = rdf_value(d, DCT.accessRights) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should map from and towards the European vocabulary: http://publications.europa.eu/resource/authority/access-right. |
||
|
||
identifier = rdf_value(d, DCT.identifier) | ||
uri = d.identifier.toPython() if isinstance(d.identifier, URIRef) else None | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,8 +45,11 @@ class DatasetSearch(ModelSearchAdapter): | |
|
||
@classmethod | ||
def is_indexable(cls, dataset): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need to modify this anymore, see #2997 |
||
valid_access_rights = (dataset.access_rights == 'public' | ||
or dataset.access_rights == 'non-public' | ||
or dataset.access_rights == 'restricted') | ||
return (dataset.deleted is None and dataset.archived is None and | ||
not dataset.private) | ||
not dataset.private and valid_access_rights) | ||
|
||
@classmethod | ||
def mongo_search(cls, args): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
access_rights is at the Dataset level, may not match with usage and DCAT?