forked from gooddata/gooddata-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMeta.java
More file actions
165 lines (137 loc) · 4.61 KB
/
Copy pathMeta.java
File metadata and controls
165 lines (137 loc) · 4.61 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
* Copyright (C) 2007-2014, GoodData(R) Corporation. All rights reserved.
*/
package com.gooddata.md;
import com.gooddata.util.*;
import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
import org.joda.time.DateTime;
import java.io.Serializable;
/**
* Metadata meta information (meant just for internal SDK usage)
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonSerialize(include = Inclusion.NON_NULL)
public class Meta implements Serializable {
private String author;
private String contributor;
private DateTime created;
private DateTime updated;
private String summary;
private String category;
private String tags; //TODO collection
private String uri;
private boolean deprecated;
private String title;
private String identifier;
private boolean locked;
private boolean unlisted;
@JsonCreator
protected Meta(@JsonProperty("author") String author,
@JsonProperty("contributor") String contributor,
@JsonProperty("created") @JsonDeserialize(using = GDDateTimeDeserializer.class) DateTime created,
@JsonProperty("updated") @JsonDeserialize(using = GDDateTimeDeserializer.class) DateTime updated,
@JsonProperty("summary") String summary,
@JsonProperty("title") String title,
@JsonProperty("category") String category,
@JsonProperty("tags") String tags,
@JsonProperty("uri") String uri,
@JsonProperty("deprecated") @JsonDeserialize(using = BooleanStringDeserializer.class) boolean deprecated,
@JsonProperty("identifier") String identifier,
@JsonProperty("locked") @JsonDeserialize(using = BooleanIntegerDeserializer.class) boolean locked,
@JsonProperty("unlisted") @JsonDeserialize(using = BooleanIntegerDeserializer.class) boolean unlisted) {
super();
this.author = author;
this.uri = uri;
this.tags = tags;
this.created = created;
this.summary = summary;
this.title = title;
this.updated = updated;
this.category = category;
this.deprecated = deprecated;
this.identifier = identifier;
this.contributor = contributor;
this.locked = locked;
this.unlisted = unlisted;
}
public Meta(String title) {
this.title = title;
}
public Meta(String title, String summary) {
this.title = title;
this.summary = summary;
}
public String getAuthor() {
return author;
}
public String getContributor() {
return contributor;
}
@JsonSerialize(using = GDDateTimeSerializer.class, include = Inclusion.NON_NULL)
public DateTime getCreated() {
return created;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@JsonSerialize(using = GDDateTimeSerializer.class, include = Inclusion.NON_NULL)
public DateTime getUpdated() {
return updated;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getTags() {
return tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public String getUri() {
return uri;
}
@JsonSerialize(using = BooleanStringSerializer.class)
public boolean isDeprecated() {
return deprecated;
}
public void setDeprecated(boolean deprecated) {
this.deprecated = deprecated;
}
public String getIdentifier() {
return identifier;
}
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
@JsonSerialize(using = BooleanIntegerSerializer.class)
public boolean isLocked() {
return locked;
}
public void setLocked(boolean locked) {
this.locked = locked;
}
@JsonSerialize(using = BooleanIntegerSerializer.class)
public boolean isUnlisted() {
return unlisted;
}
public void setUnlisted(boolean unlisted) {
this.unlisted = unlisted;
}
}