-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
GNIP 96: Implement relations between resources #11494
Comments
Hey @etj i really like your idea on this topic. I like to add the idea to have relationships between datasets themself also. |
+1 |
@mwallschlaeger datasets are resources, so this GNIP is including such relationships as well. |
WIPRationaleBasically we want a simple "source resource" --> "target resource" relationship between resources, in order to point out any basic coupling between such resources.
The viewing pages may have panels listing the resources as:
Current statusAt the moment we have two classes for setting relationships: |
I would like to have a list of relationship types. Something like those from DataCite: https://www.dublincore.org/specifications/dublin-core/rdf-relation-types/ What do you think? |
@gannebamm at the moment the idea is just to implement the simple relationship model. We can extend it to include additional properties in the future, but this will require also extending the editor. This is something I wouldn't do until the metadata editor has not been migrated to the new client. I have almost completed the design of a proposal for the new metadata editor, but no timeline at the moment since. |
@gannebamm added "Relationship type" in "Future evolution" section. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sample output for http://localhost:8000/api/v2/resources/5/linked_resource?page=1 There are 3 links:
{
"WARNINGS": {
"DEPRECATION": "'resources' field is deprecated, please use 'linked_to'",
"PAGINATION": "Pagination is not supported on this call"
},
"resources": [
{
"pk": 1,
"title": "pat_po",
"resource_type": "dataset",
"detail_url": "/catalogue/#/dataset/1",
"thumbnail_url": "http://localhost/uploaded/thumbs/dataset-7fff231c-97ae-4d45-9299-c6286c2dc13f-thumb-91b8b715-8210-4ce8-ab94-dd61359320f4.jpg",
},
{
"pk": 5,
"title": "URHIA_500x200.jpg",
"resource_type": "document",
"detail_url": "/catalogue/#/document/5",
"thumbnail_url": "http://localhost:8000/uploaded/thumbs/document-87dad54c-7e2c-49ca-9269-e0d73993f0a9-thumb-e905e5ec-7b22-44cc-be40-0e13181e1f98.jpg",
}
],
"linked_to": [
{
"internal": false,
"pk": 1,
"title": "pat_po",
"resource_type": "dataset",
"detail_url": "/catalogue/#/dataset/1",
"thumbnail_url": "http://localhost/uploaded/thumbs/dataset-7fff231c-97ae-4d45-9299-c6286c2dc13f-thumb-91b8b715-8210-4ce8-ab94-dd61359320f4.jpg"
},
{
"internal": false,
"pk": 5,
"title": "URHIA_500x200.jpg",
"resource_type": "document",
"detail_url": "/catalogue/#/document/5",
"thumbnail_url": "http://localhost:8000/uploaded/thumbs/document-87dad54c-7e2c-49ca-9269-e0d73993f0a9-thumb-e905e5ec-7b22-44cc-be40-0e13181e1f98.jpg"
}
],
"linked_by": [
{
"internal": false,
"pk": 5,
"title": "URHIA_500x200.jpg",
"resource_type": "document",
"detail_url": "/catalogue/#/document/5",
"thumbnail_url": "http://localhost:8000/uploaded/thumbs/document-87dad54c-7e2c-49ca-9269-e0d73993f0a9-thumb-e905e5ec-7b22-44cc-be40-0e13181e1f98.jpg"
},
{
"internal": false,
"pk": 6,
"title": "AADA.png",
"resource_type": "document",
"detail_url": "/catalogue/#/document/6",
"thumbnail_url": "http://localhost:8000/uploaded/thumbs/document-33bdee0f-b27e-4f08-9b41-3b7fddc5bffd-thumb-728a6ad5-85d4-476c-9e2a-a60577bc2234.jpg"
}
]
} |
@etj the |
I don't know if it's really needed now that the base resource exposes the entrypoint. Anyway, any idea why
|
GNIP - Implement relations between resources
Overview
At the moment linked resources are only available:
We want to create generic references between resources.
Proposed By
Assigned to Release
This proposal is for GeoNode 4.2.
State
Motivation
Proposal
Requirements
We want to implement a generic model for relating any resource type taking into account the following:
The linked_resources API endpoint will be extended to take into account the new link model.
Proposal
We need a simple "source resource" --> "target resource" relationship between resources, in order to point out any basic coupling between such resources.
At first sight, no other info is needed -- further fields are listed in the "future evolution" section.
We may have two different kinds of relationships:
The viewing pages may have panels listing the resources as:
Current status
At the moment we have two classes for setting relationships:
MapLayer
DocumentResourceLink
API changes
/resources/{id}/linked_resources/
Payload
The
resources
entry should be replaced by:linked_to
: very similar toresources
, also adding the booleaninternal
attribute. It contains all theLinkedResource
records where the current resource is the source object.linked_by
: It contains all theLinkedResource
records where the current resource is the target objectThe old
resource
entry will be first deprecated and then kept long enough to allow time for the client part to use the new data.Pagination
This entrypoint at the moment is paginated.
Since we'll have two different lists, the pagination would be confusing. The idea is to remove the pagination for this call (also, not so many linked resources are expected -- 640kresources ought to be enough for anybody ;) )
Also, the client at the moment is requesting
page=1&page_size=99999
, so pagination is not really used.The pagination could be removed right away -- maybe by placing fake values in the items if they are needed to exist.
Filtering
Since we do expect few linked resources, filtering could be done client side when/if needed.
Example
See sample output in #11494 (comment)
Backwards Compatibility
Documents extents
Reading comments from older commits, it seems that a signal occurred when a map was saved, in order to update the extents of the documents linked to it.
However, it seems to be a dead feature, since the logic supposedly implementing it does nothing.
We're not going to re-implement this feature since the dependency graph among the various resources may have loops that may cause infinite signals loop
Class
DocumentResourceLink
Declare its Backwards Compatibility.
Future evolution
client_owner
: a string representing the owner of the internal relation; for instance when a GeoStory references a dataset, the LinkedResource record would haveinternal=true
andclient_owner='mapstore'
Feedback
Update this section with relevant feedbacks, if any.
Voting
Project Steering Committee:
Links
Remove unused links below.
The text was updated successfully, but these errors were encountered: