forked from gooddata/gooddata-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplayForm.java
More file actions
108 lines (87 loc) · 2.76 KB
/
Copy pathDisplayForm.java
File metadata and controls
108 lines (87 loc) · 2.76 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
/*
* Copyright (C) 2007-2014, GoodData(R) Corporation. All rights reserved.
*/
package com.gooddata.md;
import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;
/**
* Display form
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class DisplayForm extends AbstractObj {
@JsonProperty("content")
protected final Content content;
@JsonProperty("links")
private final Links links;
@JsonCreator
protected DisplayForm(@JsonProperty("meta") Meta meta, @JsonProperty("content") Content content,
@JsonProperty("links") Links links) {
super(meta);
this.content = content;
this.links = links;
}
@JsonIgnore
public String getFormOf() {
return content.getFormOf();
}
@JsonIgnore
public String getExpression() {
return content.getExpression();
}
@JsonIgnore
public String getLdmExpression() {
return content.getLdmExpression();
}
@JsonIgnore
public String getType() {
return content.getType();
}
@JsonIgnore
public String getElementsLink() {
return links.getElements();
}
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
protected static class Content {
private final String formOf;
private final String expression;
private final String ldmExpression;
private final String type;
@JsonCreator
public Content(@JsonProperty("formOf") String formOf, @JsonProperty("expression") String expression,
@JsonProperty("ldmexpression") String ldmExpression, @JsonProperty("type") String type) {
this.formOf = formOf;
this.expression = expression;
this.ldmExpression = ldmExpression;
this.type = type;
}
public String getFormOf() {
return formOf;
}
public String getExpression() {
return expression;
}
@JsonProperty("ldmexpression")
public String getLdmExpression() {
return ldmExpression;
}
public String getType() {
return type;
}
}
@JsonIgnoreProperties(ignoreUnknown = true)
protected static class Links {
private final String elements;
@JsonCreator
protected Links(@JsonProperty("elements") String elements) {
this.elements = elements;
}
public String getElements() {
return elements;
}
}
}