-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRTMLContact.java
More file actions
306 lines (275 loc) · 6.15 KB
/
RTMLContact.java
File metadata and controls
306 lines (275 loc) · 6.15 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
/*
Copyright 2006, Astrophysics Research Institute, Liverpool John Moores University.
This file is part of org.estar.rtml.
org.estar.rtml is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
org.estar.rtml is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with org.estar.rtml; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// RTMLContact.java
// $Header: /space/home/eng/cjm/cvs/org_estar_rtml/RTMLContact.java,v 1.7 2008-05-27 14:02:05 cjm Exp $
package org.estar.rtml;
import java.io.*;
import java.net.URL;
/**
* This class is a data container for information contained in the Contact
* nodes/tags of an RTML document.
* @author Jason Etherton, CHris Mottram
* @version $Revision$
* @see org.estar.rtml.RTMLAttributes
*/
public class RTMLContact extends RTMLAttributes implements Serializable
{
/**
* Revision control system version id.
*/
public final static String RCSID = "$Id$";
/**
* Serial version ID. Fixed as these documents can be used as parameters in RMI calls across JVMs.
*/
static final long serialVersionUID = 3377447263027816499L;
/**
* The User element for this Contact.
*/
private String user = null;
/**
* The Name element for this Contact.
*/
private String name = null;
/**
* The Institution element for this Contact.
*/
private String institution = null;
/**
* The Address element for this Contact.
*/
private String address = null;
/**
* The Telephone element for this Contact.
*/
private String telephone = null;
/**
* The Fax element for this Contact.
*/
private String fax = null;
/**
* The Email element for this Contact.
*/
private String email = null;
/**
* The Url element for this Contact.
*/
private URL url = null;
/**
* Default constructor.
*/
public RTMLContact()
{
super();
}
/**
* Method to set the User.
* @param newUser the new User to set
*/
public void setUser(String newUser)
{
user = newUser;
}
/**
* Method to get the current User.
* @return User
* @see #user
*/
public String getUser()
{
return(user);
}
/**
* Method to set the Name.
* @param newName the new Name to set
*/
public void setName(String newName)
{
name = newName;
}
/**
* Method to get the current Name.
* @return Name
* @see #name
*/
public String getName()
{
return(name);
}
/**
* Method to set the Institution.
* @param newInstitution the new Institution to set
*/
public void setInstitution(String newInstitution)
{
institution = newInstitution;
}
/**
* Method to get the current Institution.
* @return Institution
* @see #institution
*/
public String getInstitution()
{
return(institution);
}
/**
* Method to set the Address.
* @param newAddress the new Address to set
*/
public void setAddress(String newAddress)
{
address = newAddress;
}
/**
* Method to get the current Address.
* @return Address
* @see #address
*/
public String getAddress()
{
return(address);
}
/**
* Method to set the Telephone.
* @param newTelephone the new Telephone to set
*/
public void setTelephone(String newTelephone)
{
telephone = newTelephone;
}
/**
* Method to get the current Telephone.
* @return Telephone
* @see #telephone
*/
public String getTelephone()
{
return(telephone);
}
/**
* Method to set the Fax.
* @param newFax the new Fax to set
*/
public void setFax(String newFax)
{
fax = newFax;
}
/**
* Method to get the current Fax.
* @return Fax
* @see #fax
*/
public String getFax()
{
return(fax);
}
/**
* Method to set the Email.
* @param newEmail the new Email to set
*/
public void setEmail(String newEmail)
{
email = newEmail;
}
/**
* Method to get the current Email.
* @return Email
* @see #email
*/
public String getEmail()
{
return(email);
}
/**
* Method to set the Url.
* @param newUrl the new Url to set
*/
public void setUrl(URL newUrl)
{
url = newUrl;
}
/**
* Method to get the current Url.
* @return Url
* @see #url
*/
public URL getUrl()
{
return(url);
}
/**
* String representation of this Conatct.
* 'see #toString(java.lang.String)
*/
public String toString()
{
return(toString(""));
}
/**
* String representation of this Conatct, with specified prefix.
* @param prefix A string to prefix to each line of data we print out.
* @see #getName
* @see #getUser
* @see #getInstitution
* @see #getAddress
* @see #getTelephone
* @see #getFax
* @see #getEmail
* @see #getUrl
* @see org.estar.rtml.RTMLAttributes#toString
*/
public String toString(String prefix)
{
StringBuffer sb = new StringBuffer();
sb.append(prefix+"Contact :\n");
sb.append(super.toString(prefix+"\t"));
sb.append(prefix+"\tName : "+name+"\n");
sb.append(prefix+"\tUser : "+user+"\n");
sb.append(prefix+"\tInstitution : "+institution+"\n");
sb.append(prefix+"\tAddress : "+address+"\n");
sb.append(prefix+"\tTelephone : "+telephone+"\n");
sb.append(prefix+"\tFax : "+fax+"\n");
sb.append(prefix+"\teMail : "+email+"\n");
sb.append(prefix+"\tURL : "+url+"\n");
return(sb.toString());
}
}
/*
* $Date$
* $RCSfile: RTMLContact.java,v $
* $Source$
* $Id$
* $Log: not supported by cvs2svn $
* Revision 1.6 2008/05/23 14:12:11 cjm
* Now extends RTMLAttributes.
*
* Revision 1.5 2007/01/30 18:31:08 cjm
* gnuify: Added GNU General Public License.
*
* Revision 1.4 2005/06/08 11:37:52 cjm
* Fixed comments.
* Reformatted.
*
* Revision 1.3 2005/01/19 15:30:38 cjm
* Added Serializable.
*
* Revision 1.2 2005/01/18 15:18:19 cjm
* Added ID.
*
* Revision 1.1 2004/03/12 10:55:18 je
* Initial revision
*
*/