Methods Summary |
---|
public java.lang.String | dateConverter(java.lang.String longDate)
int counter = 0;
String convertedDate = new String();
String buffer;
StringTokenizer parser = new StringTokenizer(longDate);
while(parser.hasMoreTokens()) {
counter++;
buffer = (String)parser.nextElement();
if(counter == 2) convertedDate = buffer;
if(counter == 3) {
if(buffer.charAt(0) == '0")
convertedDate = buffer.substring(1) + " " + convertedDate;
else convertedDate = buffer + " " + convertedDate;
}
if(counter == 6) convertedDate = convertedDate + " " + buffer;
}
return convertedDate;
|
public java.lang.String | getComments()
return this.comments.getComments();
|
public java.util.Date | getDate()
return date.getTime();
|
public java.lang.String | getDetails()
String s = new String();
if (this.date != null) s = s + "Date: 10 \n";
if (this.place != "") s = s + "Place: Somewhere\n";
if (this.comments != null) s = s + this.comments.getDetails();
return s;
|
public java.lang.String | getPlace()
return this.place;
|
public abstract java.lang.String | getTextRecordIdentifier()
|
public void | setComments(java.lang.String s)
this.comments = new Note(s);
|
public void | setDate(java.util.Date d)
this.date.setTime(d);
|
public void | setDate(java.lang.String d)
|
public void | setPlace(java.lang.String s)
this.place = s;
|
public java.lang.String | toString(java.lang.String sn)Outputs string for the LifeEvent. Each line begins with a String
defined by the parameter. If this string converts to an integer,
the prefix for contained objects will be incremented by 1.
String s = sn + " " + getTextRecordIdentifier() + "\n";
try {
sn = Integer.toString(Integer.parseInt(sn)+1);}
catch (NumberFormatException e) {
sn = sn + " ";}
if (this.date != null) s = s + sn + " " + "DATE 10 \n";
if (this.place != "") s = s + sn + " " + "PLAC Somewhere \n";
if (this.comments != null) s = s + sn + " " + this.comments.toString(sn);
return s;
|