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
85 lines (69 loc) · 2.28 KB
/
DisplayForm.java
File metadata and controls
85 lines (69 loc) · 2.28 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
/*
* 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 Obj {
@JsonProperty("content")
private final Content content;
@JsonCreator
protected DisplayForm(@JsonProperty("meta") Meta meta, @JsonProperty("content") Content content) {
super(meta);
this.content = content;
}
@JsonIgnore
public String getFormOf() {
return content.getFormOf();
}
@JsonIgnore
public String getExpression() {
return content.getExpression();
}
@JsonIgnore
public Integer getDefault() {
return content.getDefault();
} //TODO boolean
@JsonIgnore
public String getLdmExpression() {
return content.getLdmExpression();
}
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
protected static class Content {
private final String formOf;
private final String expression;
@JsonProperty("default")
private final Integer isDefault;
@JsonProperty("ldmexpression")
private final String ldmExpression;
@JsonCreator
public Content(@JsonProperty("formOf") String formOf, @JsonProperty("expression") String expression,
@JsonProperty("default") Integer isDefault, @JsonProperty("ldmexpression") String ldmExpression) {
this.formOf = formOf;
this.expression = expression;
this.isDefault = isDefault;
this.ldmExpression = ldmExpression;
}
public String getFormOf() {
return formOf;
}
public String getExpression() {
return expression;
}
public Integer getDefault() {
return isDefault;
}
public String getLdmExpression() {
return ldmExpression;
}
}
}