forked from retroryan/placesServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DisplayPlace.java
170 lines (134 loc) · 3.91 KB
/
DisplayPlace.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
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
166
167
168
169
170
package models;
import org.folg.places.standardize.Place;
/**
* User: Ryan K.
* Date: 1/12/12
*/
public class DisplayPlace {
public static class Source {
public String source;
public String link;
public Source(String source, String link) {
this.source = source;
this.link = link;
}
}
private String fullName;
private Place.AltName[] altNames;
private String types;
private String alsoLocatedIn;
private String latitude;
private String longitude;
private DisplayPlace.Source[] sources;
//This is not used on the main display site. It is only used for the
// internal comparison site to compare the Church's standardizer
private String inputPlace;
private String standard_text;
private int numDataRecords;
private String wasExactMatch;
private String wasModifiedMatch;
//This is only used for the ambig labeler
private int id;
private String placeName;
public String getFullName() {
return fullName;
}
public String getLink() {
return "http://www.werelate.org/wiki/Place:"+fullName.replace(' ','_');
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public Place.AltName[] getAltNames() {
return altNames;
}
public void setAltNames(Place.AltName[] altNames) {
this.altNames = altNames;
}
public DisplayPlace.Source[] getSources() {
return sources;
}
public void setSources(Place.Source[] sources) {
this.sources = new Source[sources.length];
for (int i = 0; i < sources.length; i++) {
Place.Source src = sources[i];
String link = "";
if (src.source.equals("fhlc")) {
link = "http://www.familysearch.org/eng/library/fhlcatalog/supermainframeset.asp?display=localitydetails&subject="+src.id+"&columns=*,0,0";
}
else if (src.source.equals("getty")) {
link = "http://www.getty.edu/vow/TGNFullDisplay?find=&place=&nation=&english=Y&subjectid="+src.id;
}
else if (src.source.equals("wikipedia")) {
link = "http://en.wikipedia.org/wiki/"+src.id.replace(' ','_');
}
this.sources[i] = new Source(src.source, link);
}
}
public String getTypes() {
return types;
}
public void setTypes(String types) {
this.types = types;
}
public String getAlsoLocatedIn() {
return alsoLocatedIn;
}
public void setAlsoLocatedIn(String alsoLocatedIn) {
this.alsoLocatedIn = alsoLocatedIn;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getInputPlace() {
return inputPlace;
}
public void setInputPlace(String inputPlace) {
this.inputPlace = inputPlace;
}
public String getStandard_text() {
return standard_text;
}
public void setStandard_text(String standard_text) {
this.standard_text = standard_text;
}
public int getNumDataRecords() {
return numDataRecords;
}
public void setNumDataRecords(int numDataRecords) {
this.numDataRecords = numDataRecords;
}
public String getWasExactMatch() {
return wasExactMatch;
}
public void setWasExactMatch(String wasExactMatch) {
this.wasExactMatch = wasExactMatch;
}
public String getWasModifiedMatch() {
return wasModifiedMatch;
}
public void setWasModifiedMatch(String wasModifiedMatch) {
this.wasModifiedMatch = wasModifiedMatch;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getPlaceName() {
return placeName;
}
public void setPlaceName(String placeName) {
this.placeName = placeName;
}
}