-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
BundleRest.java
55 lines (49 loc) · 1.47 KB
/
BundleRest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.rest.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* The Bundle REST Resource
*
* @author Jelle Pelgrims (jelle.pelgrims at atmire.com)
*/
@LinksRest(links = {
@LinkRest(
name = BundleRest.ITEM,
method = "getItem"
),
@LinkRest(
name = BundleRest.BITSTREAMS,
method = "getBitstreams"
),
@LinkRest(
name = BundleRest.PRIMARY_BITSTREAM,
method = "getPrimaryBitstream"
)
})
public class BundleRest extends DSpaceObjectRest {
public static final String NAME = "bundle";
public static final String PLURAL_NAME = "bundles";
public static final String CATEGORY = RestAddressableModel.CORE;
public static final String ITEM = "item";
public static final String BITSTREAMS = "bitstreams";
public static final String PRIMARY_BITSTREAM = "primaryBitstream";
@Override
@JsonIgnore
public String getId() {
return super.getId();
}
public String getCategory() {
return CATEGORY;
}
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
public String getType() {
return NAME;
}
}