forked from gooddata/gooddata-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutLinks.java
More file actions
116 lines (97 loc) · 3.04 KB
/
Copy pathAboutLinks.java
File metadata and controls
116 lines (97 loc) · 3.04 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
* Copyright (C) 2004-2017, GoodData(R) Corporation. All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
package com.gooddata.gdc;
import com.fasterxml.jackson.annotation.*;
import com.gooddata.util.GoodDataToStringBuilder;
import java.util.Collection;
import java.util.List;
/**
* Collection of links with "about" metadata.
* Deserialization only.
*/
@JsonTypeName("about")
@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AboutLinks {
private final String category;
private final String summary;
private final String instance;
private final List<Link> links;
@JsonCreator
public AboutLinks(@JsonProperty("category") String category, @JsonProperty("summary") String summary,
@JsonProperty("instance") String instance, @JsonProperty("links") List<Link> links) {
this.category = category;
this.summary = summary;
this.instance = instance;
this.links = links;
}
public String getCategory() {
return category;
}
public String getSummary() {
return summary;
}
public String getInstance() {
return instance;
}
public Collection<Link> getLinks() {
return links;
}
@Override
public String toString() {
return GoodDataToStringBuilder.defaultToString(this);
}
/**
* Link with metadata.
* Deserialization only.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Link {
private final String identifier;
private final String uri;
private final String title;
private final String category;
private final String summary;
@JsonCreator
public Link(@JsonProperty("identifier") String identifier, @JsonProperty("link") String uri,
@JsonProperty("title") String title, @JsonProperty("category") String category,
@JsonProperty("summary") String summary) {
this.identifier = identifier;
this.uri = uri;
this.title = title;
this.category = category;
this.summary = summary;
}
public String getIdentifier() {
return identifier;
}
public String getUri() {
return uri;
}
/**
* @return self URI string
* @deprecated use {@link #getUri()} instead
*/
@Deprecated
public String getLink() {
return getUri();
}
public String getTitle() {
return title;
}
public String getCategory() {
return category;
}
public String getSummary() {
return summary;
}
@Override
public String toString() {
return GoodDataToStringBuilder.defaultToString(this);
}
}
}