Skip to content

Commit 4159ea5

Browse files
committed
refactoring CC license
Moving fix of regular license to DSpace#118
1 parent f3202a6 commit 4159ea5

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

workspaceitem-data-cclicense.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ The section data represents the data about the CC license
55

66
```json
77
{
8-
"granted": true,
98
"uri": "http://creativecommons.org/licenses/by-nc-sa/3.0/us/",
109
"rights": "Attribution-NonCommercial-ShareAlike 3.0 United States",
1110
"file":
@@ -36,10 +35,9 @@ The section data represents the data about the CC license
3635
```
3736

3837
The following attributes can be defined:
39-
* granted: true if a CC License has been specified
40-
* uri: the URI of the CC License, typically stored in dc.rights.uri, can be null
41-
* rights: the rights name of the CC License, typically stored in dc.rights, can be null
42-
* file: the bitstream containing the license, can be null
38+
* uri: the URI of the CC License, typically stored in dc.rights.uri, null is no license is granted
39+
* rights: the rights name of the CC License, typically stored in dc.rights, null is no license is granted
40+
* file: the bitstream containing the license, null is no license is granted
4341

4442
## Patch operations
4543
The PATCH method expects a JSON body according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902)
@@ -61,14 +59,12 @@ To accept a CC license the client must send a JSON Patch ADD operation of the ur
6159

6260
The dc.rights, dc.rights.uri and RDF bitstream will be retrieved from e.g. https://api.creativecommons.org/rest/1.5/details?license-uri=http://creativecommons.org/licenses/by-nc-sa/3.0/
6361

64-
Please note that according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) a subsequent add operation on the granted will have the effect to replace the previous granted license with a new one.
62+
Please note that according to the [JSON Patch specification RFC6902](https://tools.ietf.org/html/rfc6902) a subsequent add operation on the `/sections/<:name-of-the-form>/uri` will have the effect to replace the previous granted license with a new one.
6563
In this case a new CC license will be added to the item and the previous license deleted.
6664

67-
It is also possible to send a PATH add operation using *false* as value to reject / remove a license.
68-
6965
This use of the add operation to replace the license could be counter intuitive but it is done according to the [RFC section 4.1](https://tools.ietf.org/html/rfc6902#section-4.1)
7066
> If the target location specifies an object member that does exist, that member's value is replaced.
7167
7268
### Remove
7369
It is possible to remove a previously granted CC license
74-
`curl --data '{[ { "op": "remove", "path": "/sections/cclicense/granted"}]' -X PATCH ${dspace7-url}/api/submission/workspaceitems/1`
70+
`curl --data '{[ { "op": "remove", "path": "/sections/<:name-of-the-form>/uri"}]' -X PATCH ${dspace7-url}/api/submission/workspaceitems/1`

0 commit comments

Comments
 (0)