This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
DocumentInfo.java
124 lines (101 loc) · 2.47 KB
/
DocumentInfo.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
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
package org.zanata.webtrans.shared.model;
import java.util.Map;
import org.zanata.common.LocaleId;
import org.zanata.common.TranslationStats;
import com.google.gwt.user.client.rpc.IsSerializable;
public class DocumentInfo implements HasIdentifier<DocumentId>, IsSerializable
{
private DocumentId id;
private String name;
private String path;
private LocaleId sourceLocale;
private TranslationStats stats;
private AuditInfo lastModified;
private AuditInfo lastTranslated;
private Map<String, String> downloadExtensions;
private Boolean hasError = null;
// for GWT
@SuppressWarnings("unused")
private DocumentInfo()
{
}
public DocumentInfo(DocumentId id, String name, String path, LocaleId sourceLocale, TranslationStats stats, AuditInfo lastModified, Map<String, String> downloadExtensions, AuditInfo lastTranslated)
{
this.id = id;
this.name = name;
this.path = path;
this.stats = stats;
this.sourceLocale = sourceLocale;
this.lastModified = lastModified;
this.downloadExtensions = downloadExtensions;
this.lastTranslated = lastTranslated;
}
public DocumentId getId()
{
return id;
}
public String getName()
{
return name;
}
public String getPath()
{
return path;
}
public TranslationStats getStats()
{
return stats;
}
public void setStats(TranslationStats stats)
{
this.stats = stats;
}
public LocaleId getSourceLocale()
{
return sourceLocale;
}
public AuditInfo getLastModified()
{
return lastModified;
}
public Map<String, String> getDownloadExtensions()
{
return downloadExtensions;
}
public AuditInfo getLastTranslated()
{
return lastTranslated;
}
public void setLastTranslated(AuditInfo lastTranslated)
{
this.lastTranslated = lastTranslated;
}
public void setHasError(Boolean hasError)
{
this.hasError = hasError;
}
public Boolean hasError()
{
return hasError;
}
@Override
public String toString()
{
return "DocumentInfo(name=" + name + ",path=" + path + ",id=" + id + ")";
}
@Override
public boolean equals(Object obj)
{
if (obj == null || !(obj instanceof DocumentInfo))
{
return false;
}
DocumentInfo other = (DocumentInfo) obj;
return (id.equals(other.getId()));
}
@Override
public int hashCode()
{
return id.hashCode();
}
}